mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Chugging along making UI adjustments.
This commit is contained in:
parent
cb7a1fd640
commit
95ac0fa825
@ -23,7 +23,7 @@ export class ThroughputBpsDash extends BaseDashlet{
|
||||
|
||||
onMessage(msg) {
|
||||
if (msg.event === "Throughput") {
|
||||
this.graph.update(msg.data.bps[0], msg.data.bps[1], msg.data.max[0], msg.data.max[1]);
|
||||
this.graph.update(msg.data.bps.down, msg.data.bps.up, msg.data.max.down, msg.data.max.up);
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ export class ThroughputPpsDash extends BaseDashlet{
|
||||
|
||||
onMessage(msg) {
|
||||
if (msg.event === "Throughput") {
|
||||
this.graph.update(msg.data.pps[0], msg.data.pps[1]);
|
||||
this.graph.update(msg.data.pps.down, msg.data.pps.up);
|
||||
}
|
||||
}
|
||||
}
|
@ -27,8 +27,6 @@ export class ThroughputRingDash extends BaseDashlet{
|
||||
|
||||
onMessage(msg) {
|
||||
if (msg.event === "Throughput") {
|
||||
let shaped = msg.data.shaped_bps[0] + msg.data.shaped_bps[1];
|
||||
let unshaped = msg.data.bps[0] + msg.data.bps[1];
|
||||
this.graph.update(msg.data.shaped_bps, msg.data.bps);
|
||||
}
|
||||
}
|
||||
|
@ -132,14 +132,14 @@ export class BitsPerSecondGauge extends DashboardGraph {
|
||||
this.option && this.chart.setOption(this.option);
|
||||
}
|
||||
|
||||
update(value1, value2, max1, max2) {
|
||||
update(download, upload, max_down, max_up) {
|
||||
this.chart.hideLoading();
|
||||
this.option.series[0].data[0].value = value1;
|
||||
this.option.series[1].data[0].value = value2;
|
||||
this.option.series[0].data[0].value = download;
|
||||
this.option.series[1].data[0].value = upload;
|
||||
this.option.series[0].min = 0;
|
||||
this.option.series[0].max = max1 * 1000000; // Convert to bits
|
||||
this.option.series[0].max = max_down * 1000000; // Convert to bits
|
||||
this.option.series[1].min = 0;
|
||||
this.option.series[1].max = max2 * 1000000; // Convert to bits
|
||||
this.option.series[1].max = max_up * 1000000; // Convert to bits
|
||||
this.chart.setOption(this.option);
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@ export class PacketsPerSecondBar extends DashboardGraph {
|
||||
this.option && this.chart.setOption(this.option);
|
||||
}
|
||||
|
||||
update(up, down) {
|
||||
update(down, up) {
|
||||
this.chart.hideLoading();
|
||||
this.option.series[0].data = [up, down];
|
||||
this.chart.setOption(this.option);
|
||||
|
@ -100,10 +100,10 @@ class RingBuffer {
|
||||
}
|
||||
|
||||
push(shaped, unshaped) {
|
||||
this.data[this.head][0] = 0.0 - shaped[0];
|
||||
this.data[this.head][1] = shaped[1];
|
||||
this.data[this.head][2] = 0.0 - unshaped[0];
|
||||
this.data[this.head][3] = unshaped[1];
|
||||
this.data[this.head][0] = shaped.down;
|
||||
this.data[this.head][1] = 0.0 - shaped.up;
|
||||
this.data[this.head][2] = unshaped.down;
|
||||
this.data[this.head][3] = 0.0 - unshaped.up;
|
||||
this.head += 1;
|
||||
this.head %= this.size;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
use serde_json::json;
|
||||
use lqos_config::load_config;
|
||||
use lqos_utils::units::DownUpOrder;
|
||||
use crate::node_manager::ws::publish_subscribe::PubSub;
|
||||
use crate::node_manager::ws::published_channels::PublishedChannels;
|
||||
use crate::throughput_tracker::THROUGHPUT_TRACKER;
|
||||
@ -18,12 +19,12 @@ pub async fn throughput(channels: Arc<PubSub>) {
|
||||
)
|
||||
};
|
||||
let max = if let Ok(config) = load_config() {
|
||||
(
|
||||
DownUpOrder::new(
|
||||
config.queues.uplink_bandwidth_mbps,
|
||||
config.queues.downlink_bandwidth_mbps,
|
||||
)
|
||||
} else {
|
||||
(0,0)
|
||||
DownUpOrder::zeroed()
|
||||
};
|
||||
let bps = json!(
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user