|
1 | 1 | <div *ngIf="filteredContractDefinitions$ | async as contractDefinitions" id="wrapper"> |
2 | | - <div class="container"> |
3 | | - <mat-form-field appearance="outline" class="search-form-field" color="accent"> |
4 | | - <mat-label>Search definitions</mat-label> |
5 | | - <input (input)="onSearch()" [(ngModel)]="searchText" matInput> |
6 | | - <mat-icon matPrefix>search</mat-icon> |
7 | | - <button (click)="searchText=''; onSearch()" *ngIf="searchText" mat-icon-button matSuffix> |
8 | | - <mat-icon>close</mat-icon> |
9 | | - </button> |
10 | | - </mat-form-field> |
11 | | - |
12 | | - <mat-paginator [length]="contractDefinitions.length" hidePageSize="true" pageSize="contractDefinitions.length"> |
13 | | - </mat-paginator> |
14 | | - |
15 | | - <button (click)="onCreate()" color="accent" mat-stroked-button> |
16 | | - <mat-icon>add_circle_outline</mat-icon> |
17 | | - Create contract definition |
| 2 | + <div class="container"> |
| 3 | + <mat-form-field appearance="outline" class="search-form-field" color="accent"> |
| 4 | + <mat-label>Search definitions</mat-label> |
| 5 | + <input (input)="onSearch()" [(ngModel)]="searchText" matInput> |
| 6 | + <mat-icon matPrefix>search</mat-icon> |
| 7 | + <button (click)="searchText=''; onSearch()" *ngIf="searchText" mat-icon-button matSuffix> |
| 8 | + <mat-icon>close</mat-icon> |
| 9 | + </button> |
| 10 | + </mat-form-field> |
| 11 | + |
| 12 | + <button (click)="onCreate()" color="accent" mat-stroked-button> |
| 13 | + <mat-icon>add_circle_outline</mat-icon> |
| 14 | + Create contract definition |
| 15 | + </button> |
| 16 | + |
| 17 | + </div> |
| 18 | + |
| 19 | + <div fxLayout="row wrap" fxLayoutAlign="start start"> |
| 20 | + |
| 21 | + <mat-card *ngFor="let contractDefinition of contractDefinitions" class="contract-definition-card"> |
| 22 | + <mat-card-header> |
| 23 | + <mat-icon mat-card-avatar>policy</mat-icon> |
| 24 | + <mat-card-title>{{contractDefinition.id}}</mat-card-title> |
| 25 | + </mat-card-header> |
| 26 | + <mat-card-content> |
| 27 | + <mat-list dense> |
| 28 | + <mat-list-item> |
| 29 | + <mat-icon matListItemIcon>policy</mat-icon> |
| 30 | + <div class="policy-name" matListItemTitle>Access policy</div> |
| 31 | + <div matListItemLine>{{contractDefinition.accessPolicyId}}</div> |
| 32 | + </mat-list-item> |
| 33 | + <mat-list-item> |
| 34 | + <mat-icon matListItemIcon>policy</mat-icon> |
| 35 | + <div class="policy-name" matListItemTitle>Contract policy</div> |
| 36 | + <div matListItemLine>{{contractDefinition.contractPolicyId}}</div> |
| 37 | + </mat-list-item> |
| 38 | + <mat-list-item> |
| 39 | + <div class="policy-assets" matListItemTitle>Assets</div> |
| 40 | + <mat-icon matListItemIcon>policy</mat-icon> |
| 41 | + |
| 42 | + <div matListItemLine *ngFor="let criterion of contractDefinition.assetsSelector">{{criterion.operandRight}}</div> |
| 43 | + </mat-list-item> |
| 44 | + </mat-list> |
| 45 | + |
| 46 | + </mat-card-content> |
| 47 | + |
| 48 | + <mat-divider></mat-divider> |
| 49 | + <mat-card-actions class="card-actions"> |
| 50 | + <button (click)="onDelete(contractDefinition)" color="warn" mat-stroked-button> |
| 51 | + <mat-icon>delete_sweep</mat-icon> Delete |
18 | 52 | </button> |
19 | | - |
20 | | - </div> |
21 | | - |
22 | | - <div fxLayout="row wrap" fxLayoutAlign="start start"> |
23 | | - |
24 | | - <mat-card *ngFor="let contractDefinition of contractDefinitions" class="contract-definition-card"> |
25 | | - <mat-card-header> |
26 | | - <mat-icon mat-card-avatar>policy</mat-icon> |
27 | | - <mat-card-title>{{contractDefinition.id}}</mat-card-title> |
28 | | - </mat-card-header> |
29 | | - <mat-card-content> |
30 | | - <mat-list dense> |
31 | | - <mat-list-item> |
32 | | - <mat-icon matListItemIcon>policy</mat-icon> |
33 | | - <div class="policy-name" matListItemTitle>Access policy</div> |
34 | | - <div matListItemLine>{{contractDefinition.accessPolicyId}}</div> |
35 | | - </mat-list-item> |
36 | | - <mat-list-item> |
37 | | - <mat-icon matListItemIcon>policy</mat-icon> |
38 | | - <div class="policy-name" matListItemTitle>Contract policy</div> |
39 | | - <div matListItemLine>{{contractDefinition.contractPolicyId}}</div> |
40 | | - </mat-list-item> |
41 | | - </mat-list> |
42 | | - |
43 | | - <mat-expansion-panel> |
44 | | - <mat-expansion-panel-header> |
45 | | - <mat-panel-title> |
46 | | - Selectors |
47 | | - </mat-panel-title> |
48 | | - </mat-expansion-panel-header> |
49 | | - <mat-list dense> |
50 | | - <mat-list-item *ngFor="let criterion of contractDefinition.assetsSelector"> |
51 | | - <mat-icon matListItemIcon>check</mat-icon> |
52 | | - <!-- mandatoryValue method needs to be used because of this bug: https://github.com/Think-iT-Labs/edc-connector-client/issues/94 --> |
53 | | - <div matListItemLine>{{criterion.mandatoryValue('edc', 'operandLeft')}} {{criterion.mandatoryValue('edc', 'operator')}} {{criterion.mandatoryValue('edc', 'operandRight')}}</div> |
54 | | - </mat-list-item> |
55 | | - </mat-list> |
56 | | - </mat-expansion-panel> |
57 | | - |
58 | | - </mat-card-content> |
59 | | - |
60 | | - <mat-divider inset></mat-divider> |
61 | | - <mat-card-actions class="card-actions"> |
62 | | - <button (click)="onDelete(contractDefinition)" color="warn" mat-stroked-button> |
63 | | - <mat-icon>delete_sweep</mat-icon> Delete |
64 | | - </button> |
65 | | - </mat-card-actions> |
66 | | - </mat-card> |
67 | | - </div> |
| 53 | + </mat-card-actions> |
| 54 | + </mat-card> |
| 55 | + </div> |
68 | 56 | </div> |
0 commit comments