mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
device tools init loading #1130
This commit is contained in:
@@ -323,6 +323,10 @@ scrape_configs:
|
||||
credentials: <API_TOKEN>
|
||||
```
|
||||
|
||||
### Grafana template
|
||||
|
||||
Grafana template sample: [Download json](./samples/API/Grafana_Dashboard.json)
|
||||
|
||||
## API Endpoint: /log files
|
||||
|
||||
This API endpoint retrieves files from the `/app/log` folder.
|
||||
|
||||
1162
docs/samples/API/Grafana_Dashboard.json
Executable file
1162
docs/samples/API/Grafana_Dashboard.json
Executable file
File diff suppressed because it is too large
Load Diff
@@ -443,6 +443,37 @@
|
||||
}
|
||||
|
||||
// init first time
|
||||
initNmapButtons();
|
||||
initCopyFromDevice();
|
||||
// -----------------------------------------------------------
|
||||
var toolsPageInitialized = false;
|
||||
|
||||
function initDeviceToolsPage()
|
||||
{
|
||||
// Only proceed if .panTools is visible
|
||||
if (!$('#panTools:visible').length) {
|
||||
return; // exit early if nothing is visible
|
||||
}
|
||||
|
||||
// init page once
|
||||
if (toolsPageInitialized) return;
|
||||
toolsPageInitialized = true;
|
||||
|
||||
initNmapButtons();
|
||||
initCopyFromDevice();
|
||||
|
||||
hideSpinner();
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Recurring function to monitor the URL and reinitialize if needed
|
||||
function deviceToolsPageUpdater() {
|
||||
initDeviceToolsPage();
|
||||
|
||||
// Run updater again after delay
|
||||
setTimeout(deviceToolsPageUpdater, 200);
|
||||
}
|
||||
|
||||
// start updater
|
||||
deviceToolsPageUpdater();
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user