-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.routes.ts
More file actions
134 lines (133 loc) · 5.58 KB
/
app.routes.ts
File metadata and controls
134 lines (133 loc) · 5.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import { Routes } from '@angular/router';
import { RepositoryFilterGuard } from './core/middlewares/repository-filter.guard';
import { adminGuard } from './core/routeGuards/admin.guard';
import { maintainerGuard } from './core/routeGuards/maintainer.guard';
import { loggedInGuard } from '@app/core/routeGuards/auth.guard';
export const routes: Routes = [
{
path: '',
loadComponent: () => import('./pages/main-layout/main-layout.component').then(m => m.MainLayoutComponent),
canActivateChild: [RepositoryFilterGuard],
children: [
{
path: '',
pathMatch: 'full',
loadComponent: () => import('./pages/repository-overview/repository-overview.component').then(m => m.RepositoryOverviewComponent),
},
{
path: 'about',
loadComponent: () => import('./pages/about/about.component').then(m => m.AboutComponent),
},
{
path: 'privacy',
loadComponent: () => import('./pages/privacy/privacy.component').then(m => m.PrivacyComponent),
},
{
path: 'imprint',
loadComponent: () => import('./pages/imprint/imprint.component').then(m => m.ImprintComponent),
},
{
path: 'settings',
canActivate: [loggedInGuard],
loadComponent: () => import('./pages/user-settings/user-settings.component').then(m => m.UserSettingsComponent),
},
{
path: 'repo/:repositoryId',
children: [
{ path: '', loadComponent: () => import('./pages/ci-cd/ci-cd.component').then(m => m.CiCdComponent) },
{
path: '',
redirectTo: 'ci-cd',
pathMatch: 'full',
},
{
path: 'environment',
children: [
{ path: '', redirectTo: 'list', pathMatch: 'full' },
{ path: 'list', loadComponent: () => import('./pages/environment-list/environment-list.component').then(m => m.EnvironmentListComponent) },
{
path: ':id/edit',
loadComponent: () => import('./pages/environment-edit/environment-edit.component').then(m => m.EnvironmentEditComponent),
canActivate: [adminGuard],
},
{
path: ':environmentId/history',
loadComponent: () => import('./pages/environment-deployment-history/environment-deployment-history.component').then(m => m.EnvironmentDeploymentHistoryComponent),
},
],
},
{
path: 'release',
loadComponent: () => import('./pages/release/release.component').then(m => m.ReleaseComponent),
canActivate: [maintainerGuard],
children: [
{
path: '',
redirectTo: 'list',
pathMatch: 'full',
},
{ path: 'list', loadComponent: () => import('./pages/release-candidate-list/release-candidate-list.component').then(m => m.ReleaseCanidateListComponent) },
{
path: ':name',
loadComponent: () => import('./pages/release-candidate-details/release-candidate-details.component').then(m => m.ReleaseCandidateDetailsComponent),
},
],
},
{
path: 'flaky-tests',
loadComponent: () => import('./pages/flaky-tests-overview/flaky-tests-overview.component').then(m => m.FlakyTestsOverviewComponent),
},
{
path: 'ci-cd',
loadComponent: () => import('./pages/ci-cd/ci-cd.component').then(m => m.CiCdComponent),
children: [
{
path: '',
redirectTo: 'pr',
pathMatch: 'full',
},
{
path: 'runs/:runId',
loadComponent: () => import('@app/pages/workflow-run-details/workflow-run-details.component').then(m => m.WorkflowRunDetailsComponent),
},
{
path: 'runs',
loadComponent: () => import('@app/pages/workflow-run-list/workflow-run-list.component').then(m => m.WorkflowRunListComponent),
},
{
path: 'pr',
children: [
{ path: '', loadComponent: () => import('./pages/pull-request-list/pull-request-list.component').then(m => m.PullRequestListComponent) },
{
path: ':pullRequestNumber',
loadComponent: () => import('./pages/pull-request-details/pull-request-details.component').then(m => m.PullRequestDetailsComponent),
},
],
},
{
path: 'branch',
children: [
{ path: '', loadComponent: () => import('./pages/branch-list/branch-list.component').then(m => m.BranchListComponent) },
{ path: ':branchName', loadComponent: () => import('./pages/branch-details/branch-details.component').then(m => m.BranchDetailsComponent) },
],
},
],
},
{
path: 'settings',
loadComponent: () => import('./pages/project-settings/project-settings.component').then(m => m.ProjectSettingsComponent),
canActivate: [maintainerGuard],
},
],
},
],
},
{
path: 'unauthorized',
loadComponent: () => import('./pages/unauthorized-page/unauthorized-page.component').then(m => m.UnauthorizedPageComponent),
},
{
path: '**',
loadComponent: () => import('./pages/page-not-found/page-not-found.component').then(m => m.PageNotFoundComponent),
},
];