From 1094dc32bc75bb3dfb4266a21ec53e3aa3b6366b Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Thu, 15 Mar 2018 17:22:11 +0100 Subject: [PATCH] made a keyboard shortcut to duplicate panel --- public/app/core/services/keybindingSrv.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 1658d74be0a..0d468b6980f 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -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) {