]>
Commit | Line | Data |
---|---|---|
1 | import { Routes } from '@angular/router' | |
2 | import { UserRightGuard } from '@app/core' | |
3 | import { UserRight } from '@shared/models' | |
4 | import { DebugComponent } from './debug' | |
5 | import { JobsComponent } from './jobs/jobs.component' | |
6 | import { LogsComponent } from './logs' | |
7 | ||
8 | export const SystemRoutes: Routes = [ | |
9 | { | |
10 | path: 'system', | |
11 | children: [ | |
12 | { | |
13 | path: '', | |
14 | redirectTo: 'jobs', | |
15 | pathMatch: 'full' | |
16 | }, | |
17 | { | |
18 | path: 'jobs', | |
19 | canActivate: [ UserRightGuard ], | |
20 | component: JobsComponent, | |
21 | data: { | |
22 | meta: { | |
23 | userRight: UserRight.MANAGE_JOBS, | |
24 | title: $localize`Jobs` | |
25 | } | |
26 | } | |
27 | }, | |
28 | { | |
29 | path: 'logs', | |
30 | canActivate: [ UserRightGuard ], | |
31 | component: LogsComponent, | |
32 | data: { | |
33 | meta: { | |
34 | userRight: UserRight.MANAGE_LOGS, | |
35 | title: $localize`Logs` | |
36 | } | |
37 | } | |
38 | }, | |
39 | { | |
40 | path: 'debug', | |
41 | canActivate: [ UserRightGuard ], | |
42 | component: DebugComponent, | |
43 | data: { | |
44 | meta: { | |
45 | userRight: UserRight.MANAGE_DEBUG, | |
46 | title: $localize`Debug` | |
47 | } | |
48 | } | |
49 | } | |
50 | ] | |
51 | } | |
52 | ] |