summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-23 11:57:49 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-25 09:48:12 +0200
commitc5a8c82b35704d2c7f1bb567095708d2c88169a1 (patch)
tree3a0805f71e8baf4d08472953c222c0c2ba31067f /ogcp
parent6628d93d8684d1fd8f8bc2c60f83d6045b503ac0 (diff)
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.
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/static/js/ogcp.js4
-rw-r--r--ogcp/templates/base.html2
2 files changed, 4 insertions, 2 deletions
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('<b name="link"><br>' + link + ' ' + units + '</b>');
+ $(pill).append('<div name="link"><b ' + linkClasses + '>' + link + ' ' + units + '</b></div>');
}
}
diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html
index ead7642..fad931a 100644
--- a/ogcp/templates/base.html
+++ b/ogcp/templates/base.html
@@ -108,7 +108,7 @@
<!-- ChartJS -->
<script src="{{ url_for('static', filename='AdminLTE/plugins/chart.js/Chart.min.js') }}"></script>
- <script src="{{ url_for('static', filename='js/ogcp.js') }}?v=12"></script>
+ <script src="{{ url_for('static', filename='js/ogcp.js') }}?v=13"></script>
<script>
// error messages