mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
Merge pull request #345 from LibreQoE/node_types_hotfix
Hotfix: handle node "type" entry
This commit is contained in:
commit
b4feb920b0
@ -285,7 +285,7 @@ def handleMultipleInternetNodes(sites, dataLinks, uispSite):
|
||||
internetConnectedSites = []
|
||||
for link in dataLinks:
|
||||
if link['canDelete'] == False:
|
||||
if link['from']['device']['identification']['id'] == link['to']['device']['identification']['id']:
|
||||
if link['from']['device'] is not None and link['to']['device'] is not None and link['from']['device']['identification']['id'] == link['to']['device']['identification']['id']:
|
||||
siteID = link['from']['site']['identification']['id']
|
||||
# Found internet link
|
||||
internetConnectedSites.append(siteID)
|
||||
|
947
src/rust/Cargo.lock
generated
947
src/rust/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -48,6 +48,7 @@ impl NetworkJsonNode {
|
||||
rtts: self.rtts.iter().map(|n| *n as f32 / 100.0).collect(),
|
||||
parents: self.parents.clone(),
|
||||
immediate_parent: self.immediate_parent,
|
||||
node_type: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -69,6 +70,9 @@ pub struct NetworkJsonTransport {
|
||||
pub parents: Vec<usize>,
|
||||
/// The immediate parent node in the tree
|
||||
pub immediate_parent: Option<usize>,
|
||||
/// The type of node (site, ap, etc.)
|
||||
#[serde(rename = "type")]
|
||||
pub node_type: Option<String>,
|
||||
}
|
||||
|
||||
/// Holder for the network.json representation.
|
||||
|
@ -96,6 +96,7 @@ pub fn get_top_n_root_queues(n_queues: usize) -> BusResponse {
|
||||
rtts: Vec::new(),
|
||||
parents: Vec::new(),
|
||||
immediate_parent: None,
|
||||
node_type: None,
|
||||
},
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user