This commit is contained in:
jokob-sk
2025-03-29 17:21:29 +11:00
parent a0561b2016
commit 5d01af1758
2 changed files with 38 additions and 39 deletions

View File

@@ -1,44 +1,43 @@
# A high-level description of the database structure # A high-level description of the database structure
⚠ Disclaimer: As I'm not the original author, some of the information might be inaccurate. Feel free to submit a PR to correct anything within this page or documentation in general. An overview of the most important database tables as well as an detailed overview of the Devices table. The MAC address is used as a foreign key in most cases.
The MAC address is used as a foreign key in most cases.
## Devices database table ## Devices database table
| Field Name | Description | | Field Name | Description | Sample Value |
|-------------------------|-------------| |-------------------------|-------------|--------------|
| `devMac` | MAC address of the device. | | `devMac` | MAC address of the device. | `00:1A:2B:3C:4D:5E` |
| `devName` | Name of the device. | | `devName` | Name of the device. | `iPhone 12` |
| `devOwner` | Owner of the device. | | `devOwner` | Owner of the device. | `John Doe` |
| `devType` | Type of the device (e.g., phone, laptop, etc.). If set to a network type (e.g.: switch), it will become selectable as a Network Parent Node | | `devType` | Type of the device (e.g., phone, laptop, etc.). If set to a network type (e.g., switch), it will become selectable as a Network Parent Node. | `Laptop` |
| `devVendor` | Vendor/manufacturer of the device. | | `devVendor` | Vendor/manufacturer of the device. | `Apple` |
| `devFavorite` | Whether the device is marked as a favorite. | | `devFavorite` | Whether the device is marked as a favorite. | `1` |
| `devGroup` | Group the device belongs to. | | `devGroup` | Group the device belongs to. | `Home Devices` |
| `devComments` | User comments or notes about the device. | | `devComments` | User comments or notes about the device. | `Used for work purposes` |
| `devFirstConnection` | Timestamp of the device's first connection. | | `devFirstConnection` | Timestamp of the device's first connection. | `2025-03-22 12:07:26+11:00` |
| `devLastConnection` | Timestamp of the device's last connection. | | `devLastConnection` | Timestamp of the device's last connection. | `2025-03-22 12:07:26+11:00` |
| `devLastIP` | Last known IP address of the device. | | `devLastIP` | Last known IP address of the device. | `192.168.1.5` |
| `devStaticIP` | Whether the device has a static IP address. | | `devStaticIP` | Whether the device has a static IP address. | `0` |
| `devScan` | Whether the device should be scanned. | | `devScan` | Whether the device should be scanned. | `1` |
| `devLogEvents` | Whether events related to the device should be logged. | | `devLogEvents` | Whether events related to the device should be logged. | `0` |
| `devAlertEvents` | Whether alerts should be generated for events. | | `devAlertEvents` | Whether alerts should be generated for events. | `1` |
| `devAlertDown` | Whether an alert should be sent when the device goes down. | | `devAlertDown` | Whether an alert should be sent when the device goes down. | `0` |
| `devSkipRepeated` | Whether to skip repeated alerts for this device. | | `devSkipRepeated` | Whether to skip repeated alerts for this device. | `1` |
| `devLastNotification` | Timestamp of the last notification sent for this device. | | `devLastNotification` | Timestamp of the last notification sent for this device. | `2025-03-22 12:07:26+11:00` |
| `devPresentLastScan` | Whether the device was present during the last scan. | | `devPresentLastScan` | Whether the device was present during the last scan. | `1` |
| `devIsNew` | Whether the device is marked as new. | | `devIsNew` | Whether the device is marked as new. | `0` |
| `devLocation` | Physical or logical location of the device. | | `devLocation` | Physical or logical location of the device. | `Living Room` |
| `devIsArchived` | Whether the device is archived. | | `devIsArchived` | Whether the device is archived. | `0` |
| `devParentMAC` | MAC address of the parent device (if applicable). | | `devParentMAC` | MAC address of the parent device (if applicable) to build the [Network Tree](./NETWORK_TREE.md). | `00:1A:2B:3C:4D:5F` |
| `devParentPort` | Port of the parent device to which this device is connected. | | `devParentPort` | Port of the parent device to which this device is connected. | `Port 3` |
| `devIcon` | Icon representing the device. | | `devIcon` | [Icon](./ICONS.md) representing the device. The value is a base64-encoded SVG or Font Awesome HTML tag. | `PHN2ZyB...` |
| `devGUID` | Unique identifier for the device. | | `devGUID` | Unique identifier for the device. | `a2f4b5d6-7a8c-9d10-11e1-f12345678901` |
| `devSite` | Site or location where the device is registered. | | `devSite` | Site or location where the device is registered. | `Office` |
| `devSSID` | SSID of the Wi-Fi network the device is connected to. | | `devSSID` | SSID of the Wi-Fi network the device is connected to. | `HomeNetwork` |
| `devSyncHubNode` | The NetAlertX node ID used for synchronization between NetAlertX instances. | | `devSyncHubNode` | The NetAlertX node ID used for synchronization between NetAlertX instances. | `node_1` |
| `devSourcePlugin` | Source plugin that discovered the device. | | `devSourcePlugin` | Source plugin that discovered the device. | `ARPSCAN` |
| `devCustomProps` | [Custom properties](./CUSTOM_PROPERTIES.md) related to the device. The value is a base64-encoded JSON object. | `PHN2ZyB...` |
To understand how values of these fields influuence application behavior, such as Notifications or Network topology, see also: To understand how values of these fields influuence application behavior, such as Notifications or Network topology, see also:

View File

@@ -331,7 +331,7 @@ function generateWorkflowUI(wf, wfIndex) {
class : "pointer add-action green-hover-text", class : "pointer add-action green-hover-text",
lastActionIndex : lastActionIndex, lastActionIndex : lastActionIndex,
wfIndex: wfIndex wfIndex: wfIndex
}).append($actionAddIcon).append("Add Action") }).append($actionAddIcon).append(" Add Action")
$actionAddButtonWrap.append($actionAddButton) $actionAddButtonWrap.append($actionAddButton)
$actionsContainer.append($actionAddButtonWrap) $actionsContainer.append($actionAddButtonWrap)
@@ -348,7 +348,7 @@ function generateWorkflowUI(wf, wfIndex) {
wfIndex: wfIndex wfIndex: wfIndex
}) })
.append($wfRemoveIcon) // Add icon .append($wfRemoveIcon) // Add icon
.append("Remove Workflow"); // Add text .append(" Remove Workflow"); // Add text
$wfCollapsiblePanel.append($actionsContainer); $wfCollapsiblePanel.append($actionsContainer);
@@ -492,7 +492,7 @@ function renderConditions(wfIndex, parentIndexPath, conditionGroupsIndex, condit
class: "pointer add-condition green-hover-text col-sx-12", class: "pointer add-condition green-hover-text col-sx-12",
wfIndex: wfIndex, wfIndex: wfIndex,
parentIndexPath: parentIndexPath parentIndexPath: parentIndexPath
}).append($conditionAddIcon).append("Add Condition"); }).append($conditionAddIcon).append(" Add Condition");
$conditionAddWrap.append($conditionAddButton); $conditionAddWrap.append($conditionAddButton);
// Remove Condition Group button // Remove Condition Group button
@@ -522,7 +522,7 @@ function renderConditions(wfIndex, parentIndexPath, conditionGroupsIndex, condit
class: "pointer add-condition-group green-hover-text col-sx-12", class: "pointer add-condition-group green-hover-text col-sx-12",
wfIndex: wfIndex, wfIndex: wfIndex,
parentIndexPath: parentIndexPath parentIndexPath: parentIndexPath
}).append($conditionsGroupAddIcon).append("Add Group"); }).append($conditionsGroupAddIcon).append(" Add Group");
$conditionsGroupAddWrap.append($conditionsGroupAddButton); $conditionsGroupAddWrap.append($conditionsGroupAddButton);
$addButtonWrap.append($conditionsGroupAddWrap); $addButtonWrap.append($conditionsGroupAddWrap);