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