VolkovLabs / business-forms

The Business Forms panel is a conceptually new plugin for Grafana. It is the first plugin that allows inserting and updating application data, as well as modifying configuration directly from your Grafana dashboard.
https://docs.volkovlabs.io
Apache License 2.0
86 stars 10 forks source link

Error with 0 Value in Grafana Data Manipulation Plugin for MariaDB #283

Closed lorenzolaiti closed 1 year ago

lorenzolaiti commented 1 year ago

Hello Volkalabs Community,

I'm currently using Grafana with the Data Manipulation plugin (version 3.2.1), and I'm encountering an issue with a value of 0 when using MariaDB. When I set the slider to 0 and click 'Submit,' I receive the following error:

Request {"status":400,"statusText":"Bad Request","data":{"results":{"A":{"error":"db query error: Error 1054 (42S22): Unknown column 'undefined' in 'field list'","status":500,"frames":[{"schema":{"refId":"A","meta":{"typeVersion":[0,0],"executedQueryString":"UPDATE times.sensori set setpoint = undefined WHERE id = 'eui-00033b30073a0fe6'"},"fields":[]},"data":{"values":[]}}]}}},"config":{"method":"POST","url":"api/ds/query","data":{"queries":[{"datasourceId":5,"refId":"A","rawSql":"UPDATE times.sensori set setpoint = undefined WHERE id = 'eui-00033b30073a0fe6'","format":"table"}]},"retry":0,"headers":{"X-Grafana-Org-Id":1},"hideFromInspector":false}}

It works fine with any other value. The datatype in the database is Float.

lorenzolaiti commented 1 year ago

Ok, I have added the single quote also for the float update and everything in ok! I close the issue

mikhail-vl commented 1 year ago

@lorenzolaiti Thank you for reaching out. We seem to have an issue with 0 for numbers, and we will fix it in the upcoming release: https://github.com/VolkovLabs/volkovlabs-form-panel/issues/280