state.component.html 2.37 KB
Newer Older
Lukas Burgey's avatar
Lukas Burgey committed
1
<!-- site column -->
Lukas Burgey's avatar
Lukas Burgey committed
2
<td>
Lukas Burgey's avatar
Lukas Burgey committed
3
	<h4>{{ service.site.name }}</h4>
Lukas Burgey's avatar
Lukas Burgey committed
4
	<br>
Lukas Burgey's avatar
Lukas Burgey committed
5
	<small>{{ service.site.description }}</small>
Lukas Burgey's avatar
Lukas Burgey committed
6 7
</td>

Lukas Burgey's avatar
Lukas Burgey committed
8
<!-- service column -->
Lukas Burgey's avatar
Lukas Burgey committed
9
<td>
Lukas Burgey's avatar
Lukas Burgey committed
10
	<h4 style="font-weight: bold;">{{ service.name }}</h4>
Lukas Burgey's avatar
Lukas Burgey committed
11
	<br>
Lukas Burgey's avatar
Lukas Burgey committed
12
	<small>{{ service.description }}</small>
Lukas Burgey's avatar
Lukas Burgey committed
13 14
</td>

Lukas Burgey's avatar
Lukas Burgey committed
15
<ng-container *ngIf="(state$ | async) as state; else noStateItem">
Lukas Burgey's avatar
Lukas Burgey committed
16
	<!-- state column -->
Lukas Burgey's avatar
Lukas Burgey committed
17
	<td class="width-limit" [matTooltip]="tooltip(state)">
Lukas Burgey's avatar
Lukas Burgey committed
18 19 20
		<span [ngSwitch]="state.state" class="spaced">
			<mat-icon *ngSwitchCase="'deployed'">call_made</mat-icon>
			<mat-icon *ngSwitchCase="'questionnaire'">warning</mat-icon>
Lukas Burgey's avatar
Lukas Burgey committed
21 22
			<mat-progress-spinner *ngSwitchCase="'deployment_pending'" diameter="15" mode="indeterminate"></mat-progress-spinner>
			<mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="15" mode="indeterminate"></mat-progress-spinner>
Lukas Burgey's avatar
Lukas Burgey committed
23 24 25 26
			<mat-icon *ngSwitchCase="'not_deployed'">call_received</mat-icon>
			<mat-icon *ngSwitchCase="'failed'">error</mat-icon>
			<mat-icon *ngSwitchCase="'rejected'">error</mat-icon>
			<mat-icon *ngSwitchDefault>call_received</mat-icon>
Lukas Burgey's avatar
Lukas Burgey committed
27
		</span>
Lukas Burgey's avatar
Lukas Burgey committed
28
		<h4>{{ lang.printState(state.state) }}</h4>
Lukas Burgey's avatar
Lukas Burgey committed
29
		<br>
Lukas Burgey's avatar
Lukas Burgey committed
30
		<div class="mat-small">{{ stateDescription }}</div>
Lukas Burgey's avatar
Lukas Burgey committed
31
	</td>
Lukas Burgey's avatar
Lukas Burgey committed
32

Lukas Burgey's avatar
Lukas Burgey committed
33
	<!-- actions column -->
Lukas Burgey's avatar
Lukas Burgey committed
34
	<td>
Lukas Burgey's avatar
Lukas Burgey committed
35 36 37
		<div *ngIf="buttonActive">
			<button (click)="buttonAction(state)" matTooltip="{{ buttonTooltip }}" [color]="buttonColor" mat-raised-button class="mat-elevation-z6">
				{{ buttonText }}
Lukas Burgey's avatar
Lukas Burgey committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51
			</button>
		</div>
		<div *ngIf="!state.is_pending && state.is_credential_pending">
			<span>
				<mat-progress-spinner diameter="15" mode="indeterminate"></mat-progress-spinner>
				SSH Keys pending
			</span>
		</div>
		<div *ngIf="(state.questionnaire | ObjKeys).length > 0 && state.state == 'deployed'"
																						matTooltip="Change previously submitted answers">
			<button (click)="dialog.openQuestionnaire(state$)" mat-icon-button>
				<mat-icon>edit</mat-icon>
			</button>
		</div>
Lukas Burgey's avatar
Lukas Burgey committed
52
	</td>
Lukas Burgey's avatar
Lukas Burgey committed
53 54 55
</ng-container>

<ng-template #noStateItem>
Lukas Burgey's avatar
Lukas Burgey committed
56
	<!-- state column -->
Lukas Burgey's avatar
Lukas Burgey committed
57 58
	<td>
		<span>
Lukas Burgey's avatar
Lukas Burgey committed
59
			<mat-icon mat-icon-button>call_received</mat-icon>
Lukas Burgey's avatar
Lukas Burgey committed
60
		</span>
Lukas Burgey's avatar
Lukas Burgey committed
61
		<h4>{{ lang.printState('not_deployed') }}</h4>
Lukas Burgey's avatar
Lukas Burgey committed
62
		<br>
Lukas Burgey's avatar
Lukas Burgey committed
63
		<small>Access to this service was never requested.</small>
Lukas Burgey's avatar
Lukas Burgey committed
64
	</td>
Lukas Burgey's avatar
Lukas Burgey committed
65 66
	<!-- actions column -->
	<td></td>
Lukas Burgey's avatar
Lukas Burgey committed
67
</ng-template>
Lukas Burgey's avatar
Lukas Burgey committed
68 69 70 71


<!-- contacts column -->
<td >
Lukas Burgey's avatar
Lukas Burgey committed
72
	<button mat-raised-button matTooltip="{{ service.contact_email }}" (click)="contactSupport()">
Lukas Burgey's avatar
Lukas Burgey committed
73
		<small>{{ service.contact_description }}</small>
Lukas Burgey's avatar
Lukas Burgey committed
74 75
	</button>
</td>