diff options
author | 2020-04-27 09:44:02 +0000 | |
---|---|---|
committer | 2020-04-28 07:08:46 +0000 | |
commit | 263c5b346ab61103b8fe92f72e1ee62f3f9df833 (patch) | |
tree | 885324f8bfe0e5c4d35a5b4690470a8dabb8ab06 /usecaseui-portal/src/app/views/services/services-list/mdons-creation | |
parent | 46c4844ebb561c9f879c8fe74ce4d8a688eef486 (diff) |
Changes for MDONS usecase
Change-Id: I9c795fa2041c195ca29300398fb89b1cc3606ae7
Issue-ID: USECASEUI-371
Signed-off-by: root <preethamshyam.sathiyaseelan@us.fujitsu.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/services-list/mdons-creation')
-rw-r--r-- | usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts b/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts index 8d0f2562..8f7b1844 100644 --- a/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts +++ b/usecaseui-portal/src/app/views/services/services-list/mdons-creation/mdons-creation.component.ts @@ -79,6 +79,15 @@ export class MdonsCreationComponent implements OnInit { this.buildFormArrayOfGroupsFromArr(); } + chunkTemplateParam(){ + console.log(this.templateParameters) + for (let i = 0; i < this.templateParameters.inputs.length; i++){ + if(this.templateParameters.inputs[i].name.includes('vf_')){ + this.templateParameters.inputs[i].name = this.templateParameters.inputs[i].name.replace('vf_','') + } + } + } + buildFormArrayOfGroupsFromArr() { for (let i of this.templateParameters.inputs) { if (i.isRequired === "true" && !(i.name.includes('_id'))) { @@ -154,21 +163,25 @@ export class MdonsCreationComponent implements OnInit { this.templateParameters.inputs.forEach((ipnut) => { this.service.parameters.requestInputs[ipnut.name] = ipnut.value == undefined ? ipnut.defaultValue : ipnut.value; if (ipnut.name.includes('uni') && ipnut.name.includes('id')) { - this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.uniIdSelected.id : this.nniMap.get(ipnut.name).id; - } + this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.removePortNumber(this.uniIdSelected.id) : this.removePortNumber(this.nniMap.get(ipnut.name).id); + } if (ipnut.name.includes('enni') && ipnut.name.includes('id')) { - this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.enniIdSelected.id : this.nniMap.get(ipnut.name).id; - } + this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.removePortNumber(this.enniIdSelected.id) : this.removePortNumber(this.nniMap.get(ipnut.name).id); + } if (ipnut.name.includes('nni') && ipnut.name.includes('id')) { - this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.nniIdSelected.id : this.nniMap.get(ipnut.name).id; - } + this.service.parameters.requestInputs[ipnut.name] = this.nniMap.get(ipnut.name) == undefined ? this.removePortNumber(this.nniIdSelected.id) : this.removePortNumber(this.nniMap.get(ipnut.name).id); + } if (ipnut.name === 'name') { this.service.name = ipnut.value == undefined ? ipnut.defaultValue : ipnut.value; } }) this.mdonsCloseCreate.emit({ service: this.service }); } - } + } + + removePortNumber(portNum){ + return portNum.split('(')[0].toString().trim() + } markFormTouched(group: FormGroup | FormArray) { Object.keys(group.controls).forEach((key: string) => { |