SystemMonitor: Add dropped packets count to adapter table

This commit is contained in:
Isaac 2024-05-08 09:44:56 -04:00 committed by Andreas Kling
parent 3d2fcf4244
commit 653f41336b

View file

@ -69,6 +69,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
net_adapters_fields.empend("packets_out", "Pkt Out"_string, Gfx::TextAlignment::CenterRight);
net_adapters_fields.empend("bytes_in", "Bytes In"_string, Gfx::TextAlignment::CenterRight);
net_adapters_fields.empend("bytes_out", "Bytes Out"_string, Gfx::TextAlignment::CenterRight);
net_adapters_fields.empend("packets_dropped", "Packets Dropped"_string, Gfx::TextAlignment::CenterRight);
m_adapter_model = GUI::JsonArrayModel::create("/sys/kernel/net/adapters", move(net_adapters_fields));
m_adapter_table_view->set_model(MUST(GUI::SortingProxyModel::create(*m_adapter_model)));
m_adapter_context_menu = GUI::Menu::construct();