diff --git a/docs/sources/linking/dashboard-links.md b/docs/sources/linking/dashboard-links.md index 3f5ea6e04e1..6f0b9084d81 100644 --- a/docs/sources/linking/dashboard-links.md +++ b/docs/sources/linking/dashboard-links.md @@ -62,6 +62,10 @@ To change or update an existing dashboard link, follow this procedure. 1. In Dashboard Settings, on the Links tab, click the existing link that you want to edit. 1. Change the settings and then click **Update**. +## Duplicate a dashboard link + +To duplicate an existing dashboard link, click the duplicate icon next to the existing link that you want to duplicate. + ## Delete a dashboard link -To delete an existing dashboard link, click the red **X** next to the existing link that you want to delete. \ No newline at end of file +To delete an existing dashboard link, click the trash icon next to the duplicate icon that you want to delete. diff --git a/public/app/features/dashboard/components/DashLinks/DashLinksEditorCtrl.ts b/public/app/features/dashboard/components/DashLinks/DashLinksEditorCtrl.ts index 7e0e3be661b..9445041594b 100644 --- a/public/app/features/dashboard/components/DashLinks/DashLinksEditorCtrl.ts +++ b/public/app/features/dashboard/components/DashLinks/DashLinksEditorCtrl.ts @@ -74,6 +74,11 @@ export class DashLinksEditorCtrl { _.move(this.dashboard.links, index, index + dir); } + duplicateLink(link: any, index: number) { + this.dashboard.links.splice(index, 0, link); + this.dashboard.updateSubmenuVisibility(); + } + deleteLink(index: number) { this.dashboard.links.splice(index, 1); this.dashboard.updateSubmenuVisibility(); diff --git a/public/app/features/dashboard/components/DashLinks/editor.html b/public/app/features/dashboard/components/DashLinks/editor.html index 0aa73c8192d..dcfad1a33d9 100644 --- a/public/app/features/dashboard/components/DashLinks/editor.html +++ b/public/app/features/dashboard/components/DashLinks/editor.html @@ -39,7 +39,7 @@ - + {{ link.type }} @@ -68,8 +68,13 @@ - - + + + + + + +