diff options
author | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-30 17:04:11 +0800 |
---|---|---|
committer | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-30 17:04:19 +0800 |
commit | da3c80aefd89bfa3f728c02d9d05eee18bb87cd9 (patch) | |
tree | 6b83e18bfcf9282deda0c6ba222816d8ceb4e6f3 /usecaseui-portal/src/app/ccvpn-creation | |
parent | e26e7ee1405e68e358dbc45ea150527d930d936a (diff) |
Fix instance instantiation for CCVPN
Change-Id: I5d6598359cd57494a289246c1d6abfea8b9d2800
Issue-ID: USECASEUI-220
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/ccvpn-creation')
-rw-r--r-- | usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html | 26 | ||||
-rw-r--r-- | usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts | 2 |
2 files changed, 12 insertions, 16 deletions
diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html index 486c11e8..b33a5ae9 100644 --- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html +++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html @@ -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> @@ -100,24 +100,18 @@ <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> <span class="action" (click)="deleteSite(i+1)"><i diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts index ed30baa0..30d3dc46 100644 --- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts +++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts @@ -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); |