Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactoring ui

  • Loading branch information...
commit eac83e1ce183eb32a3da72789ebc0eccb515d756 1 parent f3d8952
@jeffsu authored
View
1  www/htime.ms
@@ -30,7 +30,6 @@ export class HumanTime {
var ret = [];
foreach (var v:i in VALS) {
var amount = Math.floor(ms / v);
- console.log(UNITS[i], ms / v, ms, v);
ms -= amount * v;
if (amount > 0 || i == 3) ret.push(amount + UNITS[i]);
}
View
3  www/views/_services.jade
@@ -2,7 +2,7 @@ table.table.table-condensed.table-bordered
tr.success
th Service
th Sensor
- th Status
+ th(colspan=2) Status
th Pass/Total
th Last Pass
th Last Failure
@@ -22,6 +22,7 @@ table.table.table-condensed.table-bordered
td(style="padding-left: 20px"): a(href="/services/#{sname}/sensors/#{name}?time=min")= name
td
!= health(sensor.isHealthy)
+ td
span.inlinesparkline= sensor.getAvgResponse('hour').join(',');
td #{sensor.passCount}/#{sensor.totalCount}
td= htime.humanizeAgo(sensor.lastPass);
View
8 www/views/sensor.jade
@@ -27,14 +27,10 @@ block content
tr
th Uptime
td
- | Total: #{sensor.getUpTime()}ms
- if sensor.isHealthy
- | since #{(new Date).getTime() - sensor.lastChange}ms ago
+ | #{htime.humanize(sensor.getUpTime())}
th Downtime
td
- | Total: #{sensor.getDownTime()}ms
- unless sensor.isHealthy
- | since #{(new Date).getTime() - sensor.lastChange}ms ago
+ | #{htime.humanize(sensor.getDownTime())}
tr
td(colspan=4)= "Options: " + JSON.stringify(sensor.options);
Please sign in to comment.
Something went wrong with that request. Please try again.