diff --git a/src/app/directives/dropdown.typeahead.js b/src/app/directives/dropdown.typeahead.js
index e62663fee8f..56203ee3c6f 100644
--- a/src/app/directives/dropdown.typeahead.js
+++ b/src/app/directives/dropdown.typeahead.js
@@ -37,7 +37,7 @@ function (angular, app, _, $) {
if (attrs.ngModel) {
$scope.$watch('model', function(newValue) {
- _.each($scope.menuItems, function(item){
+ _.each($scope.menuItems, function(item) {
_.each(item.submenu, function(subItem) {
if (subItem.value === newValue) {
$button.html(subItem.text);
diff --git a/src/app/directives/ngModelOnBlur.js b/src/app/directives/ngModelOnBlur.js
index 0e9d94a282e..1aea09f9dc8 100644
--- a/src/app/directives/ngModelOnBlur.js
+++ b/src/app/directives/ngModelOnBlur.js
@@ -22,5 +22,17 @@ function (angular) {
});
}
};
+ })
+ .directive('emptyToNull', function () {
+ return {
+ restrict: 'A',
+ require: 'ngModel',
+ link: function (scope, elm, attrs, ctrl) {
+ ctrl.$parsers.push(function (viewValue) {
+ if(viewValue === "") { return null; }
+ return viewValue;
+ });
+ }
+ };
});
});
diff --git a/src/app/panels/graph/axisEditor.html b/src/app/panels/graph/axisEditor.html
index 90e3f5c9a68..151f40f264d 100644
--- a/src/app/panels/graph/axisEditor.html
+++ b/src/app/panels/graph/axisEditor.html
@@ -19,19 +19,24 @@
Grid Max
-
+
Min
-
+
Label
-
+
Show
@@ -56,19 +61,24 @@
Grid Max
-
+
Min
-
+
Label
-
+
Show
diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js
index f05c609bdb1..5fbc3a76e6b 100644
--- a/src/app/panels/graph/module.js
+++ b/src/app/panels/graph/module.js
@@ -268,11 +268,6 @@ function (angular, app, $, _, kbn, moment, TimeSeries, PanelMeta) {
$scope.render();
};
- $scope.toggleGridMinMax = function(key) {
- $scope.panel.grid[key] = _.toggle($scope.panel.grid[key], null, 0);
- $scope.render();
- };
-
$scope.addSeriesOverride = function(override) {
$scope.panel.seriesOverrides.push(override || {});
};
diff --git a/src/test/specs/seriesOverridesCtrl-specs.js b/src/test/specs/seriesOverridesCtrl-specs.js
index 0542e613a34..ec7cc70159c 100644
--- a/src/test/specs/seriesOverridesCtrl-specs.js
+++ b/src/test/specs/seriesOverridesCtrl-specs.js
@@ -16,15 +16,9 @@ define([
ctx.scope.render = function() {};
});
- describe('Controller should init overrideMenu', function() {
- it('click should include option and value index', function() {
- expect(ctx.scope.overrideMenu[1].submenu[1].click).to.be('menuItemSelected(1,1)');
- });
- });
-
describe('When setting an override', function() {
beforeEach(function() {
- ctx.scope.setOverride(1, 0);
+ ctx.scope.setOverride({propertyName: 'lines'}, {value: true});
});
it('should set override property', function() {