diff options
-rw-r--r-- | .github/workflows/ci.yml | 6 | ||||
-rw-r--r-- | LICENSE.txt | 2 | ||||
-rw-r--r-- | html/index.html | 14 | ||||
-rwxr-xr-x | src/app.py | 2 | ||||
-rwxr-xr-x | src/server.py | 2 | ||||
-rwxr-xr-x | test/test.sh | 2 |
6 files changed, 14 insertions, 14 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 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 <Egor.Tensin@gmail.com> +Copyright (c) 2018 Egor Tensin <egor@tensin.name> 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/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; @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2021 Egor Tensin <Egor.Tensin@gmail.com> +# Copyright (c) 2021 Egor Tensin <egor@tensin.name> # 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 <Egor.Tensin@gmail.com> +# Copyright (c) 2021 Egor Tensin <egor@tensin.name> # 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 <Egor.Tensin@gmail.com> +# Copyright (c) 2021 Egor Tensin <egor@tensin.name> # This file is part of the "linux-status" project. # For details, see https://github.com/egor-tensin/linux-status. # Distributed under the MIT License. |