mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: add panel inspector (#20052)
This commit is contained in:
@@ -13,6 +13,7 @@ import 'mousetrap-global-bind';
|
||||
import { ContextSrv } from './context_srv';
|
||||
import { ILocationService, ITimeoutService, IRootScopeService } from 'angular';
|
||||
import { GrafanaRootScope } from 'app/routes/GrafanaCtrl';
|
||||
import { getLocationSrv } from '@grafana/runtime';
|
||||
|
||||
export class KeybindingSrv {
|
||||
helpModal: boolean;
|
||||
@@ -264,6 +265,13 @@ export class KeybindingSrv {
|
||||
}
|
||||
});
|
||||
|
||||
// inspect panel
|
||||
this.bind('p i', () => {
|
||||
if (dashboard.meta.focusPanelId) {
|
||||
getLocationSrv().update({ partial: true, query: { inspect: dashboard.meta.focusPanelId } });
|
||||
}
|
||||
});
|
||||
|
||||
// toggle panel legend
|
||||
this.bind('p l', () => {
|
||||
if (dashboard.meta.focusPanelId) {
|
||||
|
||||
Reference in New Issue
Block a user