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

get userinfo from `/query` #637

Closed cybercall closed 1 week ago

cybercall commented 2 months ago

Can I get the user's login name from the /query request? Its value is the built-in Grafana variable ${__user.login}. I need this information to perform some permission control, which will determine the results returned.

simPod commented 2 months ago

Grafana does not include it in the query. You can definitely send the variable's value within payload.

cybercall commented 2 months ago

Grafana does not include it in the query. You can definitely send the variable's value within payload.

sure, I can do it like that, but I would need to modify each panel, which is quite troublesome.

simPod commented 2 months ago

What do you propose then

On Thu, Sep 26, 2024, 12:24 cybercall @.***> wrote:

Grafana does not include it in the query. You can definitely send the variable's value within payload.

sure, I can do it like that, but I would need to modify each panel, which is quite troublesome.

— Reply to this email directly, view it on GitHub https://github.com/simPod/GrafanaJsonDatasource/issues/637#issuecomment-2376551820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQAJPCJJXFV6MMDOS6SCLZYPOGFAVCNFSM6AAAAABO4TM5OSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZWGU2TCOBSGA . You are receiving this because you commented.Message ID: @.***>

cybercall commented 1 month ago

I'm not sure how to achieve this with Grafana plugins, I just hope to be able to get the user info in the HTTP request ~~

github-actions[bot] commented 2 weeks 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 1 week ago

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