-
Notifications
You must be signed in to change notification settings - Fork 73
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: show confirm modal instead of popconfirm when deleting endpoint #2678
feat: show confirm modal instead of popconfirm when deleting endpoint #2678
Conversation
Your org requires the Graphite merge queue for merging into mainAdd the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @agatha197 and the rest of your teammates on Graphite |
7128c6f
to
2acc770
Compare
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🔴 | Statements | 5.37% (-0% 🔻) |
329/6122 |
🔴 | Branches | 5.02% (-0% 🔻) |
211/4202 |
🔴 | Functions | 3.08% | 62/2013 |
🔴 | Lines | 5.27% (-0% 🔻) |
315/5978 |
Test suite run success
83 tests passing in 9 suites.
Report generated by 🧪jest coverage report action from f3491db
ac4b98b
to
0e78489
Compare
0e78489
to
24132e9
Compare
react/src/pages/EndpointListPage.tsx
Outdated
_.map(getDeleteRoutingIds(endpoint_id), (routing_id) => | ||
baiSignedRequestWithPromise({ | ||
method: 'DELETE', | ||
url: '/services/' + endpoint_id + '/routings/' + routing_id, | ||
client: baiClient, | ||
}), | ||
), |
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.
Is deleting routings before deleting services required? or not? @agatha197
c30caa7
to
1286ee6
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.
LGTM
(I refactor and pushed commits. )
Merge activity
|
…#2678) ### TL;DR Improved the delete functionality for endpoints in the EndpointListPage component. ### What changed? - **Replaced the Popconfirm component with a modal confirmation dialog for deleting endpoints.** - Removed the `terminatingModelService` state and directly used the row data for deletion. - Updated the error handling and success messages for the terminate mutation. - Simplified the delete button's onClick handler. ### How to test? 1. Navigate to the EndpointListPage. 2. Attempt to delete an endpoint by clicking the delete button. 3. Verify that a modal confirmation dialog appears. 4. Confirm the deletion and check if the endpoint is removed successfully. 5. Test error scenarios by mocking a failed deletion and verify error messages. ### Why make this change? This change enhances the user experience by providing a more robust and consistent deletion process. The modal confirmation offers better visibility and control over the deletion action, while the improved error handling ensures users receive accurate feedback on the operation's success or failure.
1286ee6
to
f3491db
Compare
TL;DR
Improved the delete functionality for endpoints in the EndpointListPage component.
What changed?
terminatingModelService
state and directly used the row data for deletion.How to test?
Why make this change?
This change enhances the user experience by providing a more robust and consistent deletion process. The modal confirmation offers better visibility and control over the deletion action, while the improved error handling ensures users receive accurate feedback on the operation's success or failure.