network tree port/wifi icons + cleanup

This commit is contained in:
Jokob-sk
2023-08-05 15:52:47 +10:00
parent 7efe658503
commit c3c3de01e0
3 changed files with 2 additions and 111 deletions

View File

@@ -13,6 +13,7 @@ Make sure you have a root device with the MAC `Internet` (No other MAC addresses
* Set the Type of such a device to one of the following: AP, Firewall, Gateway, PLC, Powerline, Router, Switch, USB LAN Adapter, USB WIFI Adapter and WLAN.
* Save and go to Network where the devices you've marked as network devices (by selecting the Type as mentioned above) will show up as tabs.
* You can now assign the Unassigend devices to the correct network node.
* If port is empty or 0 a wifi icon is rendered, otherwise a ethernet port icon
## 🔍Detailed example:

View File

@@ -1,5 +1,5 @@
{
"code_name": "undiscoverables",
"code_name": "arpscan",
"unique_prefix": "ARPSCAN",
"enabled": true,
"data_source": "python-script",

View File

@@ -1,110 +0,0 @@
{
"name":"apply_template",
"params" : [
{
"name" : "target_macs",
"type" : "setting",
"value" : "KNWN_target_macs"
},
{
"name" : "dev_AlertDeviceDown",
"type" : "setting",
"value" : "KNWN_dev_AlertDeviceDown"
},
{
"name" : "dev_AlertEvents",
"type" : "setting",
"value" : "KNWN_dev_AlertEvents"
},
{
"name" : "",
"type":"array",
"value": "trigger.Object_PrimaryID"
},
{
"type":"array",
"value": "trigger"
}
],
"trigger": [
{
"object_type": "dbtable",
"object_key": "Devices",
"object_event": "new",
"object_filter": "",
"object_mappings":
[
{
"column": "Object_PrimaryID",
"mapped_to_column": "Dev_MAC",
"css_classes": "col-sm-2",
"show": true,
"type": "devicemac",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "MAC address"
}]
}
]
}
],
"steps": [
{
"step_type":"wait",
"params": [
{
"days": 3,
"hours": 0,
"minutes": 0,
"seconds": 0
}
]
},
{
"step_type":"condition",
"params": [
{
"left": {
"value": "triggers[0].object['dev_NewDevice']",
"use_quotes": true,
"js_template": "'{value}'.toString()"
},
"operator": {
"value" : "==",
"data_type": "boolean"
},
"right": {
"value": true,
"use_quotes": false,
"js_template": "'{value}'.toString()"
}
}
]
},
{
"step_type":"action",
"params": [
{
"type": "plugin",
"params":
{
"unique_prefix": "KNWN",
"overrides":[
{
"object_path": "settings.0",
"key":"function",
"value":"target_macs",
"target_property":"default_value",
"desired_value": "triggers.keys"
}
]
}
}
]
}
]
}