-
Notifications
You must be signed in to change notification settings - Fork 178
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 external routes to AppRoutes component #3569
base: main
Are you sure you want to change the base?
Conversation
- Updated ExternalRoutes to use ExternalRedirectNotFound instead of Navigate for unmatched routes. - Introduced RedirectErrorState component to handle redirect errors with customizable actions and fallback options. - Enhanced PipelinesSdkRedirects to display RedirectErrorState on error, providing navigation options to users. - Added ExternalRedirectNotFound component to show a user-friendly message for non-existent external redirects. This improves user experience by providing clearer error states and navigation options during redirects.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3569 +/- ##
==========================================
- Coverage 85.42% 85.20% -0.22%
==========================================
Files 1378 1385 +7
Lines 31428 31597 +169
Branches 8797 8831 +34
==========================================
+ Hits 26846 26921 +75
- Misses 4582 4676 +94
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
frontend/src/pages/external/redirectComponents/PipelinesSdkRedirects.tsx
Outdated
Show resolved
Hide resolved
frontend/src/pages/external/redirectComponents/PipelinesSdkRedirects.tsx
Outdated
Show resolved
Hide resolved
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Gkrumbach07 This change lgtm for the DSP since it somewhat follows the pattern used in Kubeflow Pipelines: Experiment details: https://ds-pipeline-dspa-pipelinesapi1.apps.dspv2.osp.rh-ods.com//#/experiments/details/c8ce99bc-3545-4f0f-b491-950258a55fab When this PR is done, I can work to change KFP SDK to add new parameters to customize the experiments and runs page refirects. |
https://issues.redhat.com/browse/RHOAIENG-8476
Description
This PR adds a system to handle external URL redirects in a centralized way, with the first implementation handling Pipeline SDK URLs.
WIP bc waiting for backend to confirm some things but could probably merge before them
What's Added
/external/*
How to Extend
frontend/src/pages/external/redirectComponents/
ExternalRoutes.tsx
useRedirect
hook to handle the redirect logicExample:
Error state when parsing pipelinesSdk url fails
ex)
external/pipelinesSdk/gages-proj/#/some/unexpected/route
Custom not found page when incorrect
ex)
external/someUndefinedRoute
How Has This Been Tested?
Test these URLs locally:
For experiments
http://localhost:4010/external/pipelinesSdk/your-namespace/#/experiments/details/your-experiment-id
For runs
http://localhost:4010/external/pipelinesSdk/your-namespace/#/runs/details/your-run-id
The URLs will redirect to their respective internal routes while handling loading and error states.
Test Impact
Added a test for the hook
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
@kaedward @kywalker-rh
Yall should look over wording and button styling for this.
After the PR is posted & before it merges:
main