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