aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2023-12-10 09:42:56 +0100
committerEgor Tensin <egor@tensin.name>2023-12-10 09:42:56 +0100
commit12f32bfb754cf3ae93fa8245b5dd46065135ff83 (patch)
tree10d24cad0eca344c53e8d76e2c38f4f088814b30 /html
parentworkflows/ci: ditch Bionic (diff)
downloadlinux-status-12f32bfb754cf3ae93fa8245b5dd46065135ff83.tar.gz
linux-status-12f32bfb754cf3ae93fa8245b5dd46065135ff83.zip
html: display container running time, even if unhealthy
Diffstat (limited to '')
-rw-r--r--html/index.html10
1 files changed, 4 insertions, 6 deletions
diff --git a/html/index.html b/html/index.html
index c783367..3672cad 100644
--- a/html/index.html
+++ b/html/index.html
@@ -256,12 +256,10 @@ function docker_container_format_status(info) {
result += ` (${info.exit_code})`;
if (info.status == 'running') {
- if (info.health == 'unhealthy') {
- result = 'Up (unhealthy)';
- } else {
- let since = new Date(info.started_at);
- result = `Up ${format_duration(Date.now() - since)}`;
- }
+ let since = new Date(info.started_at);
+ result = `Up ${format_duration(Date.now() - since)}`;
+ if (info.health == 'unhealthy')
+ result = `${result} (unhealthy)`;
}
return result;