mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
SystemMonitor: Condense process statistics displayed in processes tab
Previously, some non-default process statistics were displayed in a long human readable format in the processes tab, which could negatively affect readability. A shorter format is now used in the processes tab, while the process properties window retains the longer format.
This commit is contained in:
parent
c566ef2a9d
commit
7772637d03
3 changed files with 22 additions and 8 deletions
|
@ -255,7 +255,7 @@ GUI::Variant ProcessModel::data(GUI::ModelIndex const& index, GUI::ModelRole rol
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
if (role == GUI::ModelRole::Display) {
|
||||
if (role == GUI::ModelRole::Display || role == DISPLAY_VERBOSE) {
|
||||
switch (index.column()) {
|
||||
case Column::Icon:
|
||||
return icon_for(thread);
|
||||
|
@ -306,17 +306,29 @@ GUI::Variant ProcessModel::data(GUI::ModelIndex const& index, GUI::ModelRole rol
|
|||
case Column::CowFaults:
|
||||
return thread.current_state.cow_faults;
|
||||
case Column::IPv4SocketReadBytes:
|
||||
return human_readable_size_long(thread.current_state.ipv4_socket_read_bytes, UseThousandsSeparator::Yes);
|
||||
if (role == DISPLAY_VERBOSE)
|
||||
return human_readable_size_long(thread.current_state.ipv4_socket_read_bytes, UseThousandsSeparator::Yes);
|
||||
return human_readable_size(thread.current_state.ipv4_socket_read_bytes, AK::HumanReadableBasedOn::Base2, UseThousandsSeparator::Yes);
|
||||
case Column::IPv4SocketWriteBytes:
|
||||
return human_readable_size_long(thread.current_state.ipv4_socket_write_bytes, UseThousandsSeparator::Yes);
|
||||
if (role == DISPLAY_VERBOSE)
|
||||
return human_readable_size_long(thread.current_state.ipv4_socket_write_bytes, UseThousandsSeparator::Yes);
|
||||
return human_readable_size(thread.current_state.ipv4_socket_write_bytes, AK::HumanReadableBasedOn::Base2, UseThousandsSeparator::Yes);
|
||||
case Column::UnixSocketReadBytes:
|
||||
return human_readable_size_long(thread.current_state.unix_socket_read_bytes, UseThousandsSeparator::Yes);
|
||||
if (role == DISPLAY_VERBOSE)
|
||||
return human_readable_size_long(thread.current_state.unix_socket_read_bytes, UseThousandsSeparator::Yes);
|
||||
return human_readable_size(thread.current_state.unix_socket_read_bytes, AK::HumanReadableBasedOn::Base2, UseThousandsSeparator::Yes);
|
||||
case Column::UnixSocketWriteBytes:
|
||||
return human_readable_size_long(thread.current_state.unix_socket_write_bytes, UseThousandsSeparator::Yes);
|
||||
if (role == DISPLAY_VERBOSE)
|
||||
return human_readable_size_long(thread.current_state.unix_socket_write_bytes, UseThousandsSeparator::Yes);
|
||||
return human_readable_size(thread.current_state.unix_socket_write_bytes, AK::HumanReadableBasedOn::Base2, UseThousandsSeparator::Yes);
|
||||
case Column::FileReadBytes:
|
||||
return human_readable_size_long(thread.current_state.file_read_bytes, UseThousandsSeparator::Yes);
|
||||
if (role == DISPLAY_VERBOSE)
|
||||
return human_readable_size_long(thread.current_state.file_read_bytes, UseThousandsSeparator::Yes);
|
||||
return human_readable_size(thread.current_state.file_read_bytes, AK::HumanReadableBasedOn::Base2, UseThousandsSeparator::Yes);
|
||||
case Column::FileWriteBytes:
|
||||
return human_readable_size_long(thread.current_state.file_write_bytes, UseThousandsSeparator::Yes);
|
||||
if (role == DISPLAY_VERBOSE)
|
||||
return human_readable_size_long(thread.current_state.file_write_bytes, UseThousandsSeparator::Yes);
|
||||
return human_readable_size(thread.current_state.file_write_bytes, AK::HumanReadableBasedOn::Base2, UseThousandsSeparator::Yes);
|
||||
case Column::Pledge:
|
||||
return thread.current_state.pledge;
|
||||
case Column::Veil:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue