Commit 524f5056 by Torkel Ödegaard

tech(templating): refactoring, updated dashboardSrv to typescript

parent 5ce3e40c
...@@ -7,7 +7,7 @@ define([ ...@@ -7,7 +7,7 @@ define([
'./rowCtrl', './rowCtrl',
'./shareModalCtrl', './shareModalCtrl',
'./shareSnapshotCtrl', './shareSnapshotCtrl',
'./dashboardSrv', './dashboard_srv',
'./keybindings', './keybindings',
'./viewStateSrv', './viewStateSrv',
'./timeSrv', './timeSrv',
......
...@@ -87,8 +87,6 @@ export class DashboardCtrl { ...@@ -87,8 +87,6 @@ export class DashboardCtrl {
}; };
$scope.templateVariableUpdated = function() { $scope.templateVariableUpdated = function() {
console.log('dynamic update');
dynamicDashboardSrv.update($scope.dashboard);
}; };
$scope.updateSubmenuVisibility = function() { $scope.updateSubmenuVisibility = function() {
......
import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common'; import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
import 'app/features/dashboard/dashboardSrv'; import {DashboardSrv} from '../dashboard_srv';
import {DynamicDashboardSrv} from '../dynamic_dashboard_srv'; import {DynamicDashboardSrv} from '../dynamic_dashboard_srv';
function dynamicDashScenario(desc, func) { function dynamicDashScenario(desc, func) {
...@@ -10,6 +10,7 @@ function dynamicDashScenario(desc, func) { ...@@ -10,6 +10,7 @@ function dynamicDashScenario(desc, func) {
ctx.setup = function (setupFunc) { ctx.setup = function (setupFunc) {
beforeEach(angularMocks.module('grafana.core'));
beforeEach(angularMocks.module('grafana.services')); beforeEach(angularMocks.module('grafana.services'));
beforeEach(angularMocks.module(function($provide) { beforeEach(angularMocks.module(function($provide) {
$provide.value('contextSrv', { $provide.value('contextSrv', {
......
define([ define([
'app/features/dashboard/unsavedChangesSrv', 'app/features/dashboard/unsavedChangesSrv',
'app/features/dashboard/dashboardSrv' 'app/features/dashboard/dashboard_srv'
], function() { ], function() {
'use strict'; 'use strict';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment