From c1cda6283174db9ab610ce7142222c8a00be5bc9 Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Mon, 27 Jul 2020 19:48:32 +0530 Subject: App Onboarding - Delete app not working App Onboarding - Delete app not working Issue-ID: PORTAL-963 Change-Id: I6ec10fc4266b4d66d5393925411a90d0245b3e72 Signed-off-by: Sudarshan Kumar --- .../application-onboarding/application-onboarding.component.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'portal-FE-os/src/app') diff --git a/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts b/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts index a2c759dc..5903d654 100644 --- a/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts +++ b/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts @@ -114,7 +114,7 @@ export class ApplicationOnboardingComponent implements OnInit { openAddApplicationModal(rowData: any, action:any) { console.log("Action : ", action); - const modalRef = this.ngbModal.open(ApplicationDetailsDialogComponent, { size: 'lg' }); + const modalRef = this.ngbModal.open(ApplicationDetailsDialogComponent, { size: 'lg', backdrop: 'static', keyboard: false }); modalRef.componentInstance.title = 'Application Details'; modalRef.componentInstance.action = action; //console.log("selectedData in parent",rowData); @@ -136,7 +136,7 @@ export class ApplicationOnboardingComponent implements OnInit { } deleteApplication(application: IApplications){ - let confirmationMsg = 'You are about to delete this App : ' + application.name+ '. Click OK to continue.'; + let confirmationMsg = 'You are about to delete this App : ' + application.appName+ '. Click OK to continue.'; this.openInformationModal("Confirmation",confirmationMsg).result.then((result) => { if (result === 'Ok') { if(!application || application == null){ @@ -150,7 +150,11 @@ export class ApplicationOnboardingComponent implements OnInit { this.getOnboardingApps(); }, error => { console.log(error); - this.openConfirmationModal('Error', error); + if(error && error.status == 405){ + this.openConfirmationModal('', 'Application : ' + application.appName+ ' can not be deleted as it is associsted with one of the Microservices.'); + }else{ + this.openConfirmationModal('Error', error.message); + } }); } }, (resut) => { -- cgit 1.2.3-korg