lib/riemann/dash/public/views/gauge.js in riemann-dash-0.2.1 vs lib/riemann/dash/public/views/gauge.js in riemann-dash-0.2.3

- old
+ new

@@ -47,15 +47,18 @@ title: this.title, query: this.query }); } + var editTemplate = _.template( + "<label for='title'>Title</label>" + + "<input type='text' name='title' value='{{title}}' /><br />" + + "<label for='query'>Query</label>" + + "<input type='text' name='query' value='{{query}}' />" + ) + Gauge.prototype.editForm = function() { - return Mustache.render('<label for="title">Title</label>' + - '<input type="text" name="title" value="{{title}}" /><br />' + - '<label for="query">Query</label>' + - '<input type="text" name="query" value="{{query}}" />', - this) + return editTemplate(this); } Gauge.prototype.reflow = function() { // Size metric var value = this.el.find('.value');