ajax-panel
ajax-panel copied to clipboard
Getting the current Grafana user
I am getting the current username like this:
ctrl.$scope.$$childTail.$root.$$childTail.$$prevSibling.$$prevSibling.$$prevSibling.ctrl.searchSrv.backendSrv.contextSrv.user.login
This would return admin since I'm logged in as admin.
Is there any simpler way?
I would really like to know how to do this as well.
@mhollins I ended up writing my own plugin for it. https://github.com/MacroPower/macropower-analytics-panel Might help depending on your use case.