Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion react/src/components/EndpointList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ const EndpointList: React.FC<EndpointListProps> = ({
<BAINameActionCell
title={name}
showActions="always"
to={(isAdminMode ? '/deployments/' : '/serving/') + row.endpoint_id}
to={
(isAdminMode ? '/admin-deployments/' : '/serving/') +
row.endpoint_id
}
actions={[
{
key: 'settings',
Expand Down
2 changes: 1 addition & 1 deletion react/src/pages/AdminDeploymentListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const AdminDeploymentListPageContent: React.FC = () => {
}}
loading={isLoading}
onRowClick={(deploymentId) => {
webUINavigate(`/deployments/${toLocalId(deploymentId)}`);
webUINavigate(`/admin-deployments/${toLocalId(deploymentId)}`);
}}
onEditClick={(frgmt) => setEditingDeploymentFrgmt(frgmt)}
onDeleteComplete={updateFetchKey}
Expand Down
24 changes: 20 additions & 4 deletions react/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,21 @@ export const mainLayoutChildRoutes: RouteObject[] = [
</BAIErrorBoundary>
),
},
{
// FR-2847 — Admin deployment detail route. Reuses the shared
// `DeploymentDetailPage` component but keeps admins under the
// `/admin-deployments/*` URL space so that breadcrumbs and back
// navigation preserve the admin context.
Comment thread
yomybaby marked this conversation as resolved.
path: ':deploymentId',
handle: { labelKey: 'webui.menu.DeploymentDetail' },
element: (
<BAIErrorBoundary>
<Suspense fallback={<Skeleton active />}>
<DeploymentDetailPage />
</Suspense>
</BAIErrorBoundary>
),
},
],
},
{
Expand All @@ -504,16 +519,17 @@ export const mainLayoutChildRoutes: RouteObject[] = [
},
},
{
// /admin-deployments has no nested detail route — the deployment
// detail page is shared at /deployments/:deploymentId regardless
// of the viewer's role.
// FR-2847 — Legacy `/admin-serving/:serviceId` redirects to the
// admin-scoped detail route so admins stay under
// `/admin-deployments/*` instead of the user-facing
// `/deployments/:deploymentId`.
path: ':serviceId',
Component: () => {
const { serviceId } = useParams<{ serviceId: string }>();
const location = useLocation();
return (
<WebUINavigate
to={`/deployments/${serviceId}${location.search}`}
to={`/admin-deployments/${serviceId}${location.search}`}
replace
/>
);
Expand Down
Loading