network tree port/wifi icons + cleanup
This commit is contained in:
@@ -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.
|
* 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.
|
* 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.
|
* 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:
|
## 🔍Detailed example:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"code_name": "undiscoverables",
|
"code_name": "arpscan",
|
||||||
"unique_prefix": "ARPSCAN",
|
"unique_prefix": "ARPSCAN",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"data_source": "python-script",
|
"data_source": "python-script",
|
||||||
|
|||||||
@@ -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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user