-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: Remove multiple monitors at once. #5481
base: master
Are you sure you want to change the base?
Feat: Remove multiple monitors at once. #5481
Conversation
- Added a delete button to the selection controls for deleting selected monitor(s). - Integrated a confirmation dialog (`confirmDeleteSelected`) with the message `deleteSelectedMonitorMsg`. - Implemented `deleteSelectedDialog` to trigger the confirmation dialog. - Created `deleteSelected` method to handle monitor deletion and update the selection state. - Implemented toast notifications for feedback on the deletion status. - Added page reload mechanism to reflect the deletion of monitors after all selected monitors are removed. - Ensured consistent functionality with existing selection and action methods. modified: src/components/MonitorList.vue
- Added a new key `deleteSelectedMonitorMsg` for the confirmation message. - Included translations for the message in the following files: - `de-CH.json` - `de-DE.json` - `en.json` - `fr-FR.json` - `nl-NL.json` - The message prompts for confirmation when deleting one or more selected monitor(s). - Ensured the message follows existing formatting standards. modified: src/lang/de-CH.json modified: src/lang/de-DE.json modified: src/lang/en.json modified: src/lang/fr-FR.json modified: src/lang/nl-NL.json
Only the |
- Reverted translations for the message in the following language files: - `de-CH.json` - `de-DE.json` - `fr-FR.json` - `nl-NL.json` - Restored the original translations to prevent file inconsistencies. - Prevented inconsistencies caused by previous translation updates. modified: src/lang/de-CH.json modified: src/lang/de-DE.json modified: src/lang/fr-FR.json modified: src/lang/nl-NL.json
@cyril59310, thanks for the tip; I have reversed the unnecessary translations. |
- Added functionality to retrieve and display a toast message from localStorage after the page reloads, triggered by a successful monitor deletion. - Modified the `deleteSelected` method to immediately refresh the page after deleting selected monitors and store the response for the toast notification. - Cleaned up localStorage after showing the toast to avoid repeating the message. modified: src/components/MonitorList.vue
- Replaced `window.location.reload()` with Vue Router navigation to a temporary route for smoother page reload. - Added Vue Router redirection to `/dashboard` after monitor deletion for better user experience. - Updated function documentation to clarify behavior and return type. modified: src/components/MonitorList.vue
This comment has been minimized.
This comment has been minimized.
- Removed JSDoc comment for the `deleteSelected` method `@returns {void}`. - No functional changes made to the logic or behavior of the method. modified: src/components/MonitorList.vue
- Renamed `deleteSelectedDialog` to `deleteSelectedMonitorDialog` for better clarity. - Updated the corresponding method `deleteSelected` to `deleteSelectedMonitor` to reflect the new naming convention. - Updated references in the template and JavaScript to match the new method names. - Ensured consistency in naming to improve code readability and maintainability. No functionality changes were made; only method names were modified for clarity. modified: src/components/MonitorList.vue
- Changed the page redirect after monitor deletion to the home page ("/") for a proper UI refresh. - Removed the temporary route ("/temp") to simplify the deletion process. - Ensured that the UI reloads correctly after monitor deletions via a direct redirect to the home page. modified: src/components/MonitorList.vue
Good afternoon @CommanderStorm, I hope you're doing well! I wanted to follow up on the status of the PR. All tests have passed, and I'm more than happy to address any feedback or concerns you might have. Thank you for your time and consideration! |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
NOTE: This is my first Pull Request. If I've made any mistakes, I apologize in advance. If you have any comments or feedback, I would love to hear them.
Description
This pull request introduces a new feature to Uptime Kuma that allows users to delete multiple monitors at once by selecting them. The changes include:
New Delete Button:
Trashcan
, text:Delete
) to highlight its destructive nature.deleteSelectedMonitorDialog
method to display the confirmation dialog.Confirmation Dialog:
New Methods:
deleteSelectedMonitorDialog
: Triggers the confirmation dialog for deleting selected monitors.deleteSelectedMonitor
: Handles the deletion process for the selected monitors and automatically refreshes after successful deletion.Confirmation Message for Deletion:
deleteSelectedMonitorMsg
has been added to display the confirmation message for deleting selected monitors.en.json
(English)These changes provide users with a more efficient way to manage and delete multiple monitors, enhancing the overall user experience.
Feature Request
This PR addresses the following feature request:
Requested Improvement: Can a batch delete function be added? I monitor hundreds of IPs, and the current process of deleting them one by one is quite cumbersome and time-consuming.
Type of change
Checklist
Fix - Resolved Inconsistencies Caused by Previous Translation Updates
Restored the original translations to maintain consistency across files by reverting the translations for the following messages in the language files:
de-CH.json
de-DE.json
fr-FR.json
nl-NL.json
Screenshots (if any)
screencast_feat_remove_multiple_monitorsvat_once.mp4
video (OLD)
(click to expand)screencast_feat_remove_multiple_monitorsvat_once.mp4