service.component.html 2.68 KB
Newer Older
1
<mat-expansion-panel *ngIf="serviceData">
Lukas Burgey's avatar
Lukas Burgey committed
2
	<mat-expansion-panel-header>
3
		 <mat-panel-title>{{ serviceData.name }}</mat-panel-title>
Lukas Burgey's avatar
Lukas Burgey committed
4 5
		<mat-panel-description>{{ serviceData.description }}</mat-panel-description>
	</mat-expansion-panel-header>
6 7 8
	<table width="60%">
		<tr style="margin-bottom: 15px;">
			<td *ngFor="let site of serviceData.site">
9
				<span matTooltip="Provided at site {{ site.name }}" style="margin-right: 10px;">
10 11 12
					<mat-icon style="vertical-align: middle; padding-right: 5px;">storage</mat-icon>
					{{ site.name }}
				</span>
13 14
				<span [ngSwitch]="userService.taskState(site, serviceData)">
					<span *ngSwitchCase="'pending'"
Lukas Burgey's avatar
Lukas Burgey committed
15
						mat-button mat-icon-button style="display: inline-block; vertical-align: middle"
16
						matTooltip="This deployment is in progress">
17 18
						<mat-progress-spinner diameter="24" mode="indeterminate"></mat-progress-spinner>
					</span>
Lukas Burgey's avatar
Lukas Burgey committed
19 20
					<button *ngSwitchCase="'done'"
						mat-button mat-icon-button style="display: inline-block; vertical-align: middle"
21
						matTooltip="This deployment was successful">
22
						<mat-icon style="vertical-align: middle">done</mat-icon>
Lukas Burgey's avatar
Lukas Burgey committed
23 24 25
					</button>
					<button *ngSwitchCase="'failed'"
						mat-button mat-icon-button style="display: inline-block; vertical-align: middle"
26 27
						matTooltip="This deployment has failed">
						<mat-icon style="vertical-align: middle">error</mat-icon>
Lukas Burgey's avatar
Lukas Burgey committed
28 29 30 31
					</button>
					<button *ngSwitchCase="'rejected'"
						(click)="dialog.openQuestionnaire(userService.taskItem(site, serviceData))"
						mat-button mat-icon-button style="display: inline-block; vertical-align: middle"
32
						matTooltip="This deployment was rejected. The client needs more data.">
Lukas Burgey's avatar
Lukas Burgey committed
33 34
						<mat-icon>warning</mat-icon>
					</button>
35
				</span>
36 37 38 39 40 41 42 43 44 45 46
			</td>
		</tr>
		<tr>
			<td style="padding-right: 35px;"
					*ngFor="let group of serviceData.groups"
					 matTooltip="Can be used with membership of group {{ group.name }}">
				<mat-icon style="vertical-align: middle; padding-right: 5px;">lock outline</mat-icon>
				{{ group.name }}
			</td>
		</tr>
	</table>
Lukas Burgey's avatar
Lukas Burgey committed
47
	<mat-action-row>
48 49
		<div *ngIf="userService.user.ssh_keys.length > 0; then boxes else upload"></div>
		<ng-template #boxes>
50
			<span style="margin-right: 15px;">
51 52
				SSH Keys:
			</span>
53 54 55 56 57 58
			<mat-checkbox *ngFor="let key of userService.user.ssh_keys"
				 style="margin-right: 8px"
				 [checked]="isDeployed(key)"
				 (change)="deploymentChange(key)">
				{{ key.name }}
			</mat-checkbox>
59 60 61 62 63
		</ng-template>
		<ng-template #upload>
			<span style="margin-right: 15px;">
				Please upload an SSH Key to use this service:
			</span>
64
			<button mat-icon-button (click)="dialog.openSshKeys()"><mat-icon>vpn_key</mat-icon></button>
65
		</ng-template>
Lukas Burgey's avatar
Lukas Burgey committed
66 67
	</mat-action-row>
</mat-expansion-panel>