Skip to content

Commit 07a7ace

Browse files
author
jokob-sk
committed
devSyncHubNode on dev details #931 + ICMP not mapped to CurrentScan #934
1 parent 4a82ea8 commit 07a7ace

File tree

4 files changed

+45
-4
lines changed

4 files changed

+45
-4
lines changed

front/deviceDetailsEdit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function getDeviceData(readAllData){
7070
// columns to hide
7171
hiddenFields = ["NEWDEV_devScan", "NEWDEV_devPresentLastScan" ]
7272
// columns to disable - conditional depending if a new dummy device is created
73-
disabledFields = mac == "new" ? ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection"] : ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devMac", "NEWDEV_devLastIP" ];
73+
disabledFields = mac == "new" ? ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection"] : ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devMac", "NEWDEV_devLastIP", "NEWDEV_devSyncHubNode" ];
7474

7575
// Grouping of fields into categories with associated documentation links
7676
const fieldGroups = {
@@ -103,7 +103,7 @@ function getDeviceData(readAllData){
103103
},
104104
// Group for network details
105105
DevDetail_MainInfo_Network_Title: {
106-
data: ["devParentMAC", "devParentPort", "devSSID", "devSite"],
106+
data: ["devParentMAC", "devParentPort", "devSSID", "devSite", "devSyncHubNode"],
107107
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
108108
iconClass: "fa fa-network-wired",
109109
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",

front/plugins/icmp_scan/config.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"execution_order" : "Layer_4",
66
"enabled": true,
77
"data_source": "script",
8+
"mapped_to_table": "CurrentScan",
89
"show_ui": true,
910
"data_filters": [
1011
{

front/plugins/newdev_template/config.json

+36
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,42 @@
14871487
}
14881488
]
14891489
},
1490+
{
1491+
"function": "devSyncHubNode",
1492+
"type": {
1493+
"dataType": "string",
1494+
"elements": [
1495+
{
1496+
"elementType": "input",
1497+
"elementOptions": [
1498+
{
1499+
"readonly": "true"
1500+
}
1501+
],
1502+
"transformers": []
1503+
}
1504+
]
1505+
},
1506+
"maxLength": 50,
1507+
"default_value": "",
1508+
"options": [],
1509+
"localized": [
1510+
"name",
1511+
"description"
1512+
],
1513+
"name": [
1514+
{
1515+
"language_code": "en_us",
1516+
"string": "Sync Node"
1517+
}
1518+
],
1519+
"description": [
1520+
{
1521+
"language_code": "en_us",
1522+
"string": "The name of the Sync Node. Uneditable - Auto-populated via the <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/sync/README.md\" target=\"_blank\">Sync plugin</a> if enabled."
1523+
}
1524+
]
1525+
},
14901526
{
14911527
"function": "devCustomProps",
14921528
"type": {

front/plugins/sync/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ The synchronization plugin is designed to synchronize data across multiple insta
55
1. **💻 Devices**: Sends an encrypted `table_devices.json` file to synchronize the entire Devices database table.
66
2. **🔌 Plugin Data**: Sends encrypted `last_result.log` files for individual plugins.
77

8-
> **Note:** `[n]` indicates a setting specified for the node instance, and `[n,h]` indicates a setting used on both the node and the hub instances.
8+
9+
> [!TIP]
10+
> This plugin is usually used if you need to monitor inaccessible networks (WAN, VLAN etc.). Read the [Remote networks documentation](/docs/REMOTE_NETWORKS.md) for more details about these scenarios.
911
1012
### Synchronization Modes
1113

12-
The plugin operates in three different modes based on the configuration settings:
14+
The plugin operates in three different modes based on the configuration settings.
15+
16+
> **Note:** `[n]` indicates a setting specified for the node instance, and `[n,h]` indicates a setting used on both the node and the hub instances.
1317
1418
1. **Mode 1: PUSH (NODE)** - Sends data from the node to the hub.
1519
- This mode is activated if `SYNC_hub_url` is set and either `SYNC_devices` or `SYNC_plugins` is enabled.

0 commit comments

Comments
 (0)