Fix units on site info

This commit is contained in:
Herbert Wolverson 2023-08-09 20:33:15 +00:00
parent 32233ca36d
commit 856f9befbe
5 changed files with 7 additions and 7 deletions

View File

@ -169,7 +169,7 @@ pub async fn send_extended_device_capacity_graph(
};
sn.push(snr);
});
tx.send(WasmResponse::DeviceExtCapacity { data: sn, device_id: device_id.to_string() }).await;
tx.send(WasmResponse::DeviceExtCapacity { data: sn, device_id: device_id.to_string() }).await?;
}
Ok(())
}

View File

@ -24,8 +24,8 @@ pub(crate) fn tree_to_host(row: TreeNode) -> SiteTree {
parent: row.parent,
max_down: row.max_down,
max_up: row.max_up,
current_down: row.current_down,
current_up: row.current_up,
current_down: row.current_down * 8,
current_up: row.current_up * 8,
current_rtt: row.current_rtt,
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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 * 8) + " / " + scaleNumber(event.SiteInfo.data.current_up) + "</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 RTT:</td><td>" + event.SiteInfo.data.current_rtt / 100.0 + " ms</td></tr>";
html += "</table>";
div.innerHTML = html;