speakyourcode / grafana-button-panel Goto Github PK
View Code? Open in Web Editor NEWGrafana Button Control Panel
License: Apache License 2.0
Grafana Button Control Panel
License: Apache License 2.0
is it possible to support database selection (as a panel variable) in the query? like in DROP MEASUREMENT
?
I think INFLUXQL does not support configuring the database in the query. But if you are using the REST API, the database can be specified. Can we support something like this?
{
"query": "DROP MEASUREMENT "$measurement_name"”,
"db": "$database_name",
"rawQuery": true,
"resultFormat": "time_series"
}
Hello, is it possible to send requests to InfluxDB 2?
Hi @speakyourcode / @Ldsystem ,
Thank you for the plugin. I have been using it for long and it works flawlessly. I use it insert the data into the MySQL tables. Is there anyway to show the response(which SQL gives like duplicate rows when primary key is there) when the query fails? For now it gives 400 response code if i am not wrong. It would be good if we get that response from SQL so that it would be helpful for people who are using the dashboard.
Thank you and waiting for your response.
I have a mysql table. How to insert the data inside it? I am using the below query but that dosent work.
{
"rawSql": "INSERT INTO TestDB
.MAINT_MODE
(HostName
,ItemName
,Start_Date
,End_Date
,Processed_Flag
) VALUES (asdf,ghjk,9894,thdk,Y);",
"format": table
}
But nothing is happening
Hi!
After upgrading my Grafana instance to v9.0.3 I noticed that I'm getting 404 Errors after clicking on a button:
The 404 error is cause by trying to call the /api/tsdb/query
path.
According to the Grafana v8.5.0 documentation the /api/tsdb/query
path is deprecated.
So since v9.0.x the new path need to be /api/ds/query
according to the docs.
At least it looks like the POST body format stayed the same.
Using the Health API it should be possible to determine the current Grafana version before sending the API call according to the button click.
Can I embed button into grafana table panel?so that i can operation the data each row。
Hello,
I love this button, but unfortunately is not working with Postgres Datasources.
I'm using the json returned by query inspector, only the query part.
Button return 200 ok message, but the action defined in datasource (a table update) doesn't works.
The datasource itself is working fine.
Here my query:
{
"request": {
"url": "api/tsdb/query",
"method": "POST",
"data": {
"from": "1610432023688",
"to": "1610432323689",
"queries": [
{
"intervalMs": 60000,
"maxDataPoints": 934,
"rawSql": "UPDATE schema_name.table_name set flag=1 where flag=0",
"format": "table"
}
]
}
}
}
Also tried to reduce it as
{
"queries": {
"rawSql": "UPDATE schema_name.table_name set flag=1 where flag=0",
"format": "table"
}
}
Could you please advice on this?
Many thanks in advance,
best regards,
Emanuele
configured a button to drop a measurement called "Test_tr1"
{
"query": "DROP MEASUREMENT \"Test_tr1\"",
"rawQuery": true,
"resultFormat": "time_series"
}
it returns a green notification Delete: 200 (OK) but the measurement is still in the db.
hello, i also want to use a template variable MYSQL database in the query. could you please tell me how to use it. many thanks~
Originally posted by @louting1989 in #4 (comment)
Hi Team,
Thanks for the wonderful plugin. I have been using for inserts till now. But can you please let me know how to call the stored procedure from the click ? Also request you to add some more examples in the sheet so that we dont disturb you :-)
Hi there,
thank you very much already for your excellent plugin, it is very handy for our use case!
Would it be possible/considerable for future versions to add the ability to add the configuration parameter to trigger a dashboard refresh after a button has been clicked and the result has been returned via the notification successfully ?
Best regards and have a nice day
Daniel
Hi, I am considering using your plugin for a user interface in my grafana dashboard. I'm confused as to how database queries can be used for dashboard controls.
Hello,
I'm trying to use your plugin with Infinity datasource.
It works fine but I have only a notify popup with the text "200 (OK)" as feedback.
Could you please add an optional text box to show results from datasource or (could be better) a javascript method to override?
Thank you for your plugin!
Fabrizio
Thank you for this very useful plugin, unfortunately it is not working for me with a "marcusolsson-json-datasource" datasource. I am using the dockerized version of grafana 8.2.0 and I have the following error on grafana logs:
error="plugin not registered"
On the front-end the error is "Metric request error".
there is not a problem on the server api side (a flask microservice) because I cannot even see the requests from grafana.
It uses the old endpoint (/api/tsdb/query), it should use instead /api/ds/query
see here grafana/grafana#45238
Gets below error when uses Button Panel in the dashboard when used in AMG(AWS managed Grafana)
{message: "Internal server error", messageld: "plugin unavailable", statusCode: 500, traceID: "'} message: "Internal server error" messageld: "plugin.unavailable" statusCode: 500
Please find the attachment:
Need help on this concern
Hi, I was wondering if there's a way to implement it to MYSQL. I am looking to update a Table by clicking the button but I don't know if that is going to be possible.
Hi,
Is it possible to create a SQL query against the MySQL database so that two queries are executed on one click?
I tried :
[
{
"rawSql" : "INSERT INTO REPORTER.REPORTER_JOURNAL (chrono, userid, servername, serial, serverserial, text1) VALUES (NOW(), '${__user.id}', 'GRAFANA', '$serverserial', '$serverserial', 'Alert Acknowledge by ${__user.login}')",
"format": "table"
},
{
"rawSql" : "UPDATE REPORTER.REPORTER_STATUS SET acknowledged = IF('${__user.login}' IN ('xxx', 'yyy'), '1', acknowledged) WHERE serverserial = '$serverserial'",
"format": "table"
}
]
Br,
M
Hi!
Is there any plan or roadmap for add the possibility in the plugin to change the button color to a custom color, and add an icon to the button, like you can do for example in Volkov Labs Data Manipulation Panel, https://volkovlabs.io/plugins/volkovlabs-form-panel/, or in Cloudspout-Button-Panel, https://grafana.com/grafana/plugins/cloudspout-button-panel/?
Your plugin is amazing, and is the only one of "button type" that works correctly with Infinity Plugin and Oauth2 authentication, so the use cases that you can create for "Response" using API POST are really a lot, :)
Thanks for create this plugin.
Regards,
Alejandro
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.