diff --git a/public/app/features/dashboard/dashboard_ctrl.ts b/public/app/features/dashboard/dashboard_ctrl.ts index 7bb50f58bf1..5618366cfbb 100644 --- a/public/app/features/dashboard/dashboard_ctrl.ts +++ b/public/app/features/dashboard/dashboard_ctrl.ts @@ -6,7 +6,6 @@ import moment from 'moment'; import _ from 'lodash'; import coreModule from 'app/core/core_module'; -import {DynamicDashboardSrv} from './dynamic_dashboard_srv'; export class DashboardCtrl { @@ -19,13 +18,13 @@ export class DashboardCtrl { templateValuesSrv, dashboardSrv, unsavedChangesSrv, + dynamicDashboardSrv, dashboardViewStateSrv, contextSrv, $timeout) { $scope.editor = { index: 0 }; $scope.panels = config.panels; - $scope.dynamicDashboardSrv = new DynamicDashboardSrv(); var resizeEventTimeout; @@ -43,7 +42,7 @@ export class DashboardCtrl { // template values service needs to initialize completely before // the rest of the dashboard can load templateValuesSrv.init(dashboard).finally(function() { - $scope.dynamicDashboardSrv.init(dashboard); + dynamicDashboardSrv.init(dashboard); unsavedChangesSrv.init(dashboard, $scope); @@ -64,7 +63,7 @@ export class DashboardCtrl { }; $scope.templateVariableUpdated = function() { - $scope.dynamicDashboardSrv.update($scope.dashboard); + dynamicDashboardSrv.update($scope.dashboard); }; $scope.updateSubmenuVisibility = function() { diff --git a/public/app/features/dashboard/dynamic_dashboard_srv.ts b/public/app/features/dashboard/dynamic_dashboard_srv.ts index 747c15479b2..6b58f448085 100644 --- a/public/app/features/dashboard/dynamic_dashboard_srv.ts +++ b/public/app/features/dashboard/dynamic_dashboard_srv.ts @@ -184,3 +184,5 @@ export class DynamicDashboardSrv { } } +coreModule.service('dynamicDashboardSrv', DynamicDashboardSrv); + diff --git a/public/app/features/dashboard/export/export_modal.html b/public/app/features/dashboard/export/export_modal.html index 2d7c1c1c3d5..7241a210bf5 100644 --- a/public/app/features/dashboard/export/export_modal.html +++ b/public/app/features/dashboard/export/export_modal.html @@ -23,28 +23,8 @@ -
- - - -
- - - - - - - - - - - - -