Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c52e4ad1a | |||
| 156ef97667 | |||
| 2f74266bd9 |
@@ -970,6 +970,7 @@ class NetworkMonitor:
|
||||
except Exception as e:
|
||||
logger.error(f'Monitor loop error: {e}', exc_info=True)
|
||||
time.sleep(30)
|
||||
continue
|
||||
|
||||
time.sleep(self.poll_interval)
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
{% block scripts %}
|
||||
<script>
|
||||
// Start auto-refresh using saved settings interval (default 30 s)
|
||||
const _savedInterval = (window.gandalfSettings && window.gandalfSettings.refreshInterval) || 30;
|
||||
const _savedInterval = window.gandalfSettings?.refreshInterval ?? 30;
|
||||
if (_savedInterval > 0) lt.autoRefresh.start(refreshAll, _savedInterval * 1000);
|
||||
|
||||
// When settings change, restart auto-refresh with new interval
|
||||
|
||||
@@ -473,7 +473,7 @@ async function loadInspector() {
|
||||
}
|
||||
|
||||
loadInspector();
|
||||
const _inspInterval = (window.gandalfSettings && window.gandalfSettings.refreshInterval) || 60;
|
||||
const _inspInterval = window.gandalfSettings?.refreshInterval ?? 60;
|
||||
if (_inspInterval > 0) lt.autoRefresh.start(loadInspector, Math.max(_inspInterval, 15) * 1000);
|
||||
|
||||
window.onGandalfSettingsChanged = function(s) {
|
||||
|
||||
@@ -571,7 +571,7 @@ async function loadLinks() {
|
||||
}
|
||||
|
||||
loadLinks();
|
||||
const _linksInterval = (window.gandalfSettings && window.gandalfSettings.refreshInterval) || 60;
|
||||
const _linksInterval = window.gandalfSettings?.refreshInterval ?? 60;
|
||||
if (_linksInterval > 0) lt.autoRefresh.start(loadLinks, Math.max(_linksInterval, 15) * 1000);
|
||||
|
||||
window.onGandalfSettingsChanged = function(s) {
|
||||
|
||||
@@ -36,6 +36,12 @@ class TestBuildSshCommand:
|
||||
cmd = DiagnosticsRunner.build_ssh_command('10.0.0.1', 'eth0')
|
||||
assert 'ethtool' in cmd
|
||||
|
||||
def test_dmesg_uses_fixed_string_grep(self):
|
||||
# grep -F prevents iface names with dots (e.g. eth0.1) being treated as
|
||||
# regex wildcards; -- prevents leading - from being parsed as a flag
|
||||
cmd = DiagnosticsRunner.build_ssh_command('10.0.0.1', 'eth0')
|
||||
assert 'grep -F --' in cmd
|
||||
|
||||
|
||||
# ── parse_output ─────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user