Hello,
I have a procedure as shown below querying tables that are partitioned by date(day).
Now I am trying to use dbr.url so that "callid" column will be clickable and should open an external webpage. A working example to open that page would be
http://127.0.0.1/homer/#/result?query(trancall:'true',startdate:'2016-04-08',endts:'2016-04-09',search_callid:'x40f3dabb-679cd5b3-6377be7f-9191@192.168.0.1')
The callid from select should also be used in URL as search_callid: parameter. The date values are also different so I guess I need to reformat those to %Y-%m-%d.
select 'dbr.url', external_url_base, 'URL name', [ColumnReference, ] [embed_target, ] [<=ColumnReference/ParameterReference to be added to base URL] [parameter_name=ColumnReference/ParameterReference, ...]
I've been trying to write a usable dbr.url format been I have not been successfull at all.
Can you please provide a working dbr.url for this example?
DROP PROCEDURE IF EXISTS sp_DBR_FunFox_CallOverview
$$
CREATE PROCEDURE `sp_DBR_FunBox_CallOverview`()
BEGIN set @usetableday = concat("mydatabase.my_table_", DATE_FORMAT(CURDATE(), '%Y%m%d'));
set @myquery = concat_ws(" ", "select callid, id, date, ruri, from_user, to_user, to_domain, case when from_domain like '1.2.3.%' then 'nasavisits' else from_domain end as from_domain, source_ip, source_port, destination_ip, destination_port, contact_ip, contact_port from",@usetableday,"where method = 'INVITE' and id in ( SELECT MIN(id) FROM",@usetableday," where method = 'INVITE' GROUP BY callid ) order by id desc");
PREPARE my_stmt FROM @myquery;
EXECUTE my_stmt; END
$$