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:
siaklin99-gif committed 2026-08-10 11:43:59 -07:00
1 parent fed67b21a8
commit 4f0bcab1e4
1 file changed
+1 -1
+1 -1
View File
@@ -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."""