1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

Applications: Use new global variables at /sys/kernel/ directory

This commit is contained in:
Liav A 2022-10-14 21:55:17 +03:00 committed by Andrew Kaster
parent 6e508573a0
commit 5dfb2b18f3
28 changed files with 33 additions and 32 deletions

View file

@ -69,7 +69,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
net_adapters_fields.empend("packets_out", "Pkt Out", Gfx::TextAlignment::CenterRight);
net_adapters_fields.empend("bytes_in", "Bytes In", Gfx::TextAlignment::CenterRight);
net_adapters_fields.empend("bytes_out", "Bytes Out", Gfx::TextAlignment::CenterRight);
m_adapter_model = GUI::JsonArrayModel::create("/proc/net/adapters", move(net_adapters_fields));
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)));
auto& tcp_sockets_group_box = add<GUI::GroupBox>("TCP Sockets"sv);
@ -90,7 +90,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
net_tcp_fields.empend("packets_out", "Pkt Out", Gfx::TextAlignment::CenterRight);
net_tcp_fields.empend("bytes_in", "Bytes In", Gfx::TextAlignment::CenterRight);
net_tcp_fields.empend("bytes_out", "Bytes Out", Gfx::TextAlignment::CenterRight);
m_tcp_socket_model = GUI::JsonArrayModel::create("/proc/net/tcp", move(net_tcp_fields));
m_tcp_socket_model = GUI::JsonArrayModel::create("/sys/kernel/net/tcp", move(net_tcp_fields));
m_tcp_socket_table_view->set_model(MUST(GUI::SortingProxyModel::create(*m_tcp_socket_model)));
auto& udp_sockets_group_box = add<GUI::GroupBox>("UDP Sockets"sv);
@ -104,7 +104,7 @@ NetworkStatisticsWidget::NetworkStatisticsWidget()
net_udp_fields.empend("peer_port", "Port", Gfx::TextAlignment::CenterRight);
net_udp_fields.empend("local_address", "Local", Gfx::TextAlignment::CenterLeft);
net_udp_fields.empend("local_port", "Port", Gfx::TextAlignment::CenterRight);
m_udp_socket_model = GUI::JsonArrayModel::create("/proc/net/udp", move(net_udp_fields));
m_udp_socket_model = GUI::JsonArrayModel::create("/sys/kernel/net/udp", move(net_udp_fields));
m_udp_socket_table_view->set_model(MUST(GUI::SortingProxyModel::create(*m_udp_socket_model)));
m_update_timer = add<Core::Timer>(