We would like to be able to click a link or button on a table row to send a request to a REST API while filling in data using the row’s cell variables. The existing Data Links override partially works towards this purpose since it allows us to send a GET request, however:
- We would prefer to send some variables from the row in a json formatted POST request. The Data Link only allows GET requests.
- We do not want to directly display the page for the REST API, we want to stay on the dashboard and optionally display the result of the request in a modal dialog. The Data Link only has the option to either go to the page directly or open in a new tab.
We have already created a button panel that behaves in the manner I’ve described above, so my problem isn’t with that part of it. My problem is purely with displaying the button in each row of a table and configuring it.
I’ve already tried a couple things, but couldn’t figure out how to change the table cell display from any of the existing options to a new button option. I am specifically looking at the grafana 7 table panel as that is what the rest of our panels are using, but if there’s another table panel out there that will work better for this, I’m open to switching.
So my questions are:
How would I go about integrating a button and its settings into the table rows?
Alternatively, if that’s not feasible for some reason, how would I go about modifying the Data Links to have similar behaviour?