docs + hiding archived devices in Network view

This commit is contained in:
jokob-sk
2025-06-28 16:46:05 +10:00
parent 73f6e6d785
commit c646c36f4f
5 changed files with 65 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ A combined approach greatly improves detection robustness:
* `ARPSCAN` (default)
* `ICMP` (ping)
* `NMAPDEV` (nmamp)
* `NMAPDEV` (nmap)
This hybrid strategy increases reliability, especially for down detection and alerting. See [other plugins](./PLUGINS.md) that might be compatible with your setup. See benefits and drawbacks of individual scan methods in their respective docs.

60
docs/WORKFLOW_EXAMPLES.md Executable file
View File

@@ -0,0 +1,60 @@
# Workflow examples
Workflows in NetAlertX automate actions based on real-time events and conditions. Below are practical examples that demonstrate how to build automation using triggers, conditions, and actions.
## Un-archive devices if detected online
This workflow automatically unarchives a device if it was previously archived but has now been detected as online.
### 📋 Use Case
Sometimes devices are manually archived (e.g., no longer expected on the network), but they reappear unexpectedly. This workflow reverses the archive status when such devices are detected during a scan.
### ⚙️ Workflow Configuration
```json
{
"name": "Un-archive devices if detected online",
"trigger": {
"object_type": "Devices",
"event_type": "update"
},
"conditions": [
{
"logic": "AND",
"conditions": [
{
"field": "devIsArchived",
"operator": "equals",
"value": "1"
},
{
"field": "devPresentLastScan",
"operator": "equals",
"value": "1"
}
]
}
],
"actions": [
{
"type": "update_field",
"field": "devIsArchived",
"value": "0"
}
],
"enabled": "Yes"
}
```
### 🔍 Explanation
- Trigger: Listens for updates to device records.
- Conditions:
- `devIsArchived` is `1` (archived).
- `devPresentLastScan` is `1` (device was detected in the latest scan).
- Action: Updates the device to set `devIsArchived` to `0` (unarchived).
### ✅ Result
Whenever a previously archived device shows up during a network scan, it will be automatically unarchived — allowing it to reappear in your device lists and dashboards.

View File

@@ -163,7 +163,7 @@
devType as type,
devLastIP as last_ip,
(select devType from Devices a where devMac = "'.$node_mac.'") as node_type
FROM Devices WHERE devParentMAC = "'.$node_mac.'" order by port, name asc';
FROM Devices WHERE devParentMAC = "'.$node_mac.'" and devIsArchived = 0 order by port, name asc';
global $db;
$func_result = $db->query($func_sql);
@@ -279,7 +279,7 @@
a.devParentMAC as parent_mac,
a.devIcon as node_icon
FROM Devices a
WHERE a.devType in (".$networkDeviceTypes.")
WHERE a.devType in (".$networkDeviceTypes.") and devIsArchived = 0
) t1
LEFT JOIN
(

View File

@@ -194,7 +194,7 @@
"DevDetail_button_Save": "Save",
"DeviceEdit_ValidMacIp": "Enter a valid <b>Mac</b> and <b>IP</b> address.",
"Device_MultiEdit": "Multi-edit",
"Device_MultiEdit_Backup": "Careful, entering wrong values below will break your setup. Please backup your database or Devices configuration first (<a href=\"php/server/devices.php?action=ExportCSV\">click to download <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Read how to recover Devices from this file in the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Backups documentation</a>. In order to apply your changes click the <b>Save<i class=\"fa-solid fa-save\"></i></b> icon on each field you want to update.",
"Device_MultiEdit_Backup": "Careful, entering wrong values below will break your setup. Please backup your database or Devices configuration first (<a href=\"php/server/devices.php?action=ExportCSV\">click to download <i class=\"fa-solid fa-download fa-bounce\"></i></a>). Read how to recover Devices from this file in the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md#scenario-2-corrupted-database\" target=\"_blank\">Backups documentation</a>. In order to apply your changes click the <b>Save<i class=\"fa-solid fa-save\"></i></b> icon on each field you want to update.",
"Device_MultiEdit_Fields": "Edit fields:",
"Device_MultiEdit_MassActions": "Mass actions:",
"Device_MultiEdit_Tooltip": "Careful. Clicking this will apply the value on the left to all devices selected above.",

View File

@@ -43,6 +43,7 @@ nav:
- Reverse Proxy: REVERSE_PROXY.md
- Webhooks (n8n): WEBHOOK_N8N.md
- Workflows: WORKFLOWS.md
- Workflow Examples: WORKFLOW_EXAMPLES.md
- Docker Swarm: DOCKER_SWARM.md
- Help:
- Common issues: COMMON_ISSUES.md