2019-04-11 10:05:43 +02:00
|
|
|
import { Routes } from '@angular/router'
|
2020-06-23 14:10:17 +02:00
|
|
|
import { UserRightGuard } from '@app/core'
|
|
|
|
import { UserRight } from '@shared/models'
|
|
|
|
import { DebugComponent } from './debug'
|
|
|
|
import { JobsComponent } from './jobs/jobs.component'
|
|
|
|
import { LogsComponent } from './logs'
|
2023-04-21 15:04:52 +02:00
|
|
|
import { RunnersRoutes } from './runners'
|
2019-04-11 10:05:43 +02:00
|
|
|
|
|
|
|
export const SystemRoutes: Routes = [
|
|
|
|
{
|
|
|
|
path: 'system',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
redirectTo: 'jobs',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'jobs',
|
|
|
|
canActivate: [ UserRightGuard ],
|
|
|
|
component: JobsComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
userRight: UserRight.MANAGE_JOBS,
|
2020-08-17 10:30:59 +02:00
|
|
|
title: $localize`Jobs`
|
2019-04-11 10:05:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'logs',
|
|
|
|
canActivate: [ UserRightGuard ],
|
|
|
|
component: LogsComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
userRight: UserRight.MANAGE_LOGS,
|
2020-08-17 10:30:59 +02:00
|
|
|
title: $localize`Logs`
|
2019-04-11 10:05:43 +02:00
|
|
|
}
|
|
|
|
}
|
2019-04-11 10:56:29 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'debug',
|
|
|
|
canActivate: [ UserRightGuard ],
|
|
|
|
component: DebugComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
userRight: UserRight.MANAGE_DEBUG,
|
2020-08-17 10:30:59 +02:00
|
|
|
title: $localize`Debug`
|
2019-04-11 10:56:29 +02:00
|
|
|
}
|
|
|
|
}
|
2023-04-21 15:04:52 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
...RunnersRoutes
|
2019-04-11 10:05:43 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|