From d582beef47b247611e4eeadf7bdca7f69c729335 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Thu, 4 Jul 2024 14:10:17 +0200 Subject: ogcp: fix client pill status report Prevent cases where the client pills would stay locked reporting a specific system. Remove pill-* classes instead of text-* classes in function updatePillStatus(). This fixes out-of-sync state representation between sidebar and main section. --- ogcp/static/js/ogcp.js | 2 +- ogcp/templates/base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index 4d69fb6..83fe52d 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -225,7 +225,7 @@ function updatePillStatus(scope, pill) { let link = scope.link let units = 'Mb/s' const pillCls = ['badge-danger', 'badge-success', 'badge-warning', - 'badge-wol', 'badge-light', 'text-linux', 'text-windows']; + 'badge-wol', 'badge-light', 'badge-linux', 'badge-windows']; pill.classList.remove(...pillCls); if (state === 'OPG') { pill.classList.add('badge-warning'); diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html index 902b021..7be19b4 100644 --- a/ogcp/templates/base.html +++ b/ogcp/templates/base.html @@ -108,7 +108,7 @@ - +