diff options
author | Gangarajula, Uday Bhasker (ug0221) <ug0221@att.com> | 2018-04-25 18:02:04 -0400 |
---|---|---|
committer | Gangarajula, Uday Bhasker (ug0221) <ug0221@att.com> | 2018-04-25 18:02:32 -0400 |
commit | 3b905ee77fec432d3e44088787c4a810ced52d3e (patch) | |
tree | 3d6b15eae68dce7e43a8c2b04b41747cccdf2cad /src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.component.ts | |
parent | cbe26e0a009088e018944e1e5a6f389212ab2cee (diff) |
made fixes to template identifer and dropdowns
Issue-ID: APPC-862
Change-Id: I902f794cec5d69e2118f7a87f5c6fb867a1b2216
Signed-off-by: Gangarajula, Uday Bhasker (ug0221) <ug0221@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.ts | 29 |
1 files changed, 18 insertions, 11 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 62b3044..9c6f8df 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 @@ -86,7 +86,7 @@ export class ReferenceDataformComponent implements OnInit { public actionLevels = [ 'vnfc', 'vnf' ]; - + oldtemplateIdentifier: any identifierDrp: any; identifierDrpValues: any = []; //settings for the notifications. @@ -151,12 +151,18 @@ export class ReferenceDataformComponent implements OnInit { public firstArrayElement = []; public remUploadedDataArray = []; isConfigScaleOut = false - + configScaleOutExist: boolean constructor(private buildDesignComponent: BuildDesignComponent, private httpUtils: HttpUtilService, private route: Router, private location: Location, private activeRoutes: ActivatedRoute, private notificationService: NotificationService, private paramShareService: ParamShareService, private mappingEditorService: MappingEditorService, private modalService: NgbModal, private nService: NotificationsService, private ngProgress: NgProgress) { } ngOnInit() { + this.configScaleOutExist = require('../../../cdt.application.properties.json').showconfigsaleout; + if (this.configScaleOutExist) { + this.actions = ['', 'Configure', 'ConfigModify', 'ConfigBackup', 'ConfigRestore', 'GetRunningConfig', 'HealthCheck', 'StartApplication', 'StopApplication', 'QuiesceTraffic', 'ResumeTraffic', 'UpgradeBackout', 'UpgradeBackup', 'UpgradePostCheck', 'UpgradePreCheck', 'UpgradeSoftware', 'OpenStack Actions', 'ConfigScaleOut']; + } else { + this.actions = ['', 'Configure', 'ConfigModify', 'ConfigBackup', 'ConfigRestore', 'GetRunningConfig', 'HealthCheck', 'StartApplication', 'StopApplication', 'QuiesceTraffic', 'ResumeTraffic', 'UpgradeBackout', 'UpgradeBackup', 'UpgradePostCheck', 'UpgradePreCheck', 'UpgradeSoftware', 'OpenStack Actions']; + } this.self = this; let path = this.location.path; this.title = 'Reference Data'; @@ -920,7 +926,7 @@ export class ReferenceDataformComponent implements OnInit { } // Enable or Block Template and PD Tabs - if(this.currentAction == 'ConfigScaleOut' && this.templateIdentifier) { + if (this.currentAction == 'ConfigScaleOut' && this.templateIdentifier) { let referenceDataObjectTemp = this.referenceDataObject; referenceDataObjectTemp['template-id'] = this.templateIdentifier; this.buildDesignComponent.getRefData(referenceDataObjectTemp); @@ -930,13 +936,14 @@ export class ReferenceDataformComponent implements OnInit { }); } else { this.actionChanged = true; + this.currentAction = this.referenceDataObject.action; this.oldAction = this.referenceDataObject.action + ''; this.populateExistinAction(data); this.resetVmsForScaleout(data); this.toggleIdentifier(data); // Enable or Block Template and PD Tabs - if(this.currentAction == 'ConfigScaleOut' && this.templateIdentifier) { + if (this.currentAction == 'ConfigScaleOut' && this.templateIdentifier) { let referenceDataObjectTemp = this.referenceDataObject; referenceDataObjectTemp['template-id'] = this.templateIdentifier; this.buildDesignComponent.getRefData(referenceDataObjectTemp); @@ -1000,8 +1007,9 @@ export class ReferenceDataformComponent implements OnInit { referenceDataObjectTemp['template-id'] = data; this.buildDesignComponent.getRefData(referenceDataObjectTemp); - if ((userForm.valid) && this.oldAction != '' && this.oldAction != undefined) { + if ((userForm.valid) && this.oldtemplateIdentifier != '' && this.oldtemplateIdentifier != undefined) { this.currentAction = "ConfigScaleOut" + this.oldtemplateIdentifier = this.templateIdentifier let referenceObject = this.prepareReferenceObject(); this.actionChanged = true; if (this.templateIdentifier) { @@ -1030,8 +1038,7 @@ export class ReferenceDataformComponent implements OnInit { } } - clearCache() - { + clearCache() { // get the value and save the userid and persist it. this.clearTemplateCache(); this.clearPdCache(); @@ -1149,7 +1156,7 @@ export class ReferenceDataformComponent implements OnInit { resetGroupNotation() { if (this.Sample['group-notation-type'] == "existing-group-name") { this.Sample['group-notation-value'] = "" - this.disableGrpNotationValue = true + this.disableGrpNotationValue = true } else { this.disableGrpNotationValue = false } @@ -1166,7 +1173,7 @@ export class ReferenceDataformComponent implements OnInit { } else { if (this.actionChanged) { this.referenceDataObject.vm = [] - } + } } } } @@ -1345,9 +1352,9 @@ export class ReferenceDataformComponent implements OnInit { } trackByFn(index, item) { - return index; + return index; } - getArtifactsOpenStack() { + getArtifactsOpenStack() { var array = [] var vnfcFunctionCodeArrayList = []; var vnfcSet = new Set(); |