]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/system/system.routes.ts
e6d45b7608c6dc1fcf3784e01028a92bd49bdef6
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / system.routes.ts
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'
7
8 export const SystemRoutes: Routes = [
9 {
10 path: 'system',
11 component: SystemComponent,
12 data: {
13 },
14 children: [
15 {
16 path: '',
17 redirectTo: 'jobs',
18 pathMatch: 'full'
19 },
20 {
21 path: 'jobs',
22 canActivate: [ UserRightGuard ],
23 component: JobsComponent,
24 data: {
25 meta: {
26 userRight: UserRight.MANAGE_JOBS,
27 title: 'Jobs'
28 }
29 }
30 },
31 {
32 path: 'logs',
33 canActivate: [ UserRightGuard ],
34 component: LogsComponent,
35 data: {
36 meta: {
37 userRight: UserRight.MANAGE_LOGS,
38 title: 'Logs'
39 }
40 }
41 }
42 ]
43 }
44 ]