-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tui: show the disk on which an existing installation or backup is found #20
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the design goal was so that you don't need to see internal device names when installing upgrading/restoring. That way it looks cleaner and doesn't show (unstable) Linux device names. You can press F5 to see the full details of the existing installation, including the disk it is installed on. Does that help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it does give the information. However, the goal of this patch is to help a user avoid making wrong decisions without realizing it, and I'm not sure that relying on an optional display would help much.
An example use-case where it would help, very much tied to patch series we did not submit yet, is when a system has been installed on a software RAID device (we have in XCPng a patch allowing the user to build a RAID1 for use as primary disk). I'm working on a patch-series that makes RAID assembly "opt-in, off by default" (see #16), and after this behavior change such a RAID install will not be listed at first; then if any install is found on another disk, when the disk is not mentioned in the entry itself, the user might think the install listed is the one it expects to find, and I think we don't want that to happen.
So maybe I should just move this commit back into my RAID-improvements PR-to-be (which incidentally already exists as a PR against XCPng, and on which you're welcome to comment already), with better context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see you have a reason for doing this. In that case I think it is generally fine to show some extra information there.
I'd like to ensure that it shows some kind of stable identifier rather than something like /dev/sda and /dev/sdb which might switch around on successive boots. Does it do this?
It might also be useful to include the disk size since that is often an easy way of disambiguating the disks in a system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we should in fact use the same label as is already used in the primary-disk selection menu, and it already includes disk size. It does not use anything more stable than
/dev/sda
though, but with size as disambiguation it should be fine, and if disks are always presented by the same code it will be easy to improve it when deemed necessary.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really happy with the results on a small 80x25 textmode:
With a longer description (faked here for testing), the screen overflow looks really bad:
Unfortunately, that old newt library does not seem to support multiline list entries. Looks like for we'll have to be satisfied with just adding the size :/.