|
@@ -6,7 +6,6 @@ import moment from 'moment';
|
|
|
import _ from 'lodash';
|
|
import _ from 'lodash';
|
|
|
|
|
|
|
|
import coreModule from 'app/core/core_module';
|
|
import coreModule from 'app/core/core_module';
|
|
|
-import {DynamicDashboardSrv} from './dynamic_dashboard_srv';
|
|
|
|
|
|
|
|
|
|
export class DashboardCtrl {
|
|
export class DashboardCtrl {
|
|
|
|
|
|
|
@@ -19,13 +18,13 @@ export class DashboardCtrl {
|
|
|
templateValuesSrv,
|
|
templateValuesSrv,
|
|
|
dashboardSrv,
|
|
dashboardSrv,
|
|
|
unsavedChangesSrv,
|
|
unsavedChangesSrv,
|
|
|
|
|
+ dynamicDashboardSrv,
|
|
|
dashboardViewStateSrv,
|
|
dashboardViewStateSrv,
|
|
|
contextSrv,
|
|
contextSrv,
|
|
|
$timeout) {
|
|
$timeout) {
|
|
|
|
|
|
|
|
$scope.editor = { index: 0 };
|
|
$scope.editor = { index: 0 };
|
|
|
$scope.panels = config.panels;
|
|
$scope.panels = config.panels;
|
|
|
- $scope.dynamicDashboardSrv = new DynamicDashboardSrv();
|
|
|
|
|
|
|
|
|
|
var resizeEventTimeout;
|
|
var resizeEventTimeout;
|
|
|
|
|
|
|
@@ -43,7 +42,7 @@ export class DashboardCtrl {
|
|
|
// template values service needs to initialize completely before
|
|
// template values service needs to initialize completely before
|
|
|
// the rest of the dashboard can load
|
|
// the rest of the dashboard can load
|
|
|
templateValuesSrv.init(dashboard).finally(function() {
|
|
templateValuesSrv.init(dashboard).finally(function() {
|
|
|
- $scope.dynamicDashboardSrv.init(dashboard);
|
|
|
|
|
|
|
+ dynamicDashboardSrv.init(dashboard);
|
|
|
|
|
|
|
|
unsavedChangesSrv.init(dashboard, $scope);
|
|
unsavedChangesSrv.init(dashboard, $scope);
|
|
|
|
|
|
|
@@ -64,7 +63,7 @@ export class DashboardCtrl {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
$scope.templateVariableUpdated = function() {
|
|
$scope.templateVariableUpdated = function() {
|
|
|
- $scope.dynamicDashboardSrv.update($scope.dashboard);
|
|
|
|
|
|
|
+ dynamicDashboardSrv.update($scope.dashboard);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
$scope.updateSubmenuVisibility = function() {
|
|
$scope.updateSubmenuVisibility = function() {
|