diff options
author | Egor Tensin <egor@tensin.name> | 2023-12-10 09:42:56 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2023-12-10 09:42:56 +0100 |
commit | 12f32bfb754cf3ae93fa8245b5dd46065135ff83 (patch) | |
tree | 10d24cad0eca344c53e8d76e2c38f4f088814b30 | |
parent | workflows/ci: ditch Bionic (diff) | |
download | linux-status-12f32bfb754cf3ae93fa8245b5dd46065135ff83.tar.gz linux-status-12f32bfb754cf3ae93fa8245b5dd46065135ff83.zip |
html: display container running time, even if unhealthy
-rw-r--r-- | html/index.html | 10 |
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; |