From 4f2bb474ec92698fed8a203b9b5f20783cb9b3d6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 1 Dec 2023 20:15:18 +0100 Subject: workflows/ci: ditch Bionic It was (or about to be) retired by GitHub Actions, so it's time to say goodbye. --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71227f3..1725bcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,8 @@ jobs: test: strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] - # Unpin when this is fixed: - # https://github.com/actions/setup-python/issues/544 - runs-on: ubuntu-20.04 + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.x'] + runs-on: ubuntu-latest name: 'Python ${{ matrix.python-version }}' steps: - name: Checkout -- cgit v1.2.3 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 From 33e0201c3f1831dc6384a88777b37d625fb0630b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 10 Dec 2023 09:45:17 +0100 Subject: html: add a comment with a reference link --- html/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/index.html b/html/index.html index 3672cad..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; -- cgit v1.2.3 From 488a3ab7b2c009080043e79002de7540aadaeb2a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 10 Dec 2023 09:47:36 +0100 Subject: switch to egor@tensin.name --- LICENSE.txt | 2 +- src/app.py | 2 +- src/server.py | 2 +- test/test.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 977fc1d..75a9d1a 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Egor Tensin +Copyright (c) 2018 Egor Tensin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/app.py b/src/app.py index 4d23f36..8dd3b86 100755 --- a/src/app.py +++ b/src/app.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2021 Egor Tensin +# Copyright (c) 2021 Egor Tensin # This file is part of the "linux-status" project. # For details, see https://github.com/egor-tensin/linux-status. # Distributed under the MIT License. diff --git a/src/server.py b/src/server.py index 64b6d47..4b32893 100755 --- a/src/server.py +++ b/src/server.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2021 Egor Tensin +# Copyright (c) 2021 Egor Tensin # This file is part of the "linux-status" project. # For details, see https://github.com/egor-tensin/linux-status. # Distributed under the MIT License. diff --git a/test/test.sh b/test/test.sh index c6366f7..194f396 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021 Egor Tensin +# Copyright (c) 2021 Egor Tensin # This file is part of the "linux-status" project. # For details, see https://github.com/egor-tensin/linux-status. # Distributed under the MIT License. -- cgit v1.2.3