simPod / GrafanaJsonDatasource

Grafana datasource to load JSON data over your arbitrary HTTP backend
https://grafana.com/grafana/plugins/simpod-json-datasource/
MIT License
353 stars 72 forks source link

Mark /metric-payload-options optional in docs #622

Open zeisss opened 2 months ago

zeisss commented 2 months ago

When the payload type is select or multi-select and the payload options configuration is empty, expanding the drop-down menu will trigger this API. The request body will carry the current metric and payload.

I recently implemented the endpoints, but missed the /metric-payload-options endpoint (thus serving a 404). The docs state this endpoint is requested to fill the payload options, if they are empty, but I am still seeing requests to this endpoint even though I always serve the options when describing the available metrics.

It feels like the docs are a bit inconsistent from what I am seeing: a) It doesn't seem to actually be required since it works just fine as I am serving a 404 and provide the options in the initial metrics structure b) The docs state this is only requests if the options are empty, but I am still seeing requests

simPod commented 1 month ago

👋🏾 can you send PR with a fix? I believe it is in QueryBuilderPayloadSelect

zeisss commented 3 weeks ago

So we want to follow a) the docs and skip the request or b) just update the docs to mention the request will be made anyways, but a 404 is fine?

simPod commented 3 weeks ago

I think the datasource should not make the request as stated in the docs now (?)