80fcc763f713bacf4f18017b76af2645a2b64191
[usecase-ui.git] /
1 <div class="slicing-resource-table">
2     <div nz-row>
3         <div nz-col nzSpan="12" class="task_status">
4             <span>Status : </span>
5             <nz-select nzShowSearch nzPlaceHolder="Select a processing status" [(ngModel)]="selectedValue"
6                        (ngModelChange)="getListOfProcessingStatus()">
7                 <nz-option *ngFor="let item of statusOptions" [nzLabel]="item" [nzValue]="item"></nz-option>
8             </nz-select>
9         </div>
10     </div>
11     <div class="slicing-resource-table-list">
12         <nz-table
13                 #basicTable
14                 [nzData]="listOfData"
15                 [nzFrontPagination]="false"
16                 nzShowSizeChanger
17                 [nzPageSizeOptions]="[5,10,15,20]"
18                 [nzTotal]='total'
19                 [(nzPageSize)]="pageSize"
20                 [(nzPageIndex)]='pageIndex'
21                 [nzLoading]="loading"
22                 (nzPageIndexChange)="searchData()"
23                 (nzPageSizeChange)="searchData(true)"
24         >
25             <thead>
26             <tr>
27                 <th>Service Instance Id</th>
28                 <th>Service Instance Name</th>
29                 <th>Service Type</th>
30                 <th>S-NSSAI</th>
31                 <th>Status</th>
32                 <th width="130px">Aciton</th>
33                 <th width="100px">Detail</th>
34             </tr>
35             </thead>
36             <tbody>
37             <ng-template ngFor let-data [ngForOf]="basicTable.data" let-i="index">
38                 <tr>
39                     <td>{{ data.service_instance_id }}</td>
40                     <td>{{ data.service_instance_name }}</td>
41                     <td>{{ data.service_type }}</td>
42                     <td>{{ data.service_snssai }}</td>
43                     <td>
44
45                         <span  class="marginLeft10">
46                                  {{ data.last_operation_progress !== 100?data.last_operation_type+'&nbsp;&nbsp;&nbsp;'+data.last_operation_progress+'%':data.orchestration_status }}
47                         </span>
48                         <nz-progress *ngIf="data.last_operation_progress !== 100"
49                                      [nzPercent]="data.last_operation_progress"
50                                      [nzShowInfo]="false" nzStatus="active"></nz-progress>
51                     </td>
52                     <td>
53                         <nz-switch [ngModel]="data.orchestration_status==='activated'?true:false"
54                                    [nzDisabled]="data.last_operation_progress !== 100"
55                                    (ngModelChange)="switchChange(data,i)"
56                         ></nz-switch>
57                         <i [ngClass]="{'cannotclick':data.last_operation_progress !== 100}"
58                            nz-icon
59                            nzType="poweroff"
60                            nzTheme="outline"
61                            class="anticon anticon-poweroff"
62                            (click)="terminate(data)"
63                         ></i>
64                     </td>
65                     <td>
66                         <!--<i [ngClass]="{'cannotclick':data.last_operation_progress !== 100}"-->
67                            <!--class="anticon anticon-bars"-->
68                            <!--(click)="showdetail(data)">-->
69                         <!--</i>-->
70                         <a (click)="showdetail(data)" [ngClass]="{'cannotclick':data.last_operation_progress !== 100}">detail</a>
71                     </td>
72                 </tr>
73             </ng-template>
74             </tbody>
75         </nz-table>
76     </div>
77 </div>