feat: stream_routes resource in services#3105
Merged
SkyeYoung merged 14 commits intoapache:masterfrom Jun 6, 2025
Merged
Conversation
stream_routes resource in services
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a new "stream_routes" resource alongside the existing services detail view. Key changes include:
- Adding list, add, detail, and edit components for stream routes.
- Updating route generation to incorporate the new stream routes endpoints.
- Enhancing form context usage for read-only fields (e.g. "service_id") across different route modules.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/utils/form-context.ts | Introduces common form context for handling read-only fields. |
| src/routes/stream_routes/* | Implements listing, adding, and displaying stream routes. |
| src/routes/services/detail.$id/stream_routes/* | Integrates stream routes into the services detail view. |
| src/routes/routes/* | Refactors route listing and detail views to support updated patterns. |
| src/routeTree.gen.ts | Updates the route tree to include new stream routes endpoints. |
| src/components/page/ToAddPageBtn.tsx | Updates to support new route key patterns in add/detail buttons. |
| src/components/form-slice/FormPartRoute/index.tsx | Enhances form section by disabling fields based on read-only status. |
| src/apis/hooks.ts | Modifies hook generics to support extended list page keys. |
Comments suppressed due to low confidence (1)
src/apis/hooks.ts:77
- Consider renaming the generic parameter 'U' to a more descriptive name (e.g. 'AlternateKey' or 'ExtendedKey') to improve code readability and maintain consistency.
export const genUseList = <T extends ListPageKeys, U extends ListPageKeys, P extends PageSearchType, R>(...) => {
Baoyuantop
approved these changes
Jun 6, 2025
LiteSun
approved these changes
Jun 6, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
Depend on #3103
This PR adds the function of displaying stream routes at the same level as the services detail.
Please note that since the admin API does not yet support filtering by
service_id, all routes are currently displayed directly.service_idwill be auto set to form whenadd routeservice_idwill of course appear on the routes detail pageedit mode: