show tcp clients as connected via the tcp server interface

This commit is contained in:
liamcottle 2024-08-12 10:35:08 +12:00
parent 9abb0e25a4
commit 2490b870aa
2 changed files with 43 additions and 11 deletions

View file

@ -144,17 +144,32 @@ export default {
// add interface node
nodes.push(node);
// add edge from me to interface
edges.push({
from: "me",
to: entry.name,
color: "transparent",
length: 300,
background: {
enabled: true,
color: entry.status ? "#22c55e" : "#ef4444",
},
});
// add edge to interface
if(entry.parent_interface_name){
// add edge from parent interface to interface
edges.push({
from: entry.parent_interface_name,
to: entry.name,
color: "transparent",
length: 300,
background: {
enabled: true,
color: entry.status ? "#22c55e" : "#ef4444",
},
});
} else {
// add edge from me to interface
edges.push({
from: "me",
to: entry.name,
color: "transparent",
length: 300,
background: {
enabled: true,
color: entry.status ? "#22c55e" : "#ef4444",
},
});
}
}