-
Notifications
You must be signed in to change notification settings - Fork 17
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
Use card view for remote management #403
Conversation
A few things to discuss:
This error likely isn't encountered often (if at all) when using official repositories. Small note at the end - some features from the redesign (#176) aren't implemented yet. I need to figure out how to see if update includes bugfixes. Cleanup, reset, pin should come sometimes soon. |
b4e0fa3
to
27537be
Compare
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.
Thanks for implementing this!
It's not like the design, however.
The design is like this:
The branches are all exposed as radio buttons, as they should usually only be between 1 - 3 items. When something is 2 - 4 items, it should be a group of radios, not a dropdown. Dropdowns are better for > 5 items. When it's 1 item, then it should just be text, not a widget.
Additionally, the vertical space seems excessive?
Here's what one branch and the error state (which has a disabled button, as it cannot be used) would look like:
CoreOS only has 3 branches (next, stable, testing), not all the ones you listed (Silverblue, Sercea, etc.). You're not going to switch architecture (going from x86_64 to s390, arm, etc. is a bad idea) and you shouldn't switch distributions (CoreOS to Silverblue or vice versa isn't a good idea in most cases). |
340fea4
to
5426a54
Compare
5426a54
to
7d1520d
Compare
5a955f6
to
e09dae7
Compare
e09dae7
to
071e781
Compare
a2d41a0
to
7c487bc
Compare
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.
Looks great! 👍
We should definitely filter the list and make it radios instead of a dropdown, but as we discussed in IRC Matrix, that can be a follow-up.
I also hit a bug where rebasing doesn't have a confirmation. It just rebases (without proper progress, and is uncancelable) and then instantly reboots when done. This needs fixing, but it's something unrelated. (It's why it took me longer to review this. Whoops! Sorry.)
I'd approve it (with the understanding there will be a PR to solve the above dropdown issue), but I have some questions about using custom CSS instead of PF helpers (and also possibly a PF Flex component instead of CSS).
7c487bc
to
a0d6797
Compare
It's probably a good idea to add confirmation dialog for this. It may also be useful for rolling back and deleting previous deployments |
a0d6797
to
ea850dd
Compare
@garrett I added confirmation dialog for Updating, Rebasing and Roll backing: I'm not sure if the confirm button should be red/yellow as this action is quite radical but at least there won't be any unexpected system reboots :) |
So:
So, perhaps rework this PR to be like the first mockup here? The second mockup is what it might look like if we had our scheduling from the standard reboot modal. |
ea850dd
to
04fcbf7
Compare
Few things I noticed which might be unrelated: No loading for rebase modalSo you go from an error message to we have a list of things to pick from: Cleanup modalI would be surprised if this goes past @garrett, the action button name feels wrong as one of the options is "Temporary files". Maybe this should be Warning icon missing?Same comment as above basically. Deleting your only deployment is an option in the UI but won't work for obvious reasonsSee the error in console: Pinning unstaged deploymentSee the error in console: To reproduce |
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.
With limited OSTree experience, overall it looks quite good. There are some things I noticed which we might want to improve.
04fcbf7
to
63a7351
Compare
Overall, great catches and suggestions! Thanks! Details below:
It's never "cleanup" for the verb. It would be "clean up". Cleanup is a noun only (or sometimes an adjective in baseball)... and even then, it's usually slang or informal: Additionally, it feels like this modal grew in scope and the language hasn't caught up. It's fine, and I'm glad it covers all these items. We might want to drop the description and make the heading "Remove temporary files" and make the action "Clean up". Additionally, if someone went to this dialog, they probably want to clean things. So I'd suggest having a default of temporary files and RPM repo metadata preselected. Pending deployment and rollback deployment can change things, but the other two items would have no effect on the system (other than re-dowloading some files).
Yep. It should have the warning icon in the title.
It should not be an option in the UI.
Right, you shouldn't be able to pin an unstaged deployment. But you should be able to pin the current one. (On the command line, if you have a staged deployment, then it's |
63a7351
to
b03c971
Compare
Probably unrelated to these changes if you run |
b03c971
to
28d21e5
Compare
This ID no longer exists so needs to be updated:
|
if (deleteTemporaryFiles) { | ||
cleanupFlags.push("base"); |
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.
Take away from coverage, this and below could be tested if possible.
// remove all overlayed packages | ||
resetFlags["no-layering"] = { t: "b", v: true }; | ||
} | ||
if (removeOverrides) { |
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.
This is also untested, could be interesting if trivial.
P.S. this also needs a release-note but that can happen Monday/Tuesday |
9bde110
to
47d5159
Compare
Pushed the pixel tests as they look ok to me. |
30a3544
to
91f0c34
Compare
91f0c34
to
cdaefe6
Compare
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.
Thanks!
.catch(ex => { | ||
console.warn(ex); | ||
setError(ex.message); | ||
setButtonLoading(false); |
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.
These 4 added lines are not executed by any test. Details
const actions = [ | ||
<Button key="cleanup-accept" | ||
variant="primary" | ||
isDisabled={buttonLoading || (!deleteTemporaryFiles && !deleteRPMmetadata && !deletePendingDeployments && !deleteRollbackDeployments)} |
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.
This added line is not executed by any test. Details
<Alert variant="danger" | ||
isInline | ||
title={error} |
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.
These 3 added lines are not executed by any test. Details
<Checkbox label={_("Temporary files")} | ||
key="temporary-files" | ||
id="temporary-files-checkbox" | ||
onChange={(_, isChecked) => setDeleteTemporaryFiles(isChecked)} |
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.
This added line is not executed by any test. Details
<Checkbox label={_("RPM repo metadata")} | ||
key="rpm-repo-metadata" | ||
id="rpm-repo-metadata-checkbox" | ||
onChange={(_, isChecked) => setDeleteRPMmetadata(isChecked)} |
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.
This added line is not executed by any test. Details
onChange={(_ev, url) => setNewRepoURL(url)} | ||
/> | ||
<FormHelper fieldId="new-remote-url" | ||
helperTextInvalid={(hasValidation && !newRepoURL.trim().length) && _("Please provide a valid URL")} |
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.
This added line is not executed by any test. Details
> | ||
<TextInput id="edit-remote-url" | ||
value={newURL} | ||
onChange={(_ev, url) => setNewURL(url)} |
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.
This added line is not executed by any test. Details
if (newBranches.includes(origin.branch)) { | ||
setSelectedBranch(origin.branch); |
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.
These 2 added lines are not executed by any test. Details
</Select> | ||
) | ||
: ( | ||
<Text>{availableRemotes[0]}</Text> |
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.
This added line is not executed by any test. Details
onClose={Dialogs.close} | ||
actions={actions} | ||
> | ||
{error && <Alert variant="danger" isInline title={error} />} |
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.
This added line is not executed by any test. Details
Follows up on #339
Old design:
New:
Pixel test changes: https://cockpit-logs.us-east-1.linodeobjects.com/pull-403-20231124-162305-47d51597-fedora-coreos/log.html
OSTree: Redesign with new features: status, clean up, reset, and pin
The OSTree page for software updates has been redesigned and includes several new features.
Update status is now listed in the "Status" card, and details about the current OSTree repository and branch are visible in the "OSTree source" card:
Unused deployments and package cache can be removed in using the "clean up" action.
A new "Reset" feature has been added, which can remove layered and overriden packages.
Deployments can be pinned to persist even when new deployments trigger an auto-cleanup and unpinned.