Closed cgravita closed 5 months ago
Hi @cgravita You can use 'Initial Request' in 'Data Manipulation'. And set 'Disabled' to 'Synchronize with data' option. And add your GET /calculate logic. In this case, the panel will be 'pending' until the response, and we will have a LoadingBar at the top of the panel when the 'Initial Request' is executed.
Good morning! I'm doing some testing on Grafana and I'm very grateful to have met you. I need to represent some availability tables and graphs via rest api. These are of two types:
GET /read -> In the first case, through the 6 variables, the user identifies a particular table which is immediately loaded. GET /calculate -> In the second case, there are 7 variables and one is completely customizable by the user. At this point, the api rest call is made to a different endpoint which recalculates the table data, with the variable defined by the user, and only after finishing the calculation does it return the requested table. This processing also takes 30 seconds or 1 minute.
The problem arises in this second case: every time one of the 7 variables is changed, the "GET /calculate" call is invoked even if all the fields have not yet been defined. If it responded immediately it wouldn't be a problem, but having a consistent response delay only creates chaos on the server side.
First question: is there a native Grafana way to make a specific api call execute only under certain conditions, and not every time a variable is modified?
Second: While the call is being made, is it possible to "put" Grafana on hold, until answered? Like a loading bar
I saw the "Data Manipulation" function. Interesting tool but it doesn't directly solve my problem.
Some advice? Thanks