mirror of
https://github.com/nicolargo/glances.git
synced 2026-10-08 01:42:01 -04:00
fix(network): use the TX alert for bytes_sent_rate_per_sec decoration
The decoration for `bytes_sent_rate_per_sec` was assigned `alert_rx`, while the line directly above correctly assigns `alert_tx` to `bytes_sent`. This is user-visible because the two front ends read different keys: the curses UI reads `bytes_sent`, and the Web UI reads `bytes_sent_rate_per_sec` (plugin-network.vue). So on an interface with asymmetric traffic the two UIs can show different alert states for the same value in the same poll -- for example a 1 Gbps link at 950 Mbps RX / 10 Mbps TX shows Tx/s undecorated in the terminal and in the critical colour in the browser. Fixes #3660
This commit is contained in:
1 parent
fed67b21a8
commit
4f0bcab1e4
1 file changed
+1
-1
@@ -233,7 +233,7 @@ class NetworkPlugin(GlancesPluginModel):
|
||||
self.views[i[self.get_key()]]['bytes_recv']['decoration'] = alert_rx
|
||||
self.views[i[self.get_key()]]['bytes_recv_rate_per_sec']['decoration'] = alert_rx
|
||||
self.views[i[self.get_key()]]['bytes_sent']['decoration'] = alert_tx
|
||||
self.views[i[self.get_key()]]['bytes_sent_rate_per_sec']['decoration'] = alert_rx
|
||||
self.views[i[self.get_key()]]['bytes_sent_rate_per_sec']['decoration'] = alert_tx
|
||||
|
||||
def _msg_curse_header(self, args, name_max_width):
|
||||
"""Return the header curse lines."""
|
||||
|
||||
Reference in new issue
Block a user