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
9 changes: 5 additions & 4 deletions apps/console/src/AppContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
} from '@object-ui/providers';

const SystemHubPage = lazy(() => import('./pages/system/SystemHubPage').then(m => ({ default: m.SystemHubPage })));
const DatasourceManagerPage = lazy(() => import('./pages/system/DatasourceManagerPage').then(m => ({ default: m.DatasourceManagerPage })));
const AppManagementPage = lazy(() => import('./pages/system/AppManagementPage').then(m => ({ default: m.AppManagementPage })));
const ProfilePage = lazy(() => import('./pages/system/ProfilePage').then(m => ({ default: m.ProfilePage })));
const ApprovalsInboxPage = lazy(() => import('./pages/system/ApprovalsInboxPage').then(m => ({ default: m.ApprovalsInboxPage })));
Expand Down Expand Up @@ -51,7 +50,7 @@ const DocsLayout = lazy(() => import('./pages/DocsLayout'));
function ObjectRedirect() {
const { objectName } = useParams<{ objectName?: string }>();
const location = useLocation();
const prefix = location.pathname.replace(/\/objects(\/.*)?$/, '');
const prefix = location.pathname.replace(/\/(system\/)?objects(\/.*)?$/, '');
const target = objectName
? `${prefix}/component/metadata/resource/${objectName}?type=object`
: `${prefix}/component/metadata/resource?type=object`;
Expand All @@ -67,7 +66,10 @@ function ObjectRedirect() {
function MetadataRedirect() {
const { metadataType, itemName } = useParams<{ metadataType?: string; itemName?: string }>();
const location = useLocation();
const prefix = location.pathname.replace(/\/metadata(\/.*)?$/, '');
// Strip an optional leading `system/` too — legacy nav uses
// `…/system/metadata/:type`, and the engine route lives at the app root
// (`…/component/metadata/resource`), not under `system/`.
const prefix = location.pathname.replace(/\/(system\/)?metadata(\/.*)?$/, '');
const base = `${prefix}/component/metadata/resource`;
const target = !metadataType
? `${prefix}/component/metadata/directory`
Expand All @@ -87,7 +89,6 @@ const systemRoutes = (
<Route path="system/audit-log" element={<Suspense fallback={<LoadingScreen />}><AuditLogPage /></Suspense>} />
<Route path="system/settings" element={<Suspense fallback={<LoadingScreen />}><SettingsHub /></Suspense>} />
<Route path="system/settings/:namespace" element={<Suspense fallback={<LoadingScreen />}><SettingsView /></Suspense>} />
<Route path="system/datasources" element={<Suspense fallback={<LoadingScreen />}><DatasourceManagerPage /></Suspense>} />
<Route path="developer" element={<Suspense fallback={<LoadingScreen />}><DeveloperHubPage /></Suspense>} />
<Route path="developer/api-console" element={<Suspense fallback={<LoadingScreen />}><ApiConsolePage /></Suspense>} />
<Route path="developer/flow-runs" element={<Suspense fallback={<LoadingScreen />}><FlowRunsPage /></Suspense>} />
Expand Down
218 changes: 0 additions & 218 deletions apps/console/src/pages/system/DatasourceManagerPage.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/console/src/pages/system/SystemHubPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function SystemHubPage() {
title: 'Datasources',
description: 'Connect external databases and sync their tables in as objects',
icon: Boxes,
href: `${basePath}/system/datasources`,
href: `${basePath}/component/metadata/resource?type=datasource`,
countLabel: '',
count: null,
},
Expand Down
1 change: 1 addition & 0 deletions packages/app-shell/src/layout/AppSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ export function AppSidebar({ activeAppName, onAppChange }: { activeAppName: stri
}
items.push(
{ id: 'sys-objects', label: t('layout.systemNav.objectManager', { defaultValue: 'Object Manager' }), type: 'url' as const, url: '/apps/setup/system/metadata/object', icon: 'database' },
{ id: 'sys-datasources', label: t('layout.systemNav.datasources', { defaultValue: 'Datasources' }), type: 'url' as const, url: '/apps/setup/component/metadata/resource?type=datasource', icon: 'database' },
{ id: 'sys-users', label: t('layout.systemNav.users', { defaultValue: 'Users' }), type: 'url' as const, url: '/apps/setup/system/users', icon: 'users' },
{ id: 'sys-orgs', label: t('layout.systemNav.organizations', { defaultValue: 'Organizations' }), type: 'url' as const, url: '/apps/setup/system/organizations', icon: 'building-2' },
{ id: 'sys-roles', label: t('layout.systemNav.roles', { defaultValue: 'Roles' }), type: 'url' as const, url: '/apps/setup/system/roles', icon: 'shield' },
Expand Down
1 change: 1 addition & 0 deletions packages/app-shell/src/layout/UnifiedSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export function UnifiedSidebar({ activeAppName }: UnifiedSidebarProps) {
{ id: 'sys-apps', label: t('layout.systemNav.applications', { defaultValue: 'Applications' }), type: 'url' as const, url: '/apps/setup/system/apps', icon: 'layout-grid' },
{ id: 'sys-marketplace', label: t('layout.systemNav.appMarketplace', { defaultValue: 'App Marketplace' }), type: 'url' as const, url: '/apps/setup/system/marketplace', icon: 'store' },
{ id: 'sys-objects', label: t('layout.systemNav.objectManager', { defaultValue: 'Object Manager' }), type: 'url' as const, url: '/apps/setup/system/metadata/object', icon: 'database' },
{ id: 'sys-datasources', label: t('layout.systemNav.datasources', { defaultValue: 'Datasources' }), type: 'url' as const, url: '/apps/setup/component/metadata/resource?type=datasource', icon: 'database' },
{ id: 'sys-users', label: t('layout.systemNav.users', { defaultValue: 'Users' }), type: 'url' as const, url: '/apps/setup/system/users', icon: 'users' },
{ id: 'sys-orgs', label: t('layout.systemNav.organizations', { defaultValue: 'Organizations' }), type: 'url' as const, url: '/apps/setup/system/organizations', icon: 'building-2' },
{ id: 'sys-roles', label: t('layout.systemNav.roles', { defaultValue: 'Roles' }), type: 'url' as const, url: '/apps/setup/system/roles', icon: 'shield' },
Expand Down
Loading
Loading