998ae28792f7506fd12839d22cc1621635937b3c
[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 #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>Service Instance Id</th>
18                     <th>Service Instance Name</th>
19                     <th>Service Type</th>
20                     <th>S-NSSAI</th>
21                     <th>Status</th>
22                     <th width="130px">Aciton</th>
23                     <th width="100px">Detail</th>
24                 </tr>
25             </thead>
26             <tbody>
27                 <ng-template ngFor let-data [ngForOf]="basicTable.data" let-i="index">
28                     <tr>
29                         <td>{{ data.service_instance_id }}</td>
30                         <td>{{ data.service_instance_name }}</td>
31                         <td>{{ data.service_type }}</td>
32                         <td>{{ data.service_snssai }}</td>
33                         <td>
34
35                             <span class="marginLeft10">
36                                 {{ data.last_operation_progress !== 100?data.last_operation_type+'&nbsp;&nbsp;&nbsp;'+data.last_operation_progress+'%':data.orchestration_status }}
37                             </span>
38                             <nz-progress *ngIf="data.last_operation_progress !== 100"
39                                 [nzPercent]="data.last_operation_progress" [nzShowInfo]="false" nzStatus="active">
40                             </nz-progress>
41                         </td>
42                         <td>
43                             <nz-switch [ngModel]="data.orchestration_status==='activated'?true:false"
44                                 [nzDisabled]="data.last_operation_progress !== 100"
45                                 (ngModelChange)="switchChange(data,i)"></nz-switch>
46                             <i [ngClass]="{'cannotclick':data.last_operation_progress !== 100}" nz-icon
47                                 nzType="poweroff" nzTheme="outline" class="anticon anticon-poweroff"
48                                 (click)="terminate(data)"></i>
49                         </td>
50                         <td>
51                             <!--<i [ngClass]="{'cannotclick':data.last_operation_progress !== 100}"-->
52                             <!--class="anticon anticon-bars"-->
53                             <!--(click)="showdetail(data)">-->
54                             <!--</i>-->
55                             <a (click)="showdetail(data)"
56                                 [ngClass]="{'cannotclick':data.last_operation_progress !== 100}">View Detail</a>
57                         </td>
58                     </tr>
59                 </ng-template>
60             </tbody>
61         </nz-table>
62     </div>
63 </div>
64 <app-notification #notification [isServicesList]="false" [parentComponent]="'slicing'"></app-notification>