diff --git a/public/app/plugins/panel/graph/axisEditor.html b/public/app/plugins/panel/graph/axisEditor.html index 13bc78b7dfe..b1d6d9753c0 100644 --- a/public/app/plugins/panel/graph/axisEditor.html +++ b/public/app/plugins/panel/graph/axisEditor.html @@ -10,22 +10,22 @@ Unit
  • Scale type
  • - +
  • Label
  • + ng-model="ctrl.panel.leftYAxisLabel" ng-change="ctrl.render()" ng-model-onblur>
  • @@ -40,16 +40,16 @@
  • + empty-to-null ng-model="ctrl.panel.grid.leftMax" + ng-change="ctrl.render()" ng-model-onblur>
  • Y-Min
  • + empty-to-null ng-model="ctrl.panel.grid.leftMin" + ng-change="ctrl.render()" ng-model-onblur>
  • @@ -63,22 +63,22 @@ Unit
  • Scale type
  • - +
  • Label
  • + ng-model="ctrl.panel.rightYAxisLabel" ng-change="ctrl.render()" ng-model-onblur>
  • @@ -93,16 +93,16 @@
  • + empty-to-null ng-model="ctrl.panel.grid.rightMax" + ng-change="ctrl.render()" ng-model-onblur>
  • Y-Min
  • + empty-to-null ng-model="ctrl.panel.grid.rightMin" + ng-change="ctrl.render()" ng-model-onblur>
  • @@ -119,13 +119,13 @@
  • X-Axis  + ng-model="ctrl.panel['x-axis']" ng-checked="ctrl.panel['x-axis']" ng-change="ctrl.render()">
  • Y-Axis  + ng-model="ctrl.panel['y-axis']" ng-checked="ctrl.panel['y-axis']" ng-change="ctrl.render()">
  • @@ -141,23 +141,23 @@
  • + ng-model="ctrl.panel.grid.threshold1" ng-change="ctrl.render()" ng-model-onblur>
  • - +
  • Level 2
  • + ng-model="ctrl.panel.grid.threshold2" ng-change="ctrl.render()" ng-model-onblur>
  • - +
  • - +
  • @@ -173,20 +173,20 @@ Legend
  • - +
  • - +
  • - +
  • Side width
  • + ng-model="ctrl.panel.legend.sideWidth" ng-change="ctrl.render()" ng-model-onblur>
  • @@ -197,10 +197,10 @@ Hide series
  • - +
  • - +
  • @@ -212,26 +212,26 @@ Values
  • - +
  • - +
  • - +
  • - +
  • - +
  • Decimals
  • + ng-model="ctrl.panel.decimals" ng-change="ctrl.render()" ng-model-onblur>
  • diff --git a/public/app/plugins/panel/graph/legend.js b/public/app/plugins/panel/graph/legend.js index cf64d90414b..67b2dd525d0 100644 --- a/public/app/plugins/panel/graph/legend.js +++ b/public/app/plugins/panel/graph/legend.js @@ -8,7 +8,7 @@ define([ function (angular, _, $) { 'use strict'; - var module = angular.module('grafana.panels.graph'); + var module = angular.module('grafana.directives'); module.directive('graphLegend', function(popoverSrv) { @@ -16,13 +16,14 @@ function (angular, _, $) { link: function(scope, elem) { var $container = $('
    '); var firstRender = true; - var panel = scope.panel; + var ctrl = scope.ctrl; + var panel = ctrl.panel; var data; var seriesList; var i; scope.$on('render', function() { - data = scope.seriesList; + data = ctrl.seriesList; if (data) { render(); } @@ -54,7 +55,7 @@ function (angular, _, $) { var el = $(e.currentTarget); var index = getSeriesIndexForElement(el); var seriesInfo = seriesList[index]; - scope.toggleSeries(seriesInfo, e); + ctrl.toggleSeries(seriesInfo, e); } function sortLegend(e) { @@ -148,7 +149,7 @@ function (angular, _, $) { var html = '
    '; html += '
    '; html += ''; diff --git a/public/app/plugins/panel/graph/legend.popover.html b/public/app/plugins/panel/graph/legend.popover.html index 5410af2d1d1..e2b85a8dab4 100644 --- a/public/app/plugins/panel/graph/legend.popover.html +++ b/public/app/plugins/panel/graph/legend.popover.html @@ -3,12 +3,12 @@
    - -
    -   + ng-click="ctrl.changeSeriesColor(series, color);dismiss();"> 
    diff --git a/public/app/plugins/panel/graph/module.html b/public/app/plugins/panel/graph/module.html index 66d77a4ae53..4fa5f263210 100644 --- a/public/app/plugins/panel/graph/module.html +++ b/public/app/plugins/panel/graph/module.html @@ -1,4 +1,4 @@ -
    +
    @@ -8,12 +8,12 @@ Datapoints outside time range Can be caused by timezone mismatch between browser and graphite server
    -
    +
    -
    +
    diff --git a/public/app/plugins/panel/graph/module.ts b/public/app/plugins/panel/graph/module.ts index b6a5368c6ac..250b28ff302 100644 --- a/public/app/plugins/panel/graph/module.ts +++ b/public/app/plugins/panel/graph/module.ts @@ -3,6 +3,7 @@ import {PanelDirective} from '../../../features/panel/panel'; import {GraphCtrl} from './graph_ctrl'; import './graph'; +import './legend'; class GraphPanel extends PanelDirective { controller = GraphCtrl;