diff options
author | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-24 17:42:52 +0800 |
---|---|---|
committer | guochuyicmri <guochuyi@chinamobile.com> | 2019-05-24 17:48:43 +0800 |
commit | 4fa6adb91b4a31cd26d24d834477a1fa94d2a83d (patch) | |
tree | c83f20e1b50a33ee2f977152677056d67dd9eea2 /usecaseui-portal/src/app/ccvpn-detail | |
parent | 094dd6840bfa4cebc120b0735797ff3617371296 (diff) |
Fix instance instantiation for CCVPN
Change-Id: Iaf7e4d15c95aa9de0e4cace09b365ce409201d32
Issue-ID: USECASEUI-220
Signed-off-by: guochuyicmri <guochuyi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/ccvpn-detail')
-rw-r--r-- | usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.ts b/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.ts index 1af2b437..c11b159e 100644 --- a/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.ts +++ b/usecaseui-portal/src/app/ccvpn-detail/ccvpn-detail.component.ts @@ -107,7 +107,7 @@ export class CcvpnDetailComponent implements OnInit { let sdwanvpnresource_list = inputs[items][0]; Object.keys(sdwanvpnresource_list).forEach((its) => { let input = {}; - if(its.search("sitelan") != -1 && sdwanvpnresource_list[its] instanceof Array === true){ + if(its.search("site") != -1 && sdwanvpnresource_list[its] instanceof Array === true){ Object.keys(sdwanvpnresource_list[its][0]).forEach((i) => { let input1 = {}; input1[i] = sdwanvpnresource_list[its][i]; @@ -143,7 +143,7 @@ export class CcvpnDetailComponent implements OnInit { sitelanKey[its] = []; this.bodyTemplateParameter[items].push(sitelanKey); } - if(its.search("site") != -1 && sdwansiteresource_list[its] instanceof Array === true){ + if(its.search("site") != -1 && its.search("device") == -1 && sdwansiteresource_list[its] instanceof Array === true){ this.templateParameters["site"]["sdwansitewan_list"][0] = sdwansiteresource_list[its][0]; let sitelanKey = {}; sitelanKey[its] = []; @@ -763,7 +763,7 @@ export class CcvpnDetailComponent implements OnInit { if(item.search("site") != -1){ siteresource = item; this.bodyTemplateParameter[item].map((items,index) => { - if(Object.keys(items)[0].search("site") != -1){ + if(Object.keys(items)[0].search("site") != -1 && Object.keys(items)[0].search("device") == -1){ sitewan = Object.keys(items)[0] } if(Object.keys(items)[0].search("device") != -1){ @@ -789,7 +789,7 @@ export class CcvpnDetailComponent implements OnInit { }); this.siteTableData.forEach((item, index) => { Object.keys(item).map((items,index) => { - if(items.search("site") != -1 && item[items] instanceof Array === true){ + if(items.search("site") != -1 && items.search("device") == -1 && item[items] instanceof Array === true){ this.modifyJosnKey(item,items,sitewan) } if(items.search("device") != -1){ |