-
Notifications
You must be signed in to change notification settings - Fork 182
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
app: home: Add delete button for clusters #2567
base: main
Are you sure you want to change the base?
Conversation
c239834
to
1e40675
Compare
last push: re worked the buttons components so that the app does not fail at main screen, repushed current WIP removing the clusterAPI changes that caused failures working on better way to use delete cluster that deletes kubeconfig parts |
59d4961
to
7fd77f4
Compare
7fd77f4
to
9d3e8cd
Compare
9d3e8cd
to
1a6bb4d
Compare
a248958
to
0fe190e
Compare
We have to be careful here with calling this "Delete cluster" What it is doing more specifically is "deleting the cluster entry in the .kube/config file, and then any context entries that are related to that cluster". Not sure about the second part... but if it isn't it probably should do that. Because those contexts won't make sense anymore with the cluster gone that they were using. |
Maybe we call it "remove"? Would that make a difference? |
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.
please check also the CI checks.
@@ -239,24 +267,6 @@ function HomeComponent(props: HomeComponentProps) { | |||
.sort(); | |||
} | |||
|
|||
/** |
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.
Why did you move this function?
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.
since the confirmDialog also uses the getOrigin to print the source I needed it accessible for both the confirmDialog and the HomeComponent, this was part of my WIP and had a some trouble getting this bit not to error with the way we use getOrigin in the memo for notification caching, this placement seemed to work to keep them both happy
@@ -9,7 +11,8 @@ import { DialogTitle } from './Dialog'; | |||
|
|||
export interface ConfirmDialogProps extends MuiDialogProps { | |||
title: string; | |||
description: string; | |||
description: string | JSX.Element; |
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.
Maybe you want ReactNode.
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.
done!
{t('Cancel')} | ||
</Button> | ||
<Button disabled={!checkboxClicked} onClick={onConfirmationClicked} color="primary"> | ||
{t('I Agree')} |
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 know I asked for "I agree", but I didn't remember this was in the context of an existing ConfirmDialog.
The ConfirmDialog should work similar whether you have a checkbox or not. I think it's better to add the checkbox (when existing) to the original code, rather than having two different ways of rendering the dialog. And the buttons should remain with the original labels, unless we want to provide properties for those too.
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.
Done! made some changes to the logic for the dialog which should allow us to just provide a description and then the smaller section of that description and the checkbox should render
0fe190e
to
7e3f7bd
Compare
Backend Code coverage changed from 61.0% to 60.7%. Change: -.3% 😞. Coverage report
|
7e3f7bd
to
dc7cf04
Compare
last push fixes format issue |
Backend Code coverage changed from 61.0% to 60.8%. Change: -.2% 😞. Coverage report
|
490d106
to
049c2e0
Compare
Backend Code coverage changed from 61.0% to 60.7%. Change: -.3% 😞. Coverage report
|
Backend Code coverage changed from 61.1% to 60.7%. Change: -.4% 😞. Coverage report
|
9037df3
to
95c86fd
Compare
Backend Code coverage changed from 61.1% to 60.7%. Change: -.4% 😞. Coverage report
|
had to manually resolve merge conflict in this tab as the pushes I made after already resolving locally the normal way would not get read even after rebasing |
Backend Code coverage changed from 61.1% to 60.7%. Change: -.4% 😞. Coverage report
|
Signed-off-by: Vincent T <[email protected]>
Signed-off-by: Vincent T <[email protected]>
Signed-off-by: Vincent T <[email protected]>
c490d0f
to
61ab7a2
Compare
Backend Code coverage changed from 61.1% to 60.7%. Change: -.4% 😞. Coverage report
|
Description
Fixes #1418
This PR updates the cluster deletion functionality in Headlamp to allow users to delete non-dynamic clusters directly from the home page. Previously, only clusters added through Headlamp could be deleted, which led to confusion for users attempting to delete clusters originating from other sources (e.g., kubeconfig).
To address this, the deletion process has been updated to clearly inform users about the impact of deleting a cluster, particularly when the cluster originates from non-Headlamp sources.
Images
Changes Made
Steps to Test
Notes