Skip to content

Commit

Permalink
Show zero average or consumption, too
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Apr 13, 2017
1 parent eb276a2 commit ab01913
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/js/entity.js
Expand Up @@ -729,14 +729,14 @@ Entity.prototype.updateDOMRow = function() {
$('.max', row)
.text(vz.wui.formatNumber(this.data.max[1], unit))
.attr('title', $.plot.formatDate(new Date(this.data.max[0]), '%d. %b %y %H:%M:%S', vz.options.monthNames, vz.options.dayNames, true));
if (this.data.average)
if (this.data.average !== null)
$('.average', row)
.text(vz.wui.formatNumber(this.data.average, unit));
if (this.data.tuples && this.data.tuples.length > 0)
$('.last', row)
.text(vz.wui.formatNumber(this.data.tuples[this.data.tuples.length-1][1], unit));

if (this.data.consumption) {
if (this.data.consumption !== null) {
var consumptionUnit = vz.wui.formatConsumptionUnit(unit);
$('.consumption', row)
.text(vz.wui.formatNumber(this.data.consumption, consumptionUnit))
Expand Down

0 comments on commit ab01913

Please sign in to comment.