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