This commit is contained in:
Robert Chacón
2023-04-15 11:24:07 -06:00
committed by GitHub
parent 4861b5f2fd
commit 1ee7484d86

View File

@@ -63,6 +63,22 @@ class NodeType(enum.IntEnum):
clientWithChildren = 5
device = 6
def nodeTypeToString(integer):
string = ''
match integer:
case 1:
string = 'root'
case 2:
string = 'site'
case 3:
string = 'ap'
case 4:
string = 'client'
case 5:
string = 'clientWithChildren'
case 6:
string = 'device'
return(string)
class NetworkNode:
# Defines a node on a LibreQoS network graph.
@@ -311,6 +327,7 @@ class NetworkGraph:
node = {
"downloadBandwidthMbps": self.nodes[idx].downloadMbps,
"uploadBandwidthMbps": self.nodes[idx].uploadMbps,
'type': nodeTypeToString(self.nodes[idx].type),
}
children = {}
hasChildren = False