Cancel in-flight diagnostic poll when user selects a new port
Lint / Python (flake8) (push) Successful in 45s
Lint / JS (eslint) (push) Successful in 10s
Security / Python Security (bandit) (push) Successful in 52s
Test / Python Tests (pytest) (push) Successful in 1m2s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 2s
Lint / Python (flake8) (push) Successful in 45s
Lint / JS (eslint) (push) Successful in 10s
Security / Python Security (bandit) (push) Successful in 52s
Test / Python Tests (pytest) (push) Successful in 1m2s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 2s
Previously switching ports while a diagnostic was running left the setInterval timer active, causing the result to be written into the old (now detached) DOM elements and never shown to the user. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -218,6 +218,7 @@ let _apiData = null;
|
|||||||
function selectPort(el) {
|
function selectPort(el) {
|
||||||
const swName = el.dataset.switch;
|
const swName = el.dataset.switch;
|
||||||
const idx = parseInt(el.dataset.portIdx, 10);
|
const idx = parseInt(el.dataset.portIdx, 10);
|
||||||
|
if (_diagPollTimer) { clearInterval(_diagPollTimer); _diagPollTimer = null; }
|
||||||
document.querySelectorAll('.switch-port-block.selected')
|
document.querySelectorAll('.switch-port-block.selected')
|
||||||
.forEach(e => e.classList.remove('selected'));
|
.forEach(e => e.classList.remove('selected'));
|
||||||
el.classList.add('selected');
|
el.classList.add('selected');
|
||||||
|
|||||||
Reference in New Issue
Block a user