From 04bbe21a661abcb210e5412920b1ae066ab398d8 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Thu, 14 Nov 2024 08:54:19 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20=E2=80=94=20Show=20only=20not-OK?= =?UTF-8?q?=20domains=20by=20default=20in=20domains=20list,=20to=20reduce?= =?UTF-8?q?=20the=20load=20on=20browser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ argos/server/templates/domains.html | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0efa616..0671f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- 💄 — Show only not-OK domains by default in domains list, to reduce the load on browser + ## 0.5.0 Date: 2024-09-26 diff --git a/argos/server/templates/domains.html b/argos/server/templates/domains.html index 67a1cf4..2e045ac 100644 --- a/argos/server/templates/domains.html +++ b/argos/server/templates/domains.html @@ -16,11 +16,12 @@
  • @@ -36,7 +37,7 @@ {% for (domain, status) in domains %} - + {{ domain }} @@ -65,6 +66,14 @@ document.querySelectorAll('[data-status]').forEach((item) => { item.style.display = null; }) + } else if (e.currentTarget.value === 'not-ok') { + document.querySelectorAll('[data-status]').forEach((item) => { + if (item.dataset.status !== 'ok') { + item.style.display = null; + } else { + item.style.display = 'none'; + } + }) } else { document.querySelectorAll('[data-status]').forEach((item) => { if (item.dataset.status === e.currentTarget.value) {