mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-15 22:51:37 -07:00
device tools init loading #1130
This commit is contained in:
@@ -323,6 +323,10 @@ scrape_configs:
|
|||||||
credentials: <API_TOKEN>
|
credentials: <API_TOKEN>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Grafana template
|
||||||
|
|
||||||
|
Grafana template sample: [Download json](./samples/API/Grafana_Dashboard.json)
|
||||||
|
|
||||||
## API Endpoint: /log files
|
## API Endpoint: /log files
|
||||||
|
|
||||||
This API endpoint retrieves files from the `/app/log` folder.
|
This API endpoint retrieves files from the `/app/log` folder.
|
||||||
|
|||||||
Executable
+1162
File diff suppressed because it is too large
Load Diff
@@ -443,6 +443,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// init first time
|
// init first time
|
||||||
|
// -----------------------------------------------------------
|
||||||
|
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();
|
initNmapButtons();
|
||||||
initCopyFromDevice();
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user