diff --git a/src/app/controllers/grafanaCtrl.js b/src/app/controllers/grafanaCtrl.js index e54dbfe8280..2b9f7de5fe2 100644 --- a/src/app/controllers/grafanaCtrl.js +++ b/src/app/controllers/grafanaCtrl.js @@ -80,7 +80,7 @@ function (angular, config, _, $) { var count = 0; console.log("registering digest counter"); - $scope.$watch(function() { + $scope.$watch(function digestCounter() { console.log(1); count++; }, function() { diff --git a/src/app/directives/addPanel.js b/src/app/directives/addPanel.js deleted file mode 100644 index e3f0fe7fc3d..00000000000 --- a/src/app/directives/addPanel.js +++ /dev/null @@ -1,35 +0,0 @@ -define([ - 'angular', - 'app', - 'lodash' -], -function (angular, app, _) { - 'use strict'; - - angular - .module('grafana.directives') - .directive('addPanel', function($compile) { - return { - restrict: 'A', - link: function($scope, elem) { - - $scope.$on("$destroy",function() { - elem.remove(); - }); - - $scope.$watch('panel.type', function() { - var _type = $scope.panel.type; - $scope.reset_panel(_type); - if(!_.isUndefined($scope.panel.type)) { - $scope.panel.loadingEditor = true; - $scope.require(['panels/'+$scope.panel.type.replace(".","/") +'/module'], function () { - var template = '
'; - elem.html($compile(angular.element(template))($scope)); - $scope.panel.loadingEditor = false; - }); - } - }); - } - }; - }); -}); \ No newline at end of file diff --git a/src/app/directives/all.js b/src/app/directives/all.js index ed97de93780..5236a1a619d 100644 --- a/src/app/directives/all.js +++ b/src/app/directives/all.js @@ -1,5 +1,4 @@ define([ - './addPanel', './arrayJoin', './dashUpload', './grafanaPanel', @@ -17,4 +16,4 @@ define([ './graphiteFuncEditor', './grafanaVersionCheck', './influxdbFuncEditor' -], function () {}); \ No newline at end of file +], function () {}); diff --git a/src/app/directives/grafanaPanel.js b/src/app/directives/grafanaPanel.js index b2d9c1d46a7..e0a16e55218 100644 --- a/src/app/directives/grafanaPanel.js +++ b/src/app/directives/grafanaPanel.js @@ -38,7 +38,7 @@ function (angular, $) { 'index:{{$index}},'+ 'onStart:\'panelMoveStart\','+ 'onStop:\'panelMoveStop\''+ - '}" ng-model="row.panels" ' + + '}" ng-model="panel" ' + '>' + '{{panel.title || "No title"}}' + '' + diff --git a/src/app/partials/dashboard.html b/src/app/partials/dashboard.html index 7a4d9fb92ca..c512252e1b8 100644 --- a/src/app/partials/dashboard.html +++ b/src/app/partials/dashboard.html @@ -98,11 +98,16 @@ -