mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-15 22:51:37 -07:00
BE+FE: better VLAN/SSID handling
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
+9
-2
@@ -611,6 +611,7 @@ function getChildren(node, list, path, visited = [])
|
|||||||
hasChildren: children.length > 0 || hiddenMacs.includes(node.devMac),
|
hasChildren: children.length > 0 || hiddenMacs.includes(node.devMac),
|
||||||
relType: node.devParentRelType,
|
relType: node.devParentRelType,
|
||||||
devVlan: node.devVlan,
|
devVlan: node.devVlan,
|
||||||
|
devSSID: node.devSSID,
|
||||||
hiddenChildren: hiddenMacs.includes(node.devMac),
|
hiddenChildren: hiddenMacs.includes(node.devMac),
|
||||||
qty: children.length,
|
qty: children.length,
|
||||||
children: children
|
children: children
|
||||||
@@ -890,12 +891,18 @@ function initTree(myHierarchy)
|
|||||||
linkLabel: {
|
linkLabel: {
|
||||||
render: (parent, child) => {
|
render: (parent, child) => {
|
||||||
// Return text or HTML to display on the connection line
|
// Return text or HTML to display on the connection line
|
||||||
return child.data.devVlan ?? "";
|
connectionLabel = (child?.data.devVlan ?? "") + "/" + (child?.data.devSSID ?? "");
|
||||||
|
if(connectionLabel == "/")
|
||||||
|
{
|
||||||
|
connectionLabel = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return connectionLabel;
|
||||||
// or with HTML:
|
// or with HTML:
|
||||||
// return "<tspan><strong>reports to</strong></tspan>";
|
// return "<tspan><strong>reports to</strong></tspan>";
|
||||||
},
|
},
|
||||||
color: "#336c87ff", // Label text color (optional)
|
color: "#336c87ff", // Label text color (optional)
|
||||||
fontSize: 11 // Label font size in px (optional)
|
fontSize: nodeHeightPx - 5 // Label font size in px (optional)
|
||||||
},
|
},
|
||||||
linkWidth: (nodeData) => 2,
|
linkWidth: (nodeData) => 2,
|
||||||
linkColor: (nodeData) => {
|
linkColor: (nodeData) => {
|
||||||
|
|||||||
@@ -1516,6 +1516,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "devSSID",
|
"function": "devSSID",
|
||||||
|
"events": [
|
||||||
|
"add_option"
|
||||||
|
],
|
||||||
"type": {
|
"type": {
|
||||||
"dataType": "string",
|
"dataType": "string",
|
||||||
"elements": [
|
"elements": [
|
||||||
@@ -1599,6 +1602,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"function": "devVlan",
|
"function": "devVlan",
|
||||||
|
"events": [
|
||||||
|
"add_option"
|
||||||
|
],
|
||||||
"type": {
|
"type": {
|
||||||
"dataType": "string",
|
"dataType": "string",
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|||||||
Reference in New Issue
Block a user