diff options
author | 2020-11-24 16:41:46 -0500 | |
---|---|---|
committer | 2020-11-24 16:41:58 -0500 | |
commit | b88200ce0d30b5ad0433c70555f5b8ddcab98d3b (patch) | |
tree | 758b5f6565a6d2283af0b4d66e0ef8c8f90e1dc3 /portal-FE-common/src/app/pages | |
parent | 5ecd8fb31d9e7a8fbc2a04104ab972805b572c32 (diff) |
Microservice Onboarding Issue resolved
Issue-ID: PORTAL-1046
Signed-off-by: Kishore Reddy Dwaram <kishore.reddy.dwaram@att.com>
Change-Id: I9b9a533cfbaf4c1ba85e256fecfac3a9e65c84a7
Diffstat (limited to 'portal-FE-common/src/app/pages')
-rw-r--r-- | portal-FE-common/src/app/pages/microservice-onboarding/microservice-add-details/microservice-add-details.component.ts | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/portal-FE-common/src/app/pages/microservice-onboarding/microservice-add-details/microservice-add-details.component.ts b/portal-FE-common/src/app/pages/microservice-onboarding/microservice-add-details/microservice-add-details.component.ts index 5e359dd4..510fe12e 100644 --- a/portal-FE-common/src/app/pages/microservice-onboarding/microservice-add-details/microservice-add-details.component.ts +++ b/portal-FE-common/src/app/pages/microservice-onboarding/microservice-add-details/microservice-add-details.component.ts @@ -39,6 +39,7 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { IMircroservies } from 'src/app/shared/model/microservice-onboarding/microservices'; import { MicroserviceService, WidgetOnboardingService } from '../../../shared/services/index'; import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { ConfirmationModalComponent } from 'src/app/modals/confirmation-modal/confirmation-modal.component'; @Component({ selector: 'app-microservice-add-details', @@ -291,13 +292,17 @@ export class MicroserviceAddDetailsComponent implements OnInit { this.microservice.createService(newService) .subscribe( data => { this.result = data; - console.log("add microservice response :: ",this.result); - this.passEntry.emit(this.result); - this.ngbModal.dismissAll(); - }, error => { - this.ngbModal.dismissAll(); - console.log(error); - }); + if(this.result.status === 'OK'){ + console.log("add microservice response :: ",this.result); + this.passEntry.emit(this.result); + this.ngbModal.dismissAll(); + } + else { + const modalErrorRef = this.ngbModal.open(ConfirmationModalComponent); + modalErrorRef.componentInstance.title = 'Error'; + modalErrorRef.componentInstance.message = this.result.response; + } + }); } } } |