diff --git a/js/app.js b/js/app.js index 30790b97..7b964c8c 100644 --- a/js/app.js +++ b/js/app.js @@ -13,6 +13,9 @@ app = Sammy('#main', function (sam) { var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[[i]]; }); + Handlebars.registerHelper('humanTime', function(time) { + return Math.round(time) + 's'; + }); // Look for supported type of storage to use diff --git a/views/monitor.ms b/views/monitor.ms index b7a75d64..41979dcc 100644 --- a/views/monitor.ms +++ b/views/monitor.ms @@ -142,7 +142,7 @@ {{#each network.usage}} <h4> {{@key}} - <small>Time since update: {{time_since_update}}</small> + <small>Time since update: {{humanTime time_since_update}}</small> </h4> <table class="table table-condensed"> <tr> @@ -199,7 +199,7 @@ </table> </div> <div class="col-md-6"> - <h4>I/O <small>Time since update: {{ io.time_since_update }}</small></h4> + <h4>I/O <small>Time since update: {{humanTime io.time_since_update }}</small></h4> <table class="table table-condensed"> <tr> <td>Read</td><td>{{humanSize io.read_bytes }}</td>