vo.component.html 4.81 KB
Newer Older
1 2
<mat-expansion-panel>
	<mat-expansion-panel-header>
3
		<mat-panel-title style="min-width: 100px;">{{ group.name }}</mat-panel-title>
4
	</mat-expansion-panel-header>
5 6 7 8 9 10 11 12 13 14 15 16 17
	<div *ngIf="deploymentMapped()">
		<div [ngSwitch]="deployment.state_target">
			<span *ngSwitchCase="'not_deployed'">
			You currently did not request access to services of this VO.
			</span>
			<span *ngSwitchCase="'deployed'">
			You  requested access to services of this VO.
			</span>
		</div>
	</div>
	<p *ngIf="!deploymentMapped()">
		No deployment is currently mapped to this VO.
	</p>
18 19 20
	<div *ngIf="userService.getServices(group).length > 0; then serviceList else noServiceList"></div>
	<ng-template #serviceList>
		<p>
Lukas Burgey's avatar
Lukas Burgey committed
21
		These services are provided for members of this VO. You can inspect credentials by clicking on the arrows.
22
		</p>
23
		<table style="margin-bottom: 30px; margin: auto;">
24 25
			<thead>
				<tr>
26 27 28 29
					<td style="min-width: 100px;">Site</td>
					<td style="min-width: 100px;">Service</td>
					<td style="min-width: 100px;">State</td>
					<td style="min-width: 100px;">Message</td>
30 31 32
				</tr>
			</thead>
			<tbody>
33 34 35
				<ng-container *ngFor="let site of sites()">
					<tr *ngFor="let service of servicesBySite(site);" style="height: 42px;">
						<td>
36
							<span style="margin-right: 10px;" matTooltip="Site {{ site.name }} provides the service {{ service.name }} for members of {{ group.name }}">
37 38
								<mat-icon>account_balance</mat-icon>
								{{ site.name }}
39
							</span>
40 41 42 43 44
						</td>
						<td>
							<span style="margin-right: 10px;" matTooltip="{{ userService.serviceDescription(service) }}">
								<mat-icon>web</mat-icon>
								{{ service.name }}
45
							</span>
46
						</td>
47 48 49
						<td>
							<span [ngSwitch]="stateItem(service, site)?.state" class="childs-inline">
								<button *ngSwitchCase="'deployed'" (click)="dialog.openCredentials(service, stateItem(service, site))" mat-button mat-icon-button matTooltip="The credentials are deployed for the service {{ service.name }}. Click to see details.">
50 51
									<mat-icon>call_made</mat-icon>
								</button>
52
								<button *ngSwitchCase="'questionnaire'" (click)="dialog.openQuestionnaire(stateItem(service, site))" mat-button mat-icon-buttonmatTooltip="This site needs more data to deploy the keys. Please click to submit the data.">
53 54
									<mat-icon>warning</mat-icon>
								</button>
55
								<span *ngSwitchCase="'deployment_pending'" mat-icon-button matTooltip="Waiting for the deployment of the credentials to the site {{ site.name }}">
56 57
									<mat-progress-spinner diameter="24" mode="indeterminate"></mat-progress-spinner>
								</span>
58
								<span *ngSwitchCase="'removal_pending'" mat-icon-button matTooltip="Waiting for the removal of the credentials from the site {{ site.name }}">
59 60
									<mat-progress-spinner diameter="24" mode="indeterminate"></mat-progress-spinner>
								</span>
61
								<button *ngSwitchCase="'not_deployed'" mat-icon-button matTooltip="The credentials are not deployed for the service {{ service.name }}.">
62 63
									<mat-icon>call_received</mat-icon>
								</button>
64
								<button *ngSwitchCase="'failed'" (click)="dialog.openMessage(stateItem(service, site))" mat-icon-button matTooltip="Site {{ site.name }} failed to deploy the credentials. The deployment will be retried. Click for details.">
65 66
									<mat-icon>error</mat-icon>
								</button>
67
								<button *ngSwitchCase="'rejected'" (click)="dialog.openMessage(stateItem(service, site))" mat-icon-button matTooltip="Site {{ site.name }} rejected the deployment of the credentials. Click for details.">
68 69
									<mat-icon>error</mat-icon>
								</button>
70
								<button *ngSwitchDefault mat-icon-button matTooltip="Access to this service was never requested.">
71
									<mat-icon>call_received</mat-icon>
Lukas Burgey's avatar
Lukas Burgey committed
72
								</button>
73
							</span>
74
						</td>
75 76 77 78 79
						<td>
							<p>
							{{ stateItem(service, site)?.message }}
							</p>
						</td>
80 81
					</tr>
				</ng-container>
82 83
			</tbody>
		</table>
84 85 86
	</ng-template>
	<ng-template #noServiceList>
		<p>
87 88
		Currently, no services need membership of this VO. You can select keys for this VO anyway. We will deploy them to new services, that need
		membership of this VO.
89 90 91
		</p>
	</ng-template>
	<mat-action-row>
92 93 94 95 96 97 98 99 100 101 102
		<div [ngSwitch]="deployment?.state_target">
			<button *ngSwitchCase="'not_deployed'" mat-raised-button color="accent" matTooltip="TODO" (click)="changeDeployment('add')">
				Deploy credentials to services of VO {{ group.name }}
			</button>
			<button *ngSwitchCase="'deployed'" mat-raised-button color="accent" matTooltip="TODO" (click)="changeDeployment('remove')">
				Remove credentials from services of VO {{ group.name }}
			</button>
			<button *ngSwitchDefault mat-raised-button color="accent" matTooltip="TODO" (click)="changeDeployment('add')">
				Deploy credentials to future services of VO {{ group.name }}
			</button>
		</div>
103 104
	</mat-action-row>
</mat-expansion-panel>