From efef026246c6d689144fa7ac17d78762521b8da9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 18 Apr 2021 14:46:29 +0300 Subject: README: badges for all workflows --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 42672bb..2e65a97 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ linux-status ============ [![Test](https://github.com/egor-tensin/linux-status/actions/workflows/test.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/test.yml) +[![Packages (Debian)](https://github.com/egor-tensin/linux-status/actions/workflows/debian.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/debian.yml) +[![Publish (Launchpad)](https://github.com/egor-tensin/linux-status/actions/workflows/ppa.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/ppa.yml) Simple Linux status web page. -- cgit v1.2.3 From f48ae766218ab1b2871dc8c71b54cdc2c3d0151f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 4 May 2021 09:52:38 +0300 Subject: workflows/test: linting --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd96b95..cef056b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,10 +7,10 @@ on: jobs: test: - runs-on: ubuntu-latest strategy: matrix: python-version: [3.6, 3.7, 3.8, 3.9] + runs-on: ubuntu-latest name: 'Python ${{ matrix.python-version }}' steps: - name: Checkout -- cgit v1.2.3 From e47f8bbbe83c9d5d8200e2a1e472bd8507f2dee1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 11 Jun 2021 15:15:09 +0300 Subject: workflows/test: test w/ latest Python --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cef056b..a52c7ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: test: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, 3.x] runs-on: ubuntu-latest name: 'Python ${{ matrix.python-version }}' steps: -- cgit v1.2.3 From 94eeecf4f6772de888c2b877ef901c6a5ee8ba71 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 15 Jun 2021 20:50:38 +0300 Subject: workflows/test -> workflows/ci --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .github/workflows/test.yml | 23 ----------------------- README.md | 2 +- 3 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a52c7ce --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Test + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + test: + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9, 3.x] + runs-on: ubuntu-latest + name: 'Python ${{ matrix.python-version }}' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.python-version }}' + - name: Run tests + run: ./test/test.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a52c7ce..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Test - -on: - push: - pull_request: - workflow_dispatch: - -jobs: - test: - strategy: - matrix: - python-version: [3.6, 3.7, 3.8, 3.9, 3.x] - runs-on: ubuntu-latest - name: 'Python ${{ matrix.python-version }}' - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '${{ matrix.python-version }}' - - name: Run tests - run: ./test/test.sh diff --git a/README.md b/README.md index 2e65a97..09cfd97 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ linux-status ============ -[![Test](https://github.com/egor-tensin/linux-status/actions/workflows/test.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/test.yml) +[![CI](https://github.com/egor-tensin/linux-status/actions/workflows/ci.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/ci.yml) [![Packages (Debian)](https://github.com/egor-tensin/linux-status/actions/workflows/debian.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/debian.yml) [![Publish (Launchpad)](https://github.com/egor-tensin/linux-status/actions/workflows/ppa.yml/badge.svg)](https://github.com/egor-tensin/linux-status/actions/workflows/ppa.yml) -- cgit v1.2.3 From 60c686ae3d567980ddd181e8673b77328fdfae39 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 15 Jun 2021 20:51:04 +0300 Subject: workflows/ci: rename to "CI" --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a52c7ce..f0e1d49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Test +name: CI on: push: -- cgit v1.2.3 From b99a762a5011c0efccd8d2a3b03ce2afa7489f46 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 3 Oct 2021 17:50:34 +0300 Subject: index.html: safer DOM generation using jQuery I learned how to do it, currently evaluating if it's actually safer and maintanable. --- index.html | 62 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/index.html b/index.html index 0c2911a..7c8c542 100644 --- a/index.html +++ b/index.html @@ -111,39 +111,43 @@ function set_system(data) { var users = []; +function create_user_block(name, lbl, cmd) { + let pre_id = `${lbl}_user_${name}`; + let collapse_id = `collapse_${pre_id}`; + let button_params = { + 'class': 'btn btn-outline-primary btn-sm button-expand', + 'data-toggle': 'collapse', + 'data-target': '#' + collapse_id + }; + let a_params = { + href: '#' + collapse_id, + 'data-toggle': 'collapse' + }; + return $(' - -`; - $('#users').append(text); + let container = $('
', {'class': 'row', id: 'user_' + name}) + .append($('
', {'class': 'col'}) + .append($('

').text(name)) + .append($('
')) + .append(create_user_block(name, 'failed', 'systemctl --user list-units --failed')) + .append(create_user_block(name, 'overview', 'systemctl --user status')) + .append(create_user_block(name, 'timers', 'systemctl --user list-timers --all')) + .append(create_user_block(name, 'journal', 'journalctl --user -b --lines=20'))); + + $('#users').append(container); + $('#collapse_failed_user_' + name).addClass('show'); users.push(name); } -- cgit v1.2.3