simPod / GrafanaJsonDatasource

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

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

Closed zeisss closed 3 weeks ago

zeisss commented 3 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 2 months ago

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

zeisss commented 2 months 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 2 months ago

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

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 3 weeks ago

This issue has not seen any activity since it was marked stale. Closing.