Files
onebox/ui/src/app/app.routes.ts

103 lines
2.6 KiB
TypeScript
Raw Normal View History

2025-11-18 00:03:24 +00:00
import { Routes } from '@angular/router';
import { authGuard } from './core/guards/auth.guard';
export const routes: Routes = [
{
path: 'login',
loadComponent: () =>
import('./features/login/login.component').then((m) => m.LoginComponent),
},
{
path: '',
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./shared/components/layout/layout.component').then(
(m) => m.LayoutComponent
),
canActivate: [authGuard],
2025-11-18 00:03:24 +00:00
children: [
{
path: '',
redirectTo: 'dashboard',
pathMatch: 'full',
},
{
path: 'dashboard',
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./features/dashboard/dashboard.component').then(
(m) => m.DashboardComponent
),
2025-11-18 00:03:24 +00:00
},
{
path: 'services',
2025-11-24 19:52:35 +00:00
children: [
{
path: '',
loadComponent: () =>
import('./features/services/services-list.component').then(
(m) => m.ServicesListComponent
),
},
{
path: 'create',
loadComponent: () =>
import('./features/services/service-create.component').then(
(m) => m.ServiceCreateComponent
),
},
{
path: ':name',
loadComponent: () =>
import('./features/services/service-detail.component').then(
(m) => m.ServiceDetailComponent
),
},
],
2025-11-18 00:03:24 +00:00
},
{
path: 'network',
2025-11-24 19:52:35 +00:00
children: [
{
path: '',
loadComponent: () =>
import('./features/network/network.component').then(
(m) => m.NetworkComponent
2025-11-24 19:52:35 +00:00
),
},
{
path: 'domains/:domain',
2025-11-24 19:52:35 +00:00
loadComponent: () =>
import('./features/domains/domain-detail.component').then(
(m) => m.DomainDetailComponent
),
},
],
2025-11-18 00:03:24 +00:00
},
{
path: 'registries',
loadComponent: () =>
import('./features/registries/registries.component').then(
(m) => m.RegistriesComponent
),
},
{
path: 'tokens',
loadComponent: () =>
import('./features/tokens/tokens.component').then(
(m) => m.TokensComponent
),
},
2025-11-18 00:03:24 +00:00
{
path: 'settings',
loadComponent: () =>
2025-11-24 19:52:35 +00:00
import('./features/settings/settings.component').then(
(m) => m.SettingsComponent
),
2025-11-18 00:03:24 +00:00
},
],
},
2025-11-24 19:52:35 +00:00
{
path: '**',
redirectTo: 'dashboard',
},
2025-11-18 00:03:24 +00:00
];