Repository navigation
feat(storage): show each comma-separated storage path as its own group - #618
Open
ilyasturki wants to merge 1 commit into
Open
ilyasturki wants to merge 1 commit into
ilyasturki wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
storage-pathnow takes several comma-separated paths, and each path gets its own Storage group in the menu (Storage /,Storage /mnt/games, ...), with the full set of stats: Total, Used, Reserved, Free, the percentages, and read/write totals and rates for its device. With a single path nothing changes: same group label, same sensor keys.Why
Closes #143, closes #455, closes #503.
On #525 you said you would rather have separate Storage trees than extra rows in one group, so this follows the same pattern as the GPUs (
gpu#1,gpu#2).Changes
storagetype, the next ones arestorage#2,storage#3, ... Pinned keys such as_storage_free_keep working; the extra ones look like_storage#2_free_. As with GPUs, the keys follow the position in the list, so reordering the paths moves a pin to another disk.storageGroups()inhelpers/catalog.js: splitsstorage-pathon commas and maps each path to its type, shared bysensors.jsandextension.js.sensors.js: device lookup and read/write counters are per path. ZFS ARC stays in the first group.extension.js:storage-pathchanges are now picked up live; the Storage groups are rebuilt in place. Thegpuspecial cases in_showHideSensorsChanged,_defaultIconand_sensorIconPathnow go throughsensorGroupFromType(), which already strips the#Nsuffix, so they cover storage too.values.js:resetHistory()also clears thestorage#Nhistories, otherwise rows would not come back after a redraw.s, so existing settings are untouched.Manual integration test
GNOME Shell 50.6, headless Wayland session,
developat 6803448:/: oneStoragegroup, same as before./, /mnt/games, /mnt/recordings: three groups, the three Free values pinned to the panel and updating with the menu closed./to/,/nopeto three paths to/mnt/games,/. Groups are rebuilt at the same spot in the menu, no errors in the journal./nope) shows0.0 B, like a wrong path does today.show-storageoff and on hides and shows every Storage group.