Merge pull request #11264 from grafana/11102_duplicate_panel_shortcut

Keyboard shortcut to duplicate panel
This commit is contained in:
Daniel Lee
2018-03-20 20:56:35 +01:00
committed by GitHub

View File

@@ -178,6 +178,14 @@ export class KeybindingSrv {
}
});
// duplicate panel
this.bind('p d', () => {
if (dashboard.meta.focusPanelId && dashboard.meta.canEdit) {
let panelIndex = dashboard.getPanelInfoById(dashboard.meta.focusPanelId).index;
dashboard.duplicatePanel(dashboard.panels[panelIndex]);
}
});
// share panel
this.bind('p s', () => {
if (dashboard.meta.focusPanelId) {