Remove all inline event handlers; replace with data-action delegation
Lint / Python (flake8) (push) Successful in 39s
Lint / JS (eslint) (push) Successful in 6s
Security / Python Security (bandit) (push) Successful in 50s
Test / Python Tests (pytest) (push) Successful in 51s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 2s
Lint / Python (flake8) (push) Successful in 39s
Lint / JS (eslint) (push) Successful in 6s
Security / Python Security (bandit) (push) Successful in 50s
Test / Python Tests (pytest) (push) Successful in 51s
Lint / Notify on failure (push) Has been skipped
Lint / Deploy (push) Successful in 2s
- inspector.html: onclick on port blocks, close button, run-diagnostic button, and diag-toggle sections all converted to data-action attributes; single delegated click listener handles all cases + Escape key closes panel - links.html: onclick on panel title headers, Collapse All, Expand All converted to data-action with delegated listener - suppressions.html: onsubmit/onchange wired via addEventListener at init - index.html: onsubmit/onchange on suppress modal form wired at init No behavioural changes — pure event-handling refactor for TDS compliance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
</div>
|
||||
<div class="lt-card">
|
||||
<div class="lt-card-body">
|
||||
<form id="create-suppression-form" onsubmit="createSuppression(event)">
|
||||
<form id="create-suppression-form">
|
||||
<div class="form-row">
|
||||
<div class="lt-form-group">
|
||||
<label class="lt-label" for="s-type">Target Type <span class="required">*</span></label>
|
||||
<select class="lt-select" id="s-type" name="target_type" onchange="onTypeChange()">
|
||||
<select class="lt-select" id="s-type" name="target_type">
|
||||
<option value="host">Host (all interfaces)</option>
|
||||
<option value="interface">Specific Interface</option>
|
||||
<option value="unifi_device">UniFi Device</option>
|
||||
@@ -294,6 +294,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('s-type')?.addEventListener('change', onTypeChange);
|
||||
document.getElementById('create-suppression-form')?.addEventListener('submit', createSuppression);
|
||||
|
||||
document.addEventListener('click', e => {
|
||||
const pill = e.target.closest('#create-suppression-form .pill[data-duration]');
|
||||
if (pill) {
|
||||
|
||||
Reference in New Issue
Block a user