After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 414492 - don't show swap history when computer has no swap
don't show swap history when computer has no swap
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: resources
2.22.x
Other Linux
: Normal enhancement
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-04 07:36 UTC by Teppo Turtiainen
Modified: 2013-08-02 00:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
"not available" after swapoff (120.23 KB, image/png)
2011-10-08 16:33 UTC, Dmitri Bachtin
  Details
adds "not available" string if mem entry has a total of 0 (702 bytes, patch)
2011-10-08 16:39 UTC, Dmitri Bachtin
none Details | Review
Don't show swap history when computer has no swap (1.13 KB, patch)
2011-11-08 11:30 UTC, Chris Kühl
committed Details | Review
system monitor with swap removed (99.71 KB, image/png)
2011-11-08 13:32 UTC, Robert Roth
  Details

Description Teppo Turtiainen 2007-03-04 07:36:16 UTC
System Monitor shouldn't show the Swap History in the Resources panel if the computer doesn't have any swap.
Comment 1 Kernel 2008-05-17 23:58:19 UTC
This still happens in 2.22.2. It doesnt really take much time to fix

if(swap.exists()){
  swap_bar.show(true);
} else {
  swap_bar.show(false);
}

//Just to show little effort this takes
Comment 2 Benoît Dejean 2008-05-18 09:32:36 UTC
what a nice patch, unfortunalety, i haven't managed to apply it.
Comment 3 Dmitri Bachtin 2011-10-08 16:33:30 UTC
Created attachment 198610 [details]
"not available" after swapoff
Comment 4 Dmitri Bachtin 2011-10-08 16:34:47 UTC
Hiding the swap history and as proposed in [1] the color picker feels weird. A swap can be turned on and off at any time. Therefore the elements should be always present as the swap space can come and go.

I find it more intuitive to show a "not available" string instead of a "0.0 of 0.0". [Patch attached] Unfortunately this change requires translation effort.

[1] - https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/231256
[2] - attachment "not available" after swapoff
Comment 5 Dmitri Bachtin 2011-10-08 16:39:38 UTC
Created attachment 198611 [details] [review]
adds "not available" string if mem entry has a total of 0
Comment 6 Robert Roth 2011-11-07 22:14:57 UTC
Dmitri: the patch looks OK, but please also move the translator comment with the line for the swap usage containing the translatable string format, as this way I think translators won't be able to see the translator comment which could help them understand what they are translating.
Comment 7 Chris Kühl 2011-11-08 11:30:48 UTC
The following fix has been pushed:
466b7e6 Don't show swap history when computer has no swap
Comment 8 Chris Kühl 2011-11-08 11:30:52 UTC
Created attachment 200974 [details] [review]
Don't show swap history when computer has no swap
Comment 9 Teppo Turtiainen 2011-11-08 13:16:49 UTC
(In reply to comment #4)
> Hiding the swap history and as proposed in [1] the color picker feels weird. A
> swap can be turned on and off at any time. Therefore the elements should be
> always present as the swap space can come and go.

This committed fix is even weirder. We are now telling the user that "Yes, we know there is no swap but we'll draw this useless line anyway." The swap history and the color picker should appear and disapper as swap is added or removed.
Comment 10 Robert Roth 2011-11-08 13:32:52 UTC
Created attachment 200981 [details]
system monitor with swap removed

Hiding the swap would mean that we would have only memory displayed in the middle section, so for this we would have to
 - remove the swap icon and details from below the chart
 - display only one line on the chart
 - update the section header
and in my opinion after these changes the UI would not look as balanced as it does right now. (see the attached screenshot of what it would look like after making the above changes)
So I think this bug needs a bit of design work to be able to better address it.

As a temporary solution, I suggest disabling the color picker and not displaying the swap on the chart, but leaving the header and the swap info with the not available label there.
Comment 11 Teppo Turtiainen 2011-11-08 14:20:04 UTC
(In reply to comment #10)
> As a temporary solution, I suggest disabling the color picker and not
> displaying the swap on the chart, but leaving the header and the swap info with
> the not available label there.

I think this would be a good solution. This way there wouldn't be a useless graph on computers without swap but if a user checks System Monitor on an unfamiliar computer without swap they wouldn't be left wondering where the swap graph went.
Comment 12 Chris Kühl 2011-11-09 08:56:25 UTC
(In reply to comment #10)

> As a temporary solution, I suggest disabling the color picker and not
> displaying the swap on the chart, but leaving the header and the swap info with
> the not available label there.

I do think we could lose the line on the graph. The LoadGraph object is not very flexible at the moment. The number of lines on the bottom 2 graphs are hard coded for example. LoadGraph is a bastard mix of C and C++ code (basically describes all of System Monitor, actually) in its worst form. I'd like to see this improved.

I don't really have a strong opinion as to whether the color-picker should be disabled or not, though. Currently the color picker is not designed to grey out when set insensitive anyway. So, this would need to be changed. I am against removing it entirely, though. I tried this and as the current layout stands, I find it causes an imbalance.
Comment 13 André Klapper 2012-02-26 10:46:31 UTC
[Adding missing "QA Contact" entry so system monitor bug report changes can still be watched via the "Users to watch" list on https://bugzilla.gnome.org/userprefs.cgi?tab=email when the assignee is changed to an individual.]
Comment 14 Robert Roth 2013-08-02 00:00:07 UTC
I have added a sensitive parameter to the color pickers, and in case we have no swap the swap picker is set to insensitive, and the swap graph is not drawn.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.