From 6560fc9d05506df441f66872c6e01ac58ff04975 Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 23 Aug 2013 14:12:13 +0200 Subject: [PATCH] display gauges as well --- src/main/webapp/js/directives.js | 11 +++++++++++ src/main/webapp/templates/_metrics.gauge.html | 4 ++++ src/main/webapp/templates/admin.metrics.html | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 src/main/webapp/templates/_metrics.gauge.html diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js index 5bdc76e2..8906ec0c 100644 --- a/src/main/webapp/js/directives.js +++ b/src/main/webapp/js/directives.js @@ -418,4 +418,15 @@ module.directive('metricMeter', function() { restrict : 'E', templateUrl : 'templates/_metrics.meter.html' }; +}); + +module.directive('metricGauge', function() { + return { + scope : { + metric : '=', + label : '=' + }, + restrict : 'E', + templateUrl : 'templates/_metrics.gauge.html' + }; }); \ No newline at end of file diff --git a/src/main/webapp/templates/_metrics.gauge.html b/src/main/webapp/templates/_metrics.gauge.html new file mode 100644 index 00000000..f9b3dddc --- /dev/null +++ b/src/main/webapp/templates/_metrics.gauge.html @@ -0,0 +1,4 @@ +
+ {{label}} + {{metric.value}} +
\ No newline at end of file diff --git a/src/main/webapp/templates/admin.metrics.html b/src/main/webapp/templates/admin.metrics.html index d396bba5..908f25d4 100644 --- a/src/main/webapp/templates/admin.metrics.html +++ b/src/main/webapp/templates/admin.metrics.html @@ -4,4 +4,10 @@ + + + + + + \ No newline at end of file