credentials.component.html 2.44 KB
Newer Older
1
<div *ngIf="(stateItem$ | async) as stateItem" class="mat-typography">
2
3
  <h2>Credentials</h2>
  <p>
4
  For access to the service {{ stateItem.service.name }} at {{ stateItem.service.site.name }} additional credentials are needed.
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  The additional credentials are listed below.
  </p>
  <div *ngIf="credentialCount > 0" style="margin-bottom: 50px;">
	<mat-table [dataSource]="table">
	  <ng-container matColumnDef="name">
		<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
		<mat-cell *matCellDef="let element">{{ element.name}}</mat-cell>
	  </ng-container>
	  <ng-container matColumnDef="value">
		<mat-header-cell *matHeaderCellDef>Value</mat-header-cell>
		<mat-cell *matCellDef="let element">{{ element.value }}</mat-cell>
	  </ng-container>
	  <mat-header-row *matHeaderRowDef="columns"></mat-header-row>
	  <mat-row *matRowDef="let row; columns: columns;"></mat-row>
	</mat-table>
  </div>
  <div>
22
23
	<h2>Key Information</h2>
	<p>
24
	 These are the current states of your keys at this service. The keys listed as "deployed" can be used to access the service via ssh.
25
	</p>
26
	<table>
27
28
	  <thead>
		<tr>
29
30
		  <td>State</td>
		  <td>Key</td>
31
32
33
34
35
		  <td></td>
		</tr>
	  </thead>
	  <tbody>
		<tr *ngFor="let state of stateItem.credential_states">
36
37
		  <td>
			<span [ngSwitch]="state.state" class="spaced">
38
39
40
41
42
43
44
45
46
47
48
49
50
51
			  <mat-icon *ngSwitchCase="'deployed'">call_made</mat-icon>
			  <mat-icon *ngSwitchCase="'questionnaire'">warning</mat-icon>
			  <mat-progress-spinner *ngSwitchCase="'deployment_pending'" diameter="24" mode="indeterminate"></mat-progress-spinner>
			  <mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="24" mode="indeterminate"></mat-progress-spinner>
			  <mat-icon *ngSwitchCase="'not_deployed'" mat-icon-button>call_received</mat-icon>
			  <mat-icon *ngSwitchCase="'failed'" mat-icon-button>error</mat-icon>
			  <mat-icon *ngSwitchCase="'rejected'" mat-icon-button>error</mat-icon>
			  <mat-icon *ngSwitchDefault mat-icon-button>call_received</mat-icon>
			</span>
			{{ state.state }}
		  </td>
		  <td style="font-size: 110%;">
			{{ state.credential.name }}
		  </td>
52
53
		  <td *ngIf="state.is_pending">
			<span class="spaced">
54
55
			  <mat-progress-spinner diameter="24" mode="indeterminate"></mat-progress-spinner>
			</span>
56
57
58
59
60
61
			<span *ngIf="state.state_target === 'deployed'">
			  Key is being deployed
			</span>
			<span *ngIf="state.state_target === 'not_deployed'">
			  Key is being removed
			</span>
62
63
64
65
66
		  </td>
		</tr>
	  </tbody>
	</table>
  </div>
67
</div>