c3f2d63175fa6d836aa570ea444ce5cbc9abd78a
[usecase-ui.git] /
1 <div class="slicing-resource-table slicing-resource_tab">
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 #basicTable [nzData]="listOfData" [nzFrontPagination]="false" nzShowSizeChanger
13               [nzPageSizeOptions]="[5,10,15,20]" [nzTotal]='total' [(nzPageSize)]="pageSize" [(nzPageIndex)]='pageIndex'
14               [nzLoading]="loading" (nzPageIndexChange)="searchData()" (nzPageSizeChange)="searchData(true)">
15       <thead>
16       <tr>
17         <th width=100>No</th>
18         <th width=280>Service Instance Id</th>
19         <th width=200>Service Instance Name</th>
20         <th width=110>Service Type</th>
21         <th width=110>S-NSSAI</th>
22         <th width=110>Status</th>
23         <th width=180>Aciton</th>
24       </tr>
25       </thead>
26       <tbody>
27       <ng-template ngFor let-data [ngForOf]="basicTable.data" let-i="index">
28         <tr>
29           <td>{{i+1}}</td>
30           <td>{{ data.service_id }}</td>
31           <td>{{ data.service_name }}</td>
32           <td>{{ data.service_type?data.service_type:'--' }}</td>
33           <td>{{ data.service_snssai }}</td>
34           <td>
35                             <span class="marginLeft10">
36                                 <span *ngIf="data.last_operation_process && data.last_operation_process !== '100'">
37                                     {{data.last_operation_process+'%'}}
38                                 </span>
39                                 <br>
40                                 {{data.service_status}}
41                             </span>
42             <br>
43           </td>
44           <td>
45             <div class="action-icon">
46               <nz-switch [ngModel]="data.service_status==='activated'?true:false"
47                          [nzDisabled]="data.last_operation_type && data.last_operation_process && data.last_operation_process !== '100'"
48                          (ngModelChange)="switchChange(data,i)"></nz-switch>
49               <nz-progress
50                       *ngIf="data.last_operation_type && data.last_operation_process && data.last_operation_process !== '100' && data.last_operation_type !== 'DELETE'"
51                       [nzPercent]="data.last_operation_process" [nzShowInfo]="false" nzStatus="active">
52               </nz-progress>
53             </div>
54             <div class="action-icon">
55               <i [ngClass]="{'cannotclick': data.last_operation_type && data.last_operation_process && data.last_operation_process !== '100' && (data.last_operation_type !== 'DELETE' || data.service_status==='activated')}"
56                  nz-icon nzType="poweroff" nzTheme="outline" class="anticon anticon-poweroff"
57                  (click)="terminate(data)"></i>
58               <nz-progress
59                       *ngIf="data.last_operation_type && data.last_operation_process && data.last_operation_process !== '100' && terminateStart"
60                       [nzPercent]="data.last_operation_process" [nzShowInfo]="false" nzStatus="active">
61               </nz-progress>
62             </div>
63           </td>
64         </tr>
65       </ng-template>
66       </tbody>
67     </nz-table>
68   </div>
69 </div>