summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/ccvpn-creation
diff options
context:
space:
mode:
authorguochuyicmri <guochuyi@chinamobile.com>2019-05-14 18:41:02 +0800
committerguochuyicmri <guochuyi@chinamobile.com>2019-05-14 18:41:09 +0800
commitcd934c497a6bf26992bcb42e27a179479001658b (patch)
treeee5446472dc01cf1cca77ed1ab363a50bdbfba99 /usecaseui-portal/src/app/ccvpn-creation
parente044dfe80bcefb9004c8b6d3156d15ac56426dad (diff)
Fix instance instantiation for CCVPN
Change-Id: Ibf9be061fb6a461cd6c73ccf56a6afe72928157d 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.css12
-rw-r--r--usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html4
-rw-r--r--usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts44
3 files changed, 23 insertions, 37 deletions
diff --git a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css
index ce546cb8..23ea9d7a 100644
--- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css
+++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.css
@@ -38,18 +38,24 @@ hr {
position: relative;
display: inline-block;
}
-.model .back {
+.model .back,.model .back:hover{
position: absolute;
top: 10px;
right: 20px;
display: inline-block;
width: 35px;
height: 35px;
- background:#ffffff!important;
+ background:url("../../assets/images/Return-icon.png") no-repeat!important;
+ background-size: 100%!important;
border-radius:4px;
color: #D7D7D7;
+ cursor: pointer;
/*border: 1px solid #ffffff;*/
}
+.model .back:hover{
+ background: url("../../assets/images/Return-icon-active.png")!important;
+ background-size: 100%!important;
+}
.top-title h3.title {
height: 35px;
width: 80%;
@@ -239,7 +245,7 @@ hr {
border-radius:4px;
border:1px solid #D7D7D7;
}
-.sitemodel h3 button:hover,.model .back:hover,.sotnnpnmodel h3 button:hover{
+.sitemodel h3 button:hover,.sotnnpnmodel h3 button:hover{
background:#ffffff;
color: #0DA9E2;
border:1px solid #0DA9E2;
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 3409c8fa..486c11e8 100644
--- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
+++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.html
@@ -22,9 +22,7 @@
<div class="fl" style="width: 20%">
<button class="submit" nz-button (click)="submit()"><span> {{"i18nTextDefine_Create" | translate}} </span>
</button>
- <button class="back" nz-button (click)="goback()">
- <i class="anticon anticon-arrow-left" style="transform: scale(1.5)"></i>
- </button>
+ <button class="back" nz-button (click)="goback()"></button>
</div>
</div>
<!-- chart -->
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 b3db8906..f2f35221 100644
--- a/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts
+++ b/usecaseui-portal/src/app/ccvpn-creation/ccvpn-creation.component.ts
@@ -27,14 +27,14 @@ import {el} from "@angular/platform-browser/testing/src/browser_util";
export class CcvpnCreationComponent implements OnInit {
constructor(private myhttp:MyhttpService) { }
+ @Input() createParams;
+ @Input() ccvpn_temParametersContent;
+ @Output() closeCreate = new EventEmitter();
ngOnInit() {
- this.getTemParameters();
+ this.getccvpnTemParameters(this.ccvpn_temParametersContent);
}
- @Input() createParams;
- @Output() closeCreate = new EventEmitter();
-
//tabBarStyle
tabBarStyle = {
"height": "58px",
@@ -77,59 +77,41 @@ export class CcvpnCreationComponent implements OnInit {
return Object.keys(item);
}
- getTemParameters() { //Get template parameters
- let chosedtemplates = this.createParams.template;
- let types = this.createParams.commonParams.templateType;
+ getccvpnTemParameters(data) { //Get template parameters
console.log(this.createParams);
- console.log(chosedtemplates); //Template id array
- this.myhttp.getTemplateParameters(types, chosedtemplates)
- .subscribe((data) => {
let inputs = data["inputs"];
- let vnfs = data["vnfs"];
this.templateParameters.service = {
name: data.metadata.name,
description: data.metadata.description,
serviceInvariantUuid: data.metadata.invariantUUID,
serviceUuid: data.metadata.UUID
};
- vnfs.map((item) => { //Add basic information about sotnvpn and site
- if( item["vnf_id"]=='sdwanvpnresource'){
- this.templateParameters["sotnvpn"]["info"]={resourceName: item["vnf_id"], min:item.properties["min_instances"],resourceInvariantUuid: item.metadata["invariantUUID"], resourceUuid: item.metadata["UUID"],resourceCustomizationUuid: item.metadata["customizationUUID"]}
- }
- if(item["vnf_id"]=='sdwansiteresource'){
- this.templateParameters["site"]["info"]={resourceName: item["vnf_id"], min:item.properties["min_instances"],resourceInvariantUuid: item.metadata["invariantUUID"], resourceUuid: item.metadata["UUID"],resourceCustomizationUuid: item.metadata["customizationUUID"]}
- }
- });
-
//Screening separation sotnvpn data
- inputs["sdwanvpnresource_list"].map((item,index) => {
+ inputs["vpnresourcelist"].map((item,index) => {
if(item["required"] !=undefined){
this.templateParameters["sotnvpn"]["sdwanvpnresource_list"].push(item);
}
- if (item["sdwansitelan_list"] != undefined && item["sdwansitelan_list"] instanceof Array === true) {
- this.templateParameters["sotnvpn"]["sdwansitelan_list"] = item["sdwansitelan_list"]
+ if (item["sitelanlist"] != undefined && item["sitelanlist"] instanceof Array === true) {
+ this.templateParameters["sotnvpn"]["sdwansitelan_list"] = item["sitelanlist"]
}
});
//Screening separation site data
- inputs["sdwansiteresource_list"].map((item,index) => {
+ inputs["sitereourcelist"].map((item,index) => {
if(item["required"] !=undefined){
this.templateParameters["site"]["sdwansiteresource_list"].push(item);
}
- if (item["sdwandevice_list"] != undefined && item["sdwandevice_list"] instanceof Array === true) {
- this.templateParameters["site"]["sdwandevice_list"] = item["sdwandevice_list"]
+ if (item["deviceList"] != undefined && item["deviceList"] instanceof Array === true) {
+ this.templateParameters["site"]["sdwandevice_list"] = item["deviceList"]
}
- if (item["sdwansitewan_list"] != undefined && item["sdwansitewan_list"] instanceof Array === true) {
- this.templateParameters["site"]["sdwansitewan_list"] = item["sdwansitewan_list"]
+ if (item["sitewanlist"] != undefined && item["sitewanlist"] instanceof Array === true) {
+ this.templateParameters["site"]["sdwansitewan_list"] = item["sitewanlist"]
}
});
this.showTemParametersSotnVpn();
this.showTemParametersSite();
console.log(this.templateParameters)
- }, (err) => {
-
- });
}
//sotnVpn data, after combining the structure, rendering the template data to the page