-
Notifications
You must be signed in to change notification settings - Fork 605
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
feat(delete-group): Delete application group #2947
feat(delete-group): Delete application group #2947
Conversation
const name = values.name || values.image.selected; | ||
values.name !== name && setFieldValue('name', name); | ||
!values.application.name && setFieldValue('application.name', `${name}-app`); | ||
setFieldValue('git.url', url); | ||
setFieldValue('git.dir', dir); | ||
setFieldValue('git.ref', ref); | ||
setFieldValue('git.type', gitType); | ||
setFieldTouched('git.url', true); |
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.
/test e2e-aws-console-olm |
1 similar comment
/test e2e-aws-console-olm |
@karthikjeeyar I cant see the action dropdown in the sidebar. Am I missing something? I can see the delete option while right-clicking on the group. |
Question: What do we do about the leftover |
@@ -23,7 +24,9 @@ export class ActionProviders { | |||
public getEdgeActions = (edgeId: string): KebabOption[] => null; | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars |
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 eslint-disable-next-line
can be removed now.
I agree, we should remove/update the connects-to annotation in the other(connected) nodes as well, I will update the PR |
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.
Overall looks good to me, will try it in a while
resource: K8sResourceKind, | ||
workload: TopologyDataObject, | ||
): Promise<K8sResourceKind[]> => { | ||
// cleanup all the items for a workoad. |
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.
nit: can we remove comments as function name is intuitive.
|
||
if (isKnativeResource) { | ||
// delete knative resources | ||
const knativeRoute = _.find(workload.resources.ksroutes, { kind: 'Route' }); |
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.
it would be good to rely on knative services instead of routes if metadata.name
is as expected
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.
@invincibleJai Services are having generated names, looks like the only object to rely on to get the original name is ksroutes
object.
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.
@karthikjeeyar got the issue, knative services are not available in resources. what you saw would be k8s resources.
I am filling a PR on this branch to handle it.
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.
@Sahil Pushed the changes |
3ef076a
to
41cf98b
Compare
@karthikjeeyar A scrollbar on the right appears when I click on the Actions dropdown |
@debsmita1 This is PR is just to add actions to the sidebar. since the content of the sidebar is empty we are seeing the scrollbar. This PR will be integrated with the work @invincibleJai has done related to the content of the sidebar on #2947. I have tested integrating both the PR's and the scrollbar isn't showing up. |
41cf98b
to
04f2f47
Compare
@karthikjeeyar have verified it locally changes looks good to me. Thanks!! |
6c8c8ab
to
0fe26d3
Compare
const isValid = _.get(values, 'application.userInput') === initialApplication; | ||
return ( | ||
<form onSubmit={handleSubmit} className="modal-content modal-content--no-inner-scroll"> | ||
<ModalTitle>Delete Application Group</ModalTitle> |
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.
<ModalTitle>Delete Application Group</ModalTitle> | |
<ModalTitle>Delete Application</ModalTitle> |
// so currently picking the first resource to do the rbac checks (might change in future) | ||
const primaryResource = _.get(application.resources[0], ['resources', 'obj']); | ||
return { | ||
label: 'Delete Application Group', |
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.
label: 'Delete Application Group', | |
label: 'Delete Application', |
This action cannot be undone. All associated Deployments, Routes, Builds, Pipelines, | ||
Storage/PVC's, secrets, configmaps will be deleted. |
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 action cannot be undone. All associated Deployments, Routes, Builds, Pipelines, | |
Storage/PVC's, secrets, configmaps will be deleted. | |
Storage/PVC's, secrets, and configmaps will be deleted. |
0fe26d3
to
82b693e
Compare
/lgtm |
|
||
import Spy = jasmine.Spy; | ||
|
||
const spyAndReturn = (spy: Spy) => (returnValue: any) => |
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.
Can return value be typed?
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.
spyAndReturn is a generic test helper method, which can take in any spy and will resolve any value that is passed to it. IMO, we cannot bound this to any particular type
@karthikjeeyar I pulled this PR and tried it locally but I can't see the delete option on right click as well as not in the the sidebar. |
82b693e
to
e70aa3a
Compare
@divyanshiGupta It could be your browser cache, please try hard reloading. |
e70aa3a
to
c43e251
Compare
Yes I did hard refresh a lot of times but it was not showing up but suddenly now it showed up :P It is working fine for me now. |
/lgtm |
c43e251
to
5c787e1
Compare
/test e2e-aws-console-olm |
2 similar comments
/test e2e-aws-console-olm |
/test e2e-aws-console-olm |
/lgtm |
/test e2e-aws-console-olm |
errorMessage: string; | ||
}; | ||
|
||
const DeleteApplicationForm: React.FC<FormikProps<FormikValues> & DeleteApplicationModalProps> = ({ |
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.
Nit: We should ideally have one component per file. Otherwise looks good to me.
/lgtm |
/assign @christianvogt |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, divyanshiGupta, jeff-phillips-18, karthikjeeyar, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR contains the custom actions and modals to delete an application from the topology page.
contains tests for all the supported workloads in topology.
Fixes: https://jira.coreos.com/browse/ODC-1795 , https://jira.coreos.com/browse/ODC-846