From c4e872b9da626265f7c40d60fc2a833c873088a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 6 Jun 2017 16:27:28 +0200 Subject: [PATCH] dashboard_history: minor changes and fixes --- public/app/core/nav_model_srv.ts | 12 +++++++----- public/app/features/dashboard/dashboard_srv.ts | 2 +- .../app/features/dashboard/unsaved_changes_modal.ts | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/app/core/nav_model_srv.ts b/public/app/core/nav_model_srv.ts index a12b57752d1..4771f8c191c 100644 --- a/public/app/core/nav_model_srv.ts +++ b/public/app/core/nav_model_srv.ts @@ -167,11 +167,13 @@ export class NavModelSrv { clickHandler: () => dashNavCtrl.openEditView('annotations') }); - menu.push({ - title: 'Version history', - icon: 'fa fa-fw fa-history', - clickHandler: () => dashNavCtrl.openEditView('history') - }); + if (!dashboard.meta.isHome) { + menu.push({ + title: 'Version history', + icon: 'fa fa-fw fa-history', + clickHandler: () => dashNavCtrl.openEditView('history') + }); + } menu.push({ title: 'View JSON', diff --git a/public/app/features/dashboard/dashboard_srv.ts b/public/app/features/dashboard/dashboard_srv.ts index 205e7a8f9c6..9d622f4bbc7 100644 --- a/public/app/features/dashboard/dashboard_srv.ts +++ b/public/app/features/dashboard/dashboard_srv.ts @@ -127,7 +127,7 @@ export class DashboardSrv { showSaveModal() { this.$rootScope.appEvent('show-modal', { - templateHtml: '"', + templateHtml: '', scope: this.$rootScope.$new(), modalClass: 'modal--narrow' }); diff --git a/public/app/features/dashboard/unsaved_changes_modal.ts b/public/app/features/dashboard/unsaved_changes_modal.ts index c206ecc2d21..27ff094ca47 100644 --- a/public/app/features/dashboard/unsaved_changes_modal.ts +++ b/public/app/features/dashboard/unsaved_changes_modal.ts @@ -18,7 +18,7 @@ const template = `