Force update on query with Business Text

Hello,

I am using Business Text plugin, and I am trying to force a refresh at the end of an onClick event.

I have gathered the information of this post : Getting dashboard to refresh through code - #3 by dmitrylesh which are:

  • change the value of a variable
  • update the panel by using the variable in its query

I also added the function context.grafana.refresh().

I created a variable $update that toggles between 0 and 1.
I change the value at the end of the onClick event :

const update = context.grafana.replaceVariables("${update}");
context.grafana.locationService.partial({ "var-update": update == 0 ? 1 : 0 });

This code works because I see its value change in the url and through the value shown on the dashboard.

I added the variable in the query (lucene query)

...AND some_field:$value **OR $update** AND ...

If I trigger the onClick event, the panel doesnt update, but if I change the $update value through the dashboard interface, the panel updates.

What I want is that the panel should update without having to manually change $update

Hi,

In the Business Charts Plugin I often use a reload of the hole URL…

window.open(targetUrl, ‘_self’);

is it possible in the Text Pugin?

Hello, yes it is possible.
I tried but it doesn’t always update the data