diff --git a/seyren-web/src/main/webapp/js/check-edit-controller.js b/seyren-web/src/main/webapp/js/check-edit-controller.js
index 9b64224b..389b282f 100644
--- a/seyren-web/src/main/webapp/js/check-edit-controller.js
+++ b/seyren-web/src/main/webapp/js/check-edit-controller.js
@@ -13,7 +13,8 @@
enabled: true,
live: false,
allowNoData: false,
- totalMetric: '-'
+ totalMetric: '-',
+ graphiteSourceUrl: null
};
$('#editCheckModal').on('shown.bs.modal', function () {
@@ -22,6 +23,10 @@
placement: 'right',
title: 'Setting your warn level higher than your error level will result in Seyren generating alerts when the target value goes below the threshold.'
});
+ $('#check\\.graphiteSourceUrl\\.hint').tooltip({
+ placement: 'right',
+ title: 'In this field you can define a different graphite source than the default.'
+ });
});
$scope.create = function () {
@@ -70,7 +75,6 @@
}
});
-
$scope.$watch('check.target', function(value) {
if (value) {
Metrics.totalMetric({target: value}, function (data) {
@@ -81,7 +85,5 @@
});
}
});
-
});
-
}());
diff --git a/seyren-web/src/main/webapp/js/home-controller.js b/seyren-web/src/main/webapp/js/home-controller.js
index 1e3ed788..4f81d3ed 100755
--- a/seyren-web/src/main/webapp/js/home-controller.js
+++ b/seyren-web/src/main/webapp/js/home-controller.js
@@ -2,7 +2,7 @@
(function () {
'use strict';
- seyrenApp.controller('HomeController', function HomeController($scope, $rootScope, $location, Checks, Alerts, Seyren) {
+ seyrenApp.controller('HomeController', function HomeController($scope, $rootScope, $location, Checks, Alerts) {
$scope.pollAlertsInSeconds = 5;
$scope.checkNames = {};
@@ -45,10 +45,6 @@
});
};
- $scope.swapCheckEnabled = function (check) {
- Seyren.swapCheckEnabled(check);
- };
-
$scope.countdownToRefresh = function () {
$scope.loadUnhealthyChecks();
$scope.loadAlertStream();
diff --git a/seyren-web/src/main/webapp/js/services.js b/seyren-web/src/main/webapp/js/services.js
index f541c467..cf24116a 100644
--- a/seyren-web/src/main/webapp/js/services.js
+++ b/seyren-web/src/main/webapp/js/services.js
@@ -92,6 +92,10 @@
if (chart.uniq) {
result += '&uniq=' + chart.uniq;
}
+ if (chart.graphiteSourceUrl) {
+ result += '&graphiteSourceUrl=' + chart.graphiteSourceUrl;
+ }
+
return result;
};
return {
@@ -103,7 +107,8 @@
height: 70,
warn: check.warn,
error: check.error,
- hideLegend: true
+ hideLegend: true,
+ graphiteSourceUrl: check.graphiteSourceUrl
});
}
},