-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2302]: watch for modified events, do not toast them (#2370)
This pull request introduces several changes to the Kubernetes instrumentation configuration watcher and various frontend components to handle modified events and improve notification handling. The most important changes include adding support for modified events in the watcher, updating notification messages, and enhancing the CRUD operations for destinations and sources. ### Kubernetes Instrumentation Configuration Watcher: * Added a new event batcher for handling modified instrumentation configurations (`frontend/kube/watchers/instrumentation_config_watcher.go`). [[1]](diffhunk://#diff-4601618d422a275e070235864f974e3bbe9420efc0e1d06456ace8dc6f1bbf2aR18) [[2]](diffhunk://#diff-4601618d422a275e070235864f974e3bbe9420efc0e1d06456ace8dc6f1bbf2aR37-R51) * Implemented a function to handle modified instrumentation configurations and integrated it into the event handling logic (`frontend/kube/watchers/instrumentation_config_watcher.go`). [[1]](diffhunk://#diff-4601618d422a275e070235864f974e3bbe9420efc0e1d06456ace8dc6f1bbf2aR93-R94) [[2]](diffhunk://#diff-4601618d422a275e070235864f974e3bbe9420efc0e1d06456ace8dc6f1bbf2aR115-R127) ### Notification Messages: * Updated notification messages for source and destination updates to include the name of the updated entity (`frontend/webapp/cypress/constants/index.ts`). * Adjusted test cases to reflect the updated notification messages (`frontend/webapp/cypress/e2e/03-sources.cy.ts`, `frontend/webapp/cypress/e2e/04-destinations.cy.ts`). [[1]](diffhunk://#diff-981488421b684f7ca98e7e8b147b14c23fe2c57e876d88ca981c563c8ba003cdL53-R53) [[2]](diffhunk://#diff-6f34bd7eb1cce2b4683938973757c4b0e80921234633a259cd17674c0805ca1bL48-R48) ### CRUD Operations Enhancements: * Added `removePendingItems` to the `useDestinationCRUD` hook and updated the `onCompleted` handler to refetch data and notify the user upon successful updates (`frontend/webapp/hooks/destinations/useDestinationCRUD.ts`). [[1]](diffhunk://#diff-c7f19ca063b62568e37726473e1b8c265d3309def0d157772951023c66e055b8L19-R19) [[2]](diffhunk://#diff-c7f19ca063b62568e37726473e1b8c265d3309def0d157772951023c66e055b8L86-R99) [[3]](diffhunk://#diff-c7f19ca063b62568e37726473e1b8c265d3309def0d157772951023c66e055b8L104-R141) * Updated the `useSourceCRUD` hook to include the name of the updated source in the success notification (`frontend/webapp/hooks/sources/useSourceCRUD.ts`). ### SSE Handling: * Modified the SSE handling logic to exclude "modified" and "connected" events from toast notifications and updated constants for SSE event types (`frontend/webapp/hooks/notification/useSSE.ts`, `frontend/webapp/utils/constants/string.tsx`). [[1]](diffhunk://#diff-db9ebe0ce8cdabc0ede2f45de12661d55fb7aa50a5ecfc0787f5898c55b044d6L5-R5) [[2]](diffhunk://#diff-db9ebe0ce8cdabc0ede2f45de12661d55fb7aa50a5ecfc0787f5898c55b044d6L24-R46) [[3]](diffhunk://#diff-6b7ecf63c9f57c564b2f2f5d7998fd2cc45aee9e4dfc71aeeeb8361a39ba66cbL94-R105)
- Loading branch information
1 parent
f64539d
commit 1f010bb
Showing
8 changed files
with
78 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters