Commit 6121f523 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

Merge pull request #65 from l4u/hide_invalid_time

Fixes #18 hide time when time data is not retrieved from the redis
parents 7a037f8a fa06fee4
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -11,12 +11,16 @@ var FnordMetric = (function(){
  }

  function formatTimeOfDay(_time){
    if(_time === null) {
      return "";
    } else {
      var time = new Date();
      time.setTime(_time*1000);
      return decPrint(time.getHours()) + ':' +
             decPrint(time.getMinutes()) + ':' +
             decPrint(time.getSeconds());
    }
  }

  function formatTimeRange(range){
    if (range < 60){