export const urlTemplatePlaceholder = '{{gquery}}' ; export const urlTemplateRegex = /\{\{gquery\}\}/g ; const defaultKibanaQuery = /,query:\(language:kuery,query:'.*?'\)/g ; param url export function isUrlTemplateValid ( url ) { return url . search ( urlTemplateRegex ) > - 1 ; } param url export function isKibanaUrl ( url ) { return url . search ( defaultKibanaQuery ) > - 1 ; } param url export function replaceKibanaUrlParam ( url ) { return url . replace ( defaultKibanaQuery , `,query:(language:kuery,query:{{${ urlTemplatePlaceholder }}})` ) ; }