feat(service-monitoring-alerts): add view#2428
Conversation
|
Qovery can create a Preview Environment for this PR.
This comment has been generated from Qovery AI 🤖.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## new-navigation #2428 +/- ##
=================================================
Coverage ? 44.27%
=================================================
Files ? 984
Lines ? 18899
Branches ? 5483
=================================================
Hits ? 8367
Misses ? 9034
Partials ? 1498
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Introduced routes for creating and editing alert metrics within the service monitoring section. - Enhanced the organization of alert-related components and improved navigation flow. - Updated the monitoring dashboard to handle new alert routes and provide better user feedback during alert management. - Refactored existing components to support the new alerting features and ensure a cohesive user experience.
…lert flow detection
- Deleted PageAlertingCreateFeature and PageAlertingEditFeature components to streamline the codebase. - Updated routing to remove references to the deleted components, enhancing clarity and maintainability. - Minor style adjustment in SummaryStep component for improved consistency.
…ted monitoring features - Refactored IssueOverview to use `useParams` from `@tanstack/react-router` for improved routing. - Updated alert navigation links to utilize parameterized routes for better clarity and maintainability. - Deleted obsolete monitoring dashboard and placeholder components to streamline the codebase and enhance overall organization. - Removed related routing references to deprecated components, improving clarity in the routing structure.
… constant - Deleted APPLICATION_MONITORING_ALERTS_URL from application.router.ts to streamline routing and eliminate references to obsolete monitoring features.
…ved route matching
…onents - Replaced `react-router-dom` with `@tanstack/react-router` for improved routing consistency across alerting components. - Simplified context usage in `SummaryStep` and `MetricConfigurationStep` by directly providing necessary values. - Removed mock implementations of routing hooks in tests to align with the new routing structure. - Enhanced test setups to reflect updated context and routing dependencies.
1a3aeec to
3e5c0af
Compare
| const pathname = useRouterState({ select: (state) => state.location.pathname }) | ||
| const searchStr = useRouterState({ select: (state) => state.location.searchStr }) |
There was a problem hiding this comment.
Could you please use useLocation and useSearch here?
→ https://tanstack.com/router/latest/docs/api/router/useSearchHook
| navigate(`${basePath}${ALERTING_CREATION_METRIC(selectedMetrics[currentStepIndex - 1])}${queryString}`) | ||
| const basePath = pathname.replace(/\/summary$/, '') | ||
| const queryString = searchStr ?? '' | ||
| navigate({ to: `${basePath}/metric/${selectedMetrics[currentStepIndex - 1]}${queryString}` }) |
There was a problem hiding this comment.
Could you refactor this line for it to use the search param instead of concatenating the queryString ?
That way the params will be type-safe 🙏
Summary
Screenshots / Recordings
https://www.loom.com/share/9f6e53a32c2f474eb1dcf8b0767da185
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release