Skip to content

Commit

Permalink
devSyncHubNode on dev details #931 + ICMP not mapped to CurrentScan #934
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Jan 5, 2025
1 parent 4a82ea8 commit 07a7ace
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 4 deletions.
4 changes: 2 additions & 2 deletions front/deviceDetailsEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function getDeviceData(readAllData){
// columns to hide
hiddenFields = ["NEWDEV_devScan", "NEWDEV_devPresentLastScan" ]
// columns to disable - conditional depending if a new dummy device is created
disabledFields = mac == "new" ? ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection"] : ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devMac", "NEWDEV_devLastIP" ];
disabledFields = mac == "new" ? ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection"] : ["NEWDEV_devLastNotification", "NEWDEV_devFirstConnection", "NEWDEV_devLastConnection", "NEWDEV_devMac", "NEWDEV_devLastIP", "NEWDEV_devSyncHubNode" ];

// Grouping of fields into categories with associated documentation links
const fieldGroups = {
Expand Down Expand Up @@ -103,7 +103,7 @@ function getDeviceData(readAllData){
},
// Group for network details
DevDetail_MainInfo_Network_Title: {
data: ["devParentMAC", "devParentPort", "devSSID", "devSite"],
data: ["devParentMAC", "devParentPort", "devSSID", "devSite", "devSyncHubNode"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
iconClass: "fa fa-network-wired",
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
Expand Down
1 change: 1 addition & 0 deletions front/plugins/icmp_scan/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"execution_order" : "Layer_4",
"enabled": true,
"data_source": "script",
"mapped_to_table": "CurrentScan",
"show_ui": true,
"data_filters": [
{
Expand Down
36 changes: 36 additions & 0 deletions front/plugins/newdev_template/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,42 @@
}
]
},
{
"function": "devSyncHubNode",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [
{
"readonly": "true"
}
],
"transformers": []
}
]
},
"maxLength": 50,
"default_value": "",
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Sync Node"
}
],
"description": [
{
"language_code": "en_us",
"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."
}
]
},
{
"function": "devCustomProps",
"type": {
Expand Down
8 changes: 6 additions & 2 deletions front/plugins/sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ The synchronization plugin is designed to synchronize data across multiple insta
1. **💻 Devices**: Sends an encrypted `table_devices.json` file to synchronize the entire Devices database table.
2. **🔌 Plugin Data**: Sends encrypted `last_result.log` files for individual plugins.

> **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.

> [!TIP]
> 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.
### Synchronization Modes

The plugin operates in three different modes based on the configuration settings:
The plugin operates in three different modes based on the configuration settings.

> **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.
1. **Mode 1: PUSH (NODE)** - Sends data from the node to the hub.
- This mode is activated if `SYNC_hub_url` is set and either `SYNC_devices` or `SYNC_plugins` is enabled.
Expand Down

0 comments on commit 07a7ace

Please sign in to comment.