aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts
diff options
context:
space:
mode:
authorMohamed Asgar Samiulla(ma926a) <ma926a@us.att.com>2018-04-17 15:14:28 +0530
committerMohamed Asgar Samiulla(ma926a) <ma926a@us.att.com>2018-04-17 15:14:54 +0530
commit7f0939f148645d3b47653dbee7fadc341b16c1c2 (patch)
tree8871e8ce9a961bdd29f462e6a12c23660c33f6c2 /src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts
parent05fc71b2f0612509c4da0ad74bf15f7001ea4e34 (diff)
VM data retrieval from APPC for open stack action
VM data retrieval and stopping user not to navigate to PD and template if mandatory fields are missing in reference data. Issue-ID: APPC-853 Change-Id: Id43500579c6d222a2c17a53db9213372afec565f Signed-off-by: Mohamed Asgar Samiulla(ma926a) <ma926a@us.att.com>
Diffstat (limited to 'src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts')
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts
index 72501ab..62b3044 100644
--- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts
+++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts
@@ -895,15 +895,19 @@ export class ReferenceDataformComponent implements OnInit {
this.toggleIdentifier(data)
this.oldAction = this.currentAction;// this.referenceDataObject.action + '';
this.referenceDataObject.action = this.currentAction
+
this.populateExistinAction(data);
if (this.oldAction === 'OpenStack Actions') {
+
this.uploadedDataArray = [];
this.remUploadedDataArray = [];
this.firstArrayElement = [];
this.uploadFileName = '';
+ //this.tempAllData = [];
}
this.clearCache();
this.refernceScopeObj.from = '';
+ this.getArtifactsOpenStack()
} else {
this.toggleIdentifier(data)
this.currentAction = this.referenceDataObject.action;
@@ -914,8 +918,15 @@ export class ReferenceDataformComponent implements OnInit {
this.clearVnfcData()
this.refernceScopeObj.from = '';
}
+
// Enable or Block Template and PD Tabs
- this.buildDesignComponent.getRefData(this.referenceDataObject);
+ if(this.currentAction == 'ConfigScaleOut' && this.templateIdentifier) {
+ let referenceDataObjectTemp = this.referenceDataObject;
+ referenceDataObjectTemp['template-id'] = this.templateIdentifier;
+ this.buildDesignComponent.getRefData(referenceDataObjectTemp);
+ } else {
+ this.buildDesignComponent.getRefData(this.referenceDataObject);
+ }
});
} else {
this.actionChanged = true;
@@ -923,8 +934,15 @@ export class ReferenceDataformComponent implements OnInit {
this.populateExistinAction(data);
this.resetVmsForScaleout(data);
this.toggleIdentifier(data);
+
// Enable or Block Template and PD Tabs
- this.buildDesignComponent.getRefData(this.referenceDataObject);
+ if(this.currentAction == 'ConfigScaleOut' && this.templateIdentifier) {
+ let referenceDataObjectTemp = this.referenceDataObject;
+ referenceDataObjectTemp['template-id'] = this.templateIdentifier;
+ this.buildDesignComponent.getRefData(referenceDataObjectTemp);
+ } else {
+ this.buildDesignComponent.getRefData(this.referenceDataObject);
+ }
}
this.configDrp(data)
}
@@ -977,6 +995,11 @@ export class ReferenceDataformComponent implements OnInit {
if (data == null) {
return;
}
+ // Enable or Block Template and PD Tabs
+ let referenceDataObjectTemp = this.referenceDataObject;
+ referenceDataObjectTemp['template-id'] = data;
+ this.buildDesignComponent.getRefData(referenceDataObjectTemp);
+
if ((userForm.valid) && this.oldAction != '' && this.oldAction != undefined) {
this.currentAction = "ConfigScaleOut"
let referenceObject = this.prepareReferenceObject();
@@ -1324,22 +1347,24 @@ export class ReferenceDataformComponent implements OnInit {
trackByFn(index, item) {
return index;
}
- getArtifactsOpenStack() {
+ getArtifactsOpenStack() {
var array = []
var vnfcFunctionCodeArrayList = [];
var vnfcSet = new Set();
- vnfcSet.add("VM Type")
for (var i = 0; i < this.tempAllData.length; i++) {
if (!this.checkIfelementExistsInArray(this.tempAllData[i].action, this.actions) && (this.tempAllData[i].action != 'AllAction')) {
var vnfcFunctionCodeArray = this.tempAllData[i]["vnfc-function-code-list"]
+ vnfcSet.add("Actions")
for (var j = 0; j < vnfcFunctionCodeArray.length; j++) {
vnfcSet.add(vnfcFunctionCodeArray[j])
}
vnfcFunctionCodeArrayList.push([this.tempAllData[i].action].concat(this.tempAllData[i]["vnfc-function-code-list"]))
}
}
+
var vnfcSetArray = Array.from(vnfcSet);
let vnfcSetArrayLen = vnfcSetArray.length;
+
for (let i = 0; i < vnfcFunctionCodeArrayList.length; i++) {
let element = vnfcFunctionCodeArrayList[i];
for (let j = 1; j < element.length; j++) {