diff --git a/lib/riemann/dash/public/views/gauge.js b/lib/riemann/dash/public/views/gauge.js
index 92a88e0..1af016f 100644
--- a/lib/riemann/dash/public/views/gauge.js
+++ b/lib/riemann/dash/public/views/gauge.js
@@ -5,6 +5,7 @@
view.View.call(this, json);
this.query = json.query;
this.title = json.title;
+ this.commaSeperateThousands = json.commaSeperateThousands;
this.clickFocusable = true;
this.el.addClass('gauge');
this.el.append(
@@ -23,7 +24,7 @@
var value = this.el.find('.value');
this.sub = subs.subscribe(this.query, function(e) {
me.box.attr('class', 'box state ' + e.state);
- value.text(format.float(e.metric));
+ value.text(format.float(e.metric, 2, me.commaSeperateThousands));
value.attr('title', e.description);
// The first time, do a full-height reflow.
@@ -45,7 +46,8 @@
return $.extend(view.View.prototype.json.call(this), {
type: 'Gauge',
title: this.title,
- query: this.query
+ query: this.query,
+ commaSeperateThousands: this.commaSeperateThousands
});
}
@@ -53,7 +55,9 @@
"" +
"
" +
"" +
- '' );
+ '' +
+ "" +
+ "" );
Gauge.prototype.editForm = function() {
return editTemplate(this);