service.component.html 1.99 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 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
	<table width="60%">
		<tr style="margin-bottom: 15px;">
			<td *ngFor="let site of serviceData.site">
				<span matTooltip="Provided at site {{ site.name }}">
					<mat-icon style="vertical-align: middle; padding-right: 5px;">storage</mat-icon>
					{{ site.name }}
				</span>
				<span *ngIf="userService.taskInProgress(site, serviceData); then progress else done"></span>
				<ng-template #progress matTooltip="A task is in progress">
					<span style="display: inline-block; vertical-align: middle">
						<mat-progress-spinner diameter="24" mode="indeterminate"></mat-progress-spinner>
					</span>
				</ng-template>
				<ng-template #done>
					<span matTooltip="All tasks are done">
						<mat-icon style="vertical-align: middle">done</mat-icon>
					</span>
				</ng-template>
			</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
35
	<mat-action-row>
Lukas Burgey's avatar
Lukas Burgey committed
36 37
		<div *ngIf="userService.user.ssh_keys.length > 0; then boxes else upload"></div>
		<ng-template #boxes>
38
			<span style="margin-right: 15px;">
Lukas Burgey's avatar
Lukas Burgey committed
39 40
				SSH Keys:
			</span>
41 42 43 44 45 46
			<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
47 48 49 50 51
		</ng-template>
		<ng-template #upload>
			<span style="margin-right: 15px;">
				Please upload an SSH Key to use this service:
			</span>
52
			<button mat-icon-button (click)="dialog.openSshKeys()"><mat-icon>vpn_key</mat-icon></button>
Lukas Burgey's avatar
Lukas Burgey committed
53
		</ng-template>
Lukas Burgey's avatar
Lukas Burgey committed
54 55
	</mat-action-row>
</mat-expansion-panel>