docs, has_update_devices fix, docs

This commit is contained in:
jokob-sk
2025-06-07 09:00:56 +10:00
parent 7940038728
commit 5676b50d5d
9 changed files with 30 additions and 8 deletions

View File

@@ -2,15 +2,15 @@
Get **NetAlertX** up and running in a few simple steps.
---
### 1. Configure Scanner Plugin(s)
> [!TIP]
> Enable additional plugins under **Settings → `LOADED_PLUGINS`**.
> Make sure to **save** your changes and **reload the page** to activate them.
> ![Loaded plugins settings](./img/PLUGINS/loaded_plugins_setting.png)
---
### 1. Configure Scanner Plugin(s)
**Initial configuration**: `ARPSCAN`, `INTRNT`
> [!NOTE]
@@ -31,6 +31,8 @@ Get **NetAlertX** up and running in a few simple steps.
### 3. Set Up a Network Topology Diagram
![Network tree](./img/NETWORK_TREE/Network_tree_details.png)
**Initial configuration**: The app auto-selects a root node (MAC `internet`) and attempts to identify other network devices by vendor or name.
> [!NOTE]
@@ -41,6 +43,8 @@ Get **NetAlertX** up and running in a few simple steps.
### 4. Configure Notifications
![Notification settings](./img/NOTIFICATIONS/Global-notification-settings.png)
**Initial configuration**: Notifies on `new_devices`, `down_devices`, and `events` as defined in `NTFPRCS_INCLUDED_SECTIONS`.
> [!NOTE]
@@ -51,6 +55,8 @@ Get **NetAlertX** up and running in a few simple steps.
### 5. Set Up Workflows
![Workflows](./img/WORKFLOWS/workflows.png)
**Initial configuration**: N/A
> [!NOTE]
@@ -61,6 +67,8 @@ Get **NetAlertX** up and running in a few simple steps.
### 6. Backup Your Configuration
![Backups](./img/BACKUPS/Maintenance_Backup_Restore.png)
**Initial configuration**: The `CSVBCKP` plugin creates a daily backup to `/config/devices.csv`.
> [!NOTE]
@@ -70,6 +78,8 @@ Get **NetAlertX** up and running in a few simple steps.
### 7. (Optional) Create Custom Plugins
[![Custom Plugin Video](./img/YouTube_thumbnail.png)](https://youtu.be/cdbxlwiWhv8)
**Initial configuration**: N/A
> [!NOTE]

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -126,7 +126,6 @@
</tr>
</tbody>
</table>
<br>
<div id="assignedDevices" class="box-body no-padding">
<div class="page-header">
<h3>

0
front/php/templates/language/fr_fr.json Normal file → Executable file
View File

0
front/php/templates/language/uk_ua.json Normal file → Executable file
View File

View File

@@ -365,7 +365,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
let pluginHtml = `
<div class="row table_row docs">
<div class="table_cell bold">
<i class="fa-regular fa-book fa-sm"></i>
<i class="fa fa-book fa-sm"></i>
${getString(prefix+'_description')}
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/${getPluginCodeName(pluginsData, prefix)}" target="_blank">
${getString('Gen_ReadDocs')}

View File

@@ -33,6 +33,7 @@ from initialise import importConfigs
from database import DB
from messaging.reporting import get_notifications
from models.notification_instance import NotificationInstance
from models.user_events_queue_instance import UserEventsQueueInstance
from plugin import plugin_manager
from scan.device_handling import update_devices_names
from workflows.manager import WorkflowManager
@@ -221,6 +222,15 @@ def main ():
updateState("Workflows: End")
# check if devices list needs updating
userUpdatedDevices = UserEventsQueueInstance().has_update_devices()
mylog('debug', [f'[Plugins] Should I update API (userUpdatedDevices): {userUpdatedDevices}'])
if userUpdatedDevices:
update_api(db, all_plugins, True, ["devices"], userUpdatedDevices)
#loop
time.sleep(5) # wait for N seconds

View File

@@ -562,7 +562,10 @@ def execute_plugin(db, all_plugins, plugin ):
endpoints = ["plugins_events","plugins_objects", "plugins_history", "appevents"]
# check if we need to update devices api endpoint as well to prevent long user waits on Loading...
userUpdatedDevices = UserEventsQueueInstance().has_update_devices
userUpdatedDevices = UserEventsQueueInstance().has_update_devices()
mylog('verbose', [f'[Plugins] Should I update API (userUpdatedDevices): {userUpdatedDevices}'])
if userUpdatedDevices:
endpoints += ["devices"]