This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
/
project-board.component.html
158 lines (152 loc) · 5.73 KB
/
project-board.component.html
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<div class="container" *ngIf="error$ | async as error">
<dt-empty-state>
<dt-empty-state-item>
<dt-empty-state-item-img>
<img alt="Keptn logo" class="mt-2" [src]="logoInvertedUrl" />
</dt-empty-state-item-img>
<ng-container [ngSwitch]="error">
<ng-container *ngSwitchCase="'project'">
<dt-empty-state-item-title class="mt-2" aria-level="2">Project doesn't exist</dt-empty-state-item-title>
<p>
Sorry, the project could not be loaded. Check out the
<a href="https://keptn.sh/docs/quickstart/" target="_blank" rel="noopener noreferrer">Quick Start</a>
instructions on how to <a [href]="'/manage/project/' | keptnUrl" target="_blank">create a project</a> or go
back to <a [routerLink]="['/dashboard']">your dashboard</a>.
</p>
<button dt-button (click)="loadProjects()">
<dt-icon name="refresh"></dt-icon>
Retry
</button>
</ng-container>
<ng-container *ngSwitchCase="'trace'">
<dt-empty-state-item-title class="mt-2" aria-level="2"
>Traces for <span class="italic" [textContent]="contextId"></span> not found
</dt-empty-state-item-title>
<p>
Sorry, traces with this shkeptncontext could not be loaded. Check out the
<a href="https://keptn.sh/docs/quickstart/" target="_blank" rel="noopener noreferrer">Quick Start</a>
instructions on how to <a [href]="'/manage/project/' | keptnUrl" target="_blank">create a project</a> or go
back to <a [routerLink]="['/dashboard']">your dashboard</a>.
</p>
<button dt-button (click)="loadProjects()">
<dt-icon name="refresh"></dt-icon>
Retry
</button>
</ng-container>
<ng-container *ngSwitchDefault>
<dt-empty-state-item-title class="mt-2" aria-level="2">Some error occurred</dt-empty-state-item-title>
<p>
Sorry, some error occurred. Check out the
<a href="https://keptn.sh/docs/quickstart/" target="_blank" rel="noopener noreferrer">Quick Start</a>
instructions on how to <a [href]="'/manage/project/' | keptnUrl" target="_blank">create a project</a> or go
back to <a [routerLink]="['/dashboard']">your dashboard</a>.
</p>
<button dt-button (click)="loadProjects()">
<dt-icon name="refresh"></dt-icon>
Retry
</button>
</ng-container>
</ng-container>
</dt-empty-state-item>
</dt-empty-state>
</div>
<div
class="container"
*ngIf="(isCreateMode$ | async) === false && (error$ | async) === undefined && (hasProject$ | async) === undefined"
>
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="15px">
<ktb-loading-distractor>Loading ...</ktb-loading-distractor>
</div>
</div>
<div class="project-board" fxLayout="row" *ngIf="(hasProject$ | async) || (isCreateMode$ | async)">
<ng-container
[ngTemplateOutlet]="keptnMenu"
[ngTemplateOutletContext]="{ isCreateMode: (isCreateMode$ | async) }"
></ng-container>
<div fxFlex="calc(100%-50px)">
<router-outlet></router-outlet>
</div>
</div>
<ng-template #keptnMenu let-isCreateMode="isCreateMode">
<dt-menu aria-label="Keptn Menu" class="main-nav" fxFlex="0 0 50px">
<dt-menu-group>
<ng-template #overlay let-data
><span>{{ data.text }}</span></ng-template
>
<button
dt-icon-button
dtMenuItem
variant="nested"
aria-label="Open environment view"
uitestid="ktb-environment-menu-button"
[disabled]="isCreateMode"
[dtOverlay]="overlay"
[dtOverlayConfig]="{ data: { text: 'Environment' } }"
routerLinkActive="active"
routerLink="./"
[routerLinkActiveOptions]="{ exact: true }"
>
<dt-icon name="environment"></dt-icon>
</button>
<button
dt-icon-button
dtMenuItem
variant="nested"
aria-label="Open services view"
uitestid="ktb-services-menu-button"
[disabled]="isCreateMode"
[dtOverlay]="overlay"
[dtOverlayConfig]="{ data: { text: 'Services' } }"
routerLinkActive="active"
routerLink="service"
>
<dt-icon name="services"></dt-icon>
</button>
<button
dt-icon-button
dtMenuItem
variant="nested"
aria-label="Open sequences view"
uitestid="ktb-sequences-menu-button"
[disabled]="isCreateMode"
[dtOverlay]="overlay"
[dtOverlayConfig]="{ data: { text: 'Sequences' } }"
routerLinkActive="active"
routerLink="sequence"
>
<dt-icon name="hops"></dt-icon>
</button>
<div class="relative">
<div *ngIf="hasUnreadLogs$ | async" class="notification-indicator"></div>
<button
*ngIf="!isCreateMode"
dt-icon-button
dtMenuItem
variant="nested"
aria-label="Open settings view"
uitestid="ktb-settings-menu-button"
[dtOverlay]="overlay"
[dtOverlayConfig]="{ data: { text: 'Settings' } }"
routerLinkActive="active"
routerLink="settings"
>
<dt-icon name="options-menu"></dt-icon>
</button>
</div>
<button
*ngIf="isCreateMode"
dt-icon-button
dtMenuItem
variant="nested"
aria-label="Open create project view"
uitestid="ktb-create-project-menu-button"
[dtOverlay]="overlay"
[dtOverlayConfig]="{ data: { text: 'Create project' } }"
routerLinkActive="active"
routerLink="/create/project"
>
<dt-icon name="options-menu"></dt-icon>
</button>
</dt-menu-group>
</dt-menu>
</ng-template>