-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add delete modal for project connections #3204
Add delete modal for project connections #3204
Conversation
Skipping CI for Draft Pull Request. |
591221c
to
267445b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3204 +/- ##
==========================================
+ Coverage 85.29% 85.32% +0.02%
==========================================
Files 1266 1268 +2
Lines 27800 27865 +65
Branches 7400 7414 +14
==========================================
+ Hits 23712 23775 +63
- Misses 4088 4090 +2
... and 20 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
frontend/src/pages/projects/screens/detail/connections/ConnectionsDeleteModal.tsx
Outdated
Show resolved
Hide resolved
267445b
to
9bffcfe
Compare
onClose: () => void; | ||
onDelete: () => Promise<K8sStatus>; | ||
refresh: () => void; |
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.
Instead of having a refresh
prop, I prefer onClose: (deleted: boolean) => void;
and have the consumer of the modal handle whatever it needs to on close.
}} | ||
deleting={isDeleting} | ||
error={error} | ||
deleteName={deleteConnection.metadata.annotations['openshift.io/display-name'] ?? ''} |
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.
use getDisplayNameFromK8sResource
to get the name and store it in a variable for reuse.
9bffcfe
to
9590183
Compare
@@ -17,6 +17,7 @@ const ConnectionsDescription = | |||
const ConnectionsList: React.FC = () => { | |||
const { | |||
connections: { data: connections, loaded, error }, | |||
refreshAllProjectData: refresh, |
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.
Let's find a way to not refresh all projects data.
<> | ||
The <b>{getDisplayNameFromK8sResource(deleteConnection)}</b> connection will be deleted, and | ||
its dependent resources will stop working. | ||
</> |
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: unnecessary fragment
9590183
to
56dce7f
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, jeff-phillips-18 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 |
Closes https://issues.redhat.com/browse/RHOAIENG-11557
Description
Fairly straightforward implementation of the delete modal for the new connections page inside a project.
How Has This Been Tested?
To test: if there are existing data connections on a project, you can delete those. otherwise you have to add new secrets from openshift console for that project
Has been tested locally
Test Impact
Cypress test added
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main