Merge branch 'master' of github.com:robot-tools/iconograph
This commit is contained in:
@@ -28,6 +28,8 @@ def main():
|
|||||||
os.chmod(fh.fileno(), 0o755)
|
os.chmod(fh.fileno(), 0o755)
|
||||||
fh.write("""\
|
fh.write("""\
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
e2fsck -a /persistent
|
||||||
mount -o data=journal,noatime,sync LABEL=PERSISTENT /persistent
|
mount -o data=journal,noatime,sync LABEL=PERSISTENT /persistent
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,10 @@ instance:hover {
|
|||||||
background-color: #ff9900 !important;
|
background-color: #ff9900 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
instance.stale {
|
||||||
|
background-color: rgba(255, 0, 0, 0.4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -185,8 +185,13 @@ ImageController.prototype.onTick_ = function() {
|
|||||||
let now = Math.floor(Date.now() / 1000);
|
let now = Math.floor(Date.now() / 1000);
|
||||||
for (let [type, type_value] of this.image_types_) {
|
for (let [type, type_value] of this.image_types_) {
|
||||||
for (let [instance, instance_value] of type_value.instances) {
|
for (let [instance, instance_value] of type_value.instances) {
|
||||||
instance_value.last_report.innerText =
|
let stale = now - instance_value.last_report_timestamp;
|
||||||
this.formatSeconds_(now - instance_value.last_report_timestamp);
|
instance_value.last_report.innerText = this.formatSeconds_(stale);
|
||||||
|
if (stale < 15) {
|
||||||
|
instance_value.section.classList.remove('stale');
|
||||||
|
} else {
|
||||||
|
instance_value.section.classList.add('stale');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user