Fix instance instantiation for CCVPN 44/88844/1
authorguochuyicmri <guochuyi@chinamobile.com>
Thu, 30 May 2019 09:04:11 +0000 (17:04 +0800)
committerguochuyicmri <guochuyi@chinamobile.com>
Thu, 30 May 2019 09:04:19 +0000 (17:04 +0800)
Change-Id: I5d6598359cd57494a289246c1d6abfea8b9d2800
Issue-ID: USECASEUI-220
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts

index 486c11e..b33a5ae 100644 (file)
@@ -62,8 +62,7 @@
                         <thead>
                         <tr>
                             <th width="30%"> NO.</th>
-                            <th width="30%"> Name</th>
-                            <th width="30%"> topology</th>
+                            <th *ngFor="let key of getKeys(this.sotnInfo)">{{key.split("_")[1] || key}}</th>
                             <th width="10%"> Action</th>
                         </tr>
                         </thead>
@@ -71,8 +70,9 @@
                         <!-- <ng-template ngFor let-data [ngForOf]="siteTable.data" let-i="index"> -->
                         <tr *ngFor="let item of sotnVpnTable.data; let i = index; ">
                             <td>{{i+1}}</td>
-                            <td>{{item.sdwanvpn_name}}</td>
-                            <td>{{item.sdwanvpn_topology}}</td>
+                            <td *ngFor="let keys of getKeys(this.sotnInfo);let a = index;">
+                                {{item[keys]}}
+                            </td>
                             <td>
                                 <span class="action" (click)="editSotnVpn(i+1)"><i class="anticon anticon-edit"></i></span>
                                 &nbsp;
                         <thead>
                         <tr>
                             <th nzWidth="10%"> NO.</th>
-                            <th nzWidth="15%"> Name</th>
-                            <th nzWidth="15%"> Description</th>
-                            <th nzWidth="15%"> Post Code</th>
-                            <th nzWidth="15%"> Address</th>
-                            <th nzWidth="15%"> emails</th>
-                            <th nzWidth="15%"> Action</th>
+                            <th *ngFor="let key of getKeys(this.siteBaseData)">{{key.split("_")[1] || key}}</th>
+                            <th nzWidth="20%" style="text-align: center"> Action</th>
                         </tr>
                         </thead>
                         <tbody>
                         <!-- <ng-template ngFor let-data [ngForOf]="siteTable.data" let-i="index"> -->
                         <tr *ngFor="let item of siteTable.data; let i = index; ">
                             <td>{{i+1}}</td>
-                            <td>{{item.sdwandevice_list[0].name}}</td>
-                            <td>{{item.sdwansite_description}}</td>
-                            <td>{{item.sdwansite_postcode}}</td>
-                            <td>{{item.sdwansite_address}}</td>
-                            <td>{{item.sdwansite_emails}}</td>
-                            <td>
+                            <td *ngFor="let keys of getKeys(this.siteBaseData);let a = index;">
+                                {{item[keys]}}
+                            </td>
+                            <td style="text-align: center">
                                 <span class="action" (click)="editSite(i+1)"><i class="anticon anticon-edit"></i></span>
                                 &nbsp;
                                 <span class="action" (click)="deleteSite(i+1)"><i
index ed30baa..30d3dc4 100644 (file)
@@ -319,6 +319,7 @@ export class CcvpnCreationComponent implements OnInit {
           "sdwansitelan_list":[]
         };
         inputs = Object.assign(inputs, this.sotnInfo);
+        console.log(this.sotnInfo,"this.sotnInfo");
         inputs["sdwansitelan_list"] = this.sotnSdwansitelanData.map((item) => {
             return Object.assign({}, item);
         });
@@ -396,6 +397,7 @@ export class CcvpnCreationComponent implements OnInit {
             "sdwansitewan_list": []
         };
         inputs = Object.assign(inputs, this.siteBaseData);
+        console.log(this.siteBaseData,"this.siteBaseData");
         inputs["sdwandevice_list"][0] = Object.assign({}, this.siteCpeData);
         inputs["sdwansitewan_list"] = this.siteWanData.map((item) => {
             return Object.assign({}, item);