Dashboards: add panel inspector (#20052)

This commit is contained in:
Ryan McKinley
2019-11-04 11:53:44 -08:00
committed by GitHub
parent 4424c2f43f
commit 5210a8f2f4
6 changed files with 116 additions and 1 deletions

View File

@@ -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) {