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