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.
master
Alejandro Sirgo Rica 2024-07-04 14:10:17 +02:00 committed by lupoDharkael
parent bb59eb8a54
commit d582beef47
2 changed files with 2 additions and 2 deletions

View File

@ -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');

View File

@ -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=9"></script>
<script src="{{ url_for('static', filename='js/ogcp.js') }}?v=10"></script>
<script>
// error messages