mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-06 18:21:46 -07:00
Compare commits
4 Commits
0afd4ae115
...
1bce2e80e8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bce2e80e8 | ||
|
|
1556d74406 | ||
|
|
9b3947cc90 | ||
|
|
18b0309ac4 |
@@ -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>
|
||||
|
||||
2
front/php/templates/language/fr_fr.json
Executable file → Normal file
2
front/php/templates/language/fr_fr.json
Executable file → Normal file
@@ -301,7 +301,7 @@
|
||||
"Gen_Cancel": "Annuler",
|
||||
"Gen_Change": "Changement",
|
||||
"Gen_Copy": "Lancer",
|
||||
"Gen_CopyToClipboard": "",
|
||||
"Gen_CopyToClipboard": "Copier vers le presse-papier",
|
||||
"Gen_DataUpdatedUITakesTime": "OK - cela peut prendre du temps à l'interface pour se mettre à jour si un scan est en cours.",
|
||||
"Gen_Delete": "Supprimer",
|
||||
"Gen_DeleteAll": "Supprimer tous",
|
||||
|
||||
@@ -100,7 +100,7 @@ echo '<div class="box box-solid">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 sysinfo_network_a">' . lang('Systeminfo_Network_IP') . '</div>
|
||||
<div class="col-sm-9 sysinfo_network_b">' . shell_exec("curl https://ifconfig.co") . '</div>
|
||||
<div class="col-sm-9 sysinfo_network_b" id="external-ip">Loading...</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3 sysinfo_network_a">' . lang('Systeminfo_Network_IP_Connection') . '</div>
|
||||
@@ -274,19 +274,35 @@ function renderAvailableIpsTable(allIps, usedIps) {
|
||||
|
||||
// INIT
|
||||
$(document).ready(function() {
|
||||
|
||||
// available IPs
|
||||
fetchUsedIps(usedIps => {
|
||||
const allIps = inferNetworkRange(usedIps);
|
||||
renderAvailableIpsTable(allIps, usedIps);
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
// Available IPs datatable
|
||||
$('#networkTable').DataTable({
|
||||
searching: true,
|
||||
order: [[0, "desc"]],
|
||||
initComplete: function(settings, json) {
|
||||
hideSpinner(); // Called after the DataTable is fully initialized
|
||||
}
|
||||
});
|
||||
searching: true,
|
||||
order: [[0, "desc"]],
|
||||
initComplete: function(settings, json) {
|
||||
hideSpinner(); // Called after the DataTable is fully initialized
|
||||
}
|
||||
});
|
||||
|
||||
// external IP
|
||||
$.ajax({
|
||||
url: 'https://api64.ipify.org?format=json',
|
||||
method: 'GET',
|
||||
timeout: 10000, // 10 seconds timeout
|
||||
success: function (response) {
|
||||
$('#external-ip').text(response.ip);
|
||||
},
|
||||
error: function() {
|
||||
$('#external-ip').text('ERROR');
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user