From 61b18a53f7c26f5d3f18aef15afda4a7178a7726 Mon Sep 17 00:00:00 2001 From: Shannon Carey Date: Sun, 26 Mar 2017 21:31:02 -0500 Subject: [PATCH] Various improvements to views - Added formatting of numbers based on locale. For example, large numbers may be shown with thousands separators (much easier to read). - Added time zone to places where times are displayed, so that users are not confused about what time they're looking at. - Added help tooltip about the Check's target and from/until (from/until is not self-explanatory) - Made all references to "Warn level" and "Error level" consistent (previously was different only in the edit modal) --- .../main/webapp/css/override-bootstrap.css | 4 +++ seyren-web/src/main/webapp/html/check.html | 20 +++++------ seyren-web/src/main/webapp/html/checks.html | 8 ++--- .../main/webapp/html/modal-partial-check.html | 36 ++++++++++--------- .../main/webapp/js/check-edit-controller.js | 13 +++++++ 5 files changed, 51 insertions(+), 30 deletions(-) diff --git a/seyren-web/src/main/webapp/css/override-bootstrap.css b/seyren-web/src/main/webapp/css/override-bootstrap.css index 8399ea3f..d829ae0d 100644 --- a/seyren-web/src/main/webapp/css/override-bootstrap.css +++ b/seyren-web/src/main/webapp/css/override-bootstrap.css @@ -53,3 +53,7 @@ body { padding-right: 10px; padding-left: 10px; } + +.glyphicon-blue { + color: #0000bf; +} \ No newline at end of file diff --git a/seyren-web/src/main/webapp/html/check.html b/seyren-web/src/main/webapp/html/check.html index 95fff17e..0e362955 100644 --- a/seyren-web/src/main/webapp/html/check.html +++ b/seyren-web/src/main/webapp/html/check.html @@ -67,15 +67,15 @@

Details [
- +
-

{{check.warn}}

+

{{check.warn | number}}

- +
-

{{check.error}}

+

{{check.error | number}}

@@ -205,12 +205,12 @@

- {{ alert.timestamp | date: 'yyyy-MM-dd HH:mm:ss' }} + {{ alert.timestamp | date: 'yyyy-MM-dd HH:mm:ssZ' }} {{ alert.target }} - {{ alert.value }} - {{ alert.warn }} - {{ alert.error }} + {{ alert.value | number }} + {{ alert.warn | number }} + {{ alert.error | number }} {{ alert.fromType }} {{ alert.fromType }} @@ -233,7 +233,7 @@

- +
diff --git a/seyren-web/src/main/webapp/html/checks.html b/seyren-web/src/main/webapp/html/checks.html index 42bfeeee..0501522e 100755 --- a/seyren-web/src/main/webapp/html/checks.html +++ b/seyren-web/src/main/webapp/html/checks.html @@ -21,8 +21,8 @@

Checks

Name State - Warn - Error + Warn level + Error level Enabled @@ -38,8 +38,8 @@

Checks

{{ check.state }} {{ check.state }} - {{ check.warn }} - {{ check.error }} + {{ check.warn | number }} + {{ check.error | number }} diff --git a/seyren-web/src/main/webapp/html/modal-partial-check.html b/seyren-web/src/main/webapp/html/modal-partial-check.html index 55366a8d..bdb5e461 100644 --- a/seyren-web/src/main/webapp/html/modal-partial-check.html +++ b/seyren-web/src/main/webapp/html/modal-partial-check.html @@ -10,46 +10,50 @@
-
+
-
- +
+
- -
-
- -
+ +
-
+
- -
+ +
-
- -
-
+
@@ -78,7 +82,7 @@
-
+
Metrics found: {{ check.totalMetric }}
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..fa6091cf 100644 --- a/seyren-web/src/main/webapp/js/check-edit-controller.js +++ b/seyren-web/src/main/webapp/js/check-edit-controller.js @@ -18,10 +18,23 @@ $('#editCheckModal').on('shown.bs.modal', function () { $('#check\\.name').focus(); + $('#check\\.target\\.hint').tooltip({ + placement: 'right', + title: 'The target parameter specifies a path identifying one or several metrics, optionally with functions acting on those metrics.' + }); $('#check\\.warn\\.hint').tooltip({ 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\\.from\\.hint').tooltip({ + placement: 'right', + html: true, + title: '"From" and "To" are optional parameters that specify the relative or absolute time period to' + + ' retrieve from the server. See ' + + 'the Graphite' + + ' documentation. Only the most recent value of each series returned will be used.', + trigger: 'click' + }); }); $scope.create = function () {