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

"Update Request Payload" code selection can just return a string? #381

Closed gooker closed 8 months ago

gooker commented 8 months ago

I just wanted to form a string and submit it as a body, but I saw that it seemed like the payload came out with JSON, even though I chose text in the Update Request

May I ask how to handle it

image

mikhail-vl commented 8 months ago

@gooker Returned object should be in the Grafana format which any data source understands. It's not something we control.

Take a look at the documentation: https://volkovlabs.io/plugins/volkovlabs-form-panel/data-flow/#update-request

gooker commented 8 months ago

@gooker Returned object should be in the Grafana format which any data source understands. It's not something we control.

Take a look at the documentation: https://volkovlabs.io/plugins/volkovlabs-form-panel/data-flow/#update-request

can i modify the payload data before submit?

mikhail-vl commented 8 months ago

@gooker You create your own payload in this function, but it should be in the correct format of the data source as explained in our videos and blog posts.

Take a look at our latest video it explained how we created the Update Payload: https://www.youtube.com/watch?v=V4Sza0uDQNs&t=86s

Let me know if it's still not clear.

gooker commented 8 months ago

@mikhail-vl Thank you for the very informative video.

mikhail-vl commented 8 months ago

@gooker Glad it helped!