Browse Source

Added padding 0 to uptime on web interface

fastled
Xose Pérez 7 years ago
parent
commit
4de1094eb2
3 changed files with 732 additions and 732 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +731
    -731
      code/espurna/static/index.html.gz.h
  3. +1
    -1
      code/html/custom.js

BIN
code/espurna/data/index.html.gz View File


+ 731
- 731
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 1
- 1
code/html/custom.js View File

@ -539,7 +539,7 @@ function processData(data) {
var minutes = uptime % 60; uptime = parseInt(uptime / 60);
var hours = uptime % 24; uptime = parseInt(uptime / 24);
var days = uptime;
data[key] = days + 'd ' + hours + 'h ' + minutes + 'm ' + seconds + 's';
data[key] = days + 'd ' + ("00" + hours).slice(-2) + 'h ' + ("00" + minutes).slice(-2) + 'm ' + ("00" + seconds).slice(-2) + 's';
}
if (key == "time") data[key] = data[key].replace('T', ' ');


Loading…
Cancel
Save