summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2020-08-10 15:22:13 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-10 15:22:13 +0000
commitd19ae7b07bee2e0997107145932b4c689f03af8d (patch)
treeb7e1679d269acdd944e21d3cccc28b24c5299694
parent90a8e912331f206097f1625afdec8281fd141b1f (diff)
parenta94388ed941c82a38b2e631cc4fd77bac212335b (diff)
Merge "App Onboarding Inactive -500 Internal Server Error"
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java6
-rw-r--r--portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts18
2 files changed, 22 insertions, 2 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java
index a4463c7f..3d2432cb 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java
@@ -1634,7 +1634,11 @@ public class EPAppCommonServiceImpl implements EPAppService {
}
protected String constructImageName(OnboardingApp onboardingApp) {
- return "portal_" + String.valueOf(onboardingApp.getLandingPage().hashCode() + "_" + (int) (Math.random() * 100000.0))
+ String appLandingPageURL = onboardingApp.getLandingPage();
+ if(appLandingPageURL == null) {
+ appLandingPageURL = "";
+ }
+ return "portal_" + String.valueOf(appLandingPageURL.hashCode() + "_" + (int) (Math.random() * 100000.0))
+ ".png";
}
diff --git a/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts b/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts
index 852e9706..2e558508 100644
--- a/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts
+++ b/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts
@@ -377,6 +377,14 @@ export class ApplicationDetailsDialogComponent implements OnInit {
if (this.isEditMode) {
console.log("Edit application Object : ", JSON.stringify(this.applicationObj));
console.log("Mode Of iNtegration : ", this.applicationObj.modeOfIntegration);
+ if (this.applicationObj.applicationType == "1" && !this.applicationObj.rolesInAAF
+ || this.applicationObj.applicationType == "3" && !this.applicationObj.rolesInAAF) {
+ this.applicationObj.usesCadi = false;
+ }
+
+ if(this.applicationObj && this.applicationObj.usesCadi){
+ this.applicationObj.appBasicAuthPassword = null;
+ }
this.applicationsService.updateOnboardingApp(this.applicationObj)
.subscribe( _data => {
this.result = _data;
@@ -420,6 +428,14 @@ export class ApplicationDetailsDialogComponent implements OnInit {
}else{
//console.log("Coming inside add application",this.newAppModel);
+ if (this.newAppModel.applicationType == "1" && !this.newAppModel.rolesInAAF
+ || this.newAppModel.applicationType == "3" && !this.newAppModel.rolesInAAF) {
+ this.newAppModel.usesCadi = false;
+ }
+
+ if(this.newAppModel && this.newAppModel.usesCadi){
+ this.newAppModel.appBasicAuthPassword = null;
+ }
this.applicationsService.addOnboardingApp(this.newAppModel)
.subscribe( _data => {
@@ -436,7 +452,7 @@ export class ApplicationDetailsDialogComponent implements OnInit {
console.log(error);
if(error.status == 409){
this.openConfirmationModal('Error', 'There was a problem adding the application changes. ' +
- 'The Application Name and URL should be unique. Error: ' +
+ 'The Application Name and Namespace should be unique. Error: ' +
error.status);
return;
} else if(error.status == 500){