Fix url decoding on finding AP parents and children

This commit is contained in:
Herbert Wolverson 2023-08-07 18:26:59 +00:00
parent 07dd42d981
commit 143ee50155
6 changed files with 168 additions and 167 deletions

View File

@ -275,10 +275,12 @@ async fn handle_socket(mut socket: WebSocket, cnn: Pool<Postgres>) {
send_site_info(&cnn, wss, &credentials.license_key, site_id).await;
}
(WasmRequest::SiteParents { site_id }, Some(credentials)) => {
send_site_parents(&cnn, wss, &credentials.license_key, site_id).await;
let site_id = urlencoding::decode(site_id).unwrap();
send_site_parents(&cnn, wss, &credentials.license_key, &site_id).await;
}
(WasmRequest::CircuitParents { circuit_id }, Some(credentials)) => {
send_circuit_parents(&cnn, wss, &credentials.license_key, circuit_id).await;
let circuit_id = urlencoding::decode(&circuit_id).unwrap();
send_circuit_parents(&cnn, wss, &credentials.license_key, &circuit_id).await;
}
(WasmRequest::RootParents, Some(credentials)) => {
send_root_parents(&cnn, wss, &credentials.license_key).await;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,12 +24,11 @@ export class AccessPointPage implements Page {
}
this.components = [
new SiteInfo(siteId),
new SiteBreadcrumbs(siteId),
new ThroughputSiteChart(siteId),
new RttChartSite(siteId),
new RttHistoSite(),
new SiteBreadcrumbs(siteId),
new SiteHeat(siteId),
new SiteStackChart(siteId),
//new SiteStackChart(siteId),
];
}

View File

@ -14,7 +14,7 @@
<div class="col-6">
<div class="card">
<div class="card-body">
<div id="throughputChart" style="height: 250px"></div>
<div id="oversub"></div>
</div>
</div>
</div>
@ -24,7 +24,7 @@
<div class="col-6">
<div class="card">
<div class="card-body">
<div id="rttChart" style="height: 250px"></div>
<div id="throughputChart" style="height: 250px"></div>
</div>
</div>
</div>
@ -32,7 +32,7 @@
<div class="col-6">
<div class="card">
<div class="card-body">
<div id="rttHisto" style="height: 250px"></div>
<div id="rttChart" style="height: 250px"></div>
</div>
</div>
</div>

View File

@ -25,7 +25,7 @@ export class SiteInfo implements Component {
let html = "";
html += "<table class='table table-striped'>";
html += "<tr><td>Max:</td><td>" + scaleNumber(event.SiteInfo.data.max_down * mbps_to_bps) + " / " + scaleNumber(event.SiteInfo.data.max_up * mbps_to_bps) + "</td></tr>";
html += "<tr><td>Current:</td><td>" + scaleNumber(event.SiteInfo.data.current_down) + " / " + scaleNumber(event.SiteInfo.data.current_up) + "</td></tr>";
html += "<tr><td>Current:</td><td>" + scaleNumber(event.SiteInfo.data.current_down * 8) + " / " + scaleNumber(event.SiteInfo.data.current_up) + "</td></tr>";
html += "<tr><td>Current RTT:</td><td>" + event.SiteInfo.data.current_rtt / 100.0 + " ms</td></tr>";
html += "</table>";
div.innerHTML = html;