Skip to content

feat: stream_routes resource in services#3105

Merged
SkyeYoung merged 14 commits intoapache:masterfrom
SkyeYoung:young/feat/stream_routes-in-services
Jun 6, 2025
Merged

feat: stream_routes resource in services#3105
SkyeYoung merged 14 commits intoapache:masterfrom
SkyeYoung:young/feat/stream_routes-in-services

Conversation

@SkyeYoung
Copy link
Member

@SkyeYoung SkyeYoung commented Jun 5, 2025

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

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.

CleanShot 2025-06-05 at 17 26 03@2x

service_id will be auto set to form when add route

image

service_id will of course appear on the routes detail page

image

edit mode:

CleanShot 2025-06-05 at 17 26 30@2x

@SkyeYoung SkyeYoung changed the title feat: routes resource in services feat: stream_routes resource in services Jun 5, 2025
@SkyeYoung SkyeYoung marked this pull request as ready for review June 5, 2025 09:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>(...) => {

Copy link
Member

@juzhiyuan juzhiyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test locally & LGTM

@SkyeYoung SkyeYoung merged commit d90211f into apache:master Jun 6, 2025
5 checks passed
@SkyeYoung SkyeYoung deleted the young/feat/stream_routes-in-services branch June 6, 2025 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants