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