From 12f32bfb754cf3ae93fa8245b5dd46065135ff83 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 10 Dec 2023 09:42:56 +0100 Subject: html: display container running time, even if unhealthy --- html/index.html | 10 ++++------ 1 file 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; -- cgit v1.2.3