aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html/index.html
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2023-12-10 09:05:19 +0000
committerEgor Tensin <egor@tensin.name>2023-12-10 09:05:19 +0000
commit6a4710168b57f2c05f4281b51736b62a4b6ea0aa (patch)
treee9bb21c9c822d7132598d3f2b4ac142a6f73f31b /html/index.html
parentdebian: switch to egor@tensin.name (diff)
parentswitch to egor@tensin.name (diff)
downloadlinux-status-6a4710168b57f2c05f4281b51736b62a4b6ea0aa.tar.gz
linux-status-6a4710168b57f2c05f4281b51736b62a4b6ea0aa.zip
Merge tag 'v2.4.5' into debian
Diffstat (limited to '')
-rw-r--r--html/index.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/html/index.html b/html/index.html
index c783367..f8f599c 100644
--- a/html/index.html
+++ b/html/index.html
@@ -238,6 +238,10 @@ function loop_top() {
$('#top_refresh_interval').text(top_refresh_interval_seconds);
}
+// Container's State.Status field values are described in the API reference:
+//
+// https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect
+//
function docker_container_is_ok(info) {
if (info.status == 'restarting' || info.status == 'dead')
return false;
@@ -256,12 +260,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;