From c5a8c82b35704d2c7f1bb567095708d2c88169a1 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 23 Jul 2024 11:57:49 +0200 Subject: js: add red highlight to slow client link speed in client pills Add a red inner pill to the link speed value when the speed is lower than 1Gb/s. --- ogcp/static/js/ogcp.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ogcp/static') diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index 0dccd57..548122b 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -258,11 +258,13 @@ function updatePillStatus(scope, pill) { $('[name="link"]', pill).remove() if (link) { + let linkClasses = 'class="badge-danger badge-pill"'; if (link >= 1000) { link = link / 1000 units = 'Gb/s' + linkClasses = ''; } - $(pill).append('
' + link + ' ' + units + '
'); + $(pill).append('
' + link + ' ' + units + '
'); } } -- cgit v1.2.3-18-g5258