From b75f35b0a1824aab32b4329fa62076b0f0307853 Mon Sep 17 00:00:00 2001 From: "Kotta, Shireesha (sk434m)" Date: Thu, 13 Jun 2019 14:41:15 -0400 Subject: Application Onboarding page changes Issue-ID: PORTAL-644 Application Onboarding page changes , DB scripts Change-Id: Id689e15f5abd56192420e6761440659531108ab4 Signed-off-by: Kotta, Shireesha (sk434m) --- ecomp-portal-FE-os/client/configurations/dev.json | 6 +- .../client/configurations/integ.json | 1 + ecomp-portal-FE-os/client/index.html | 1 - .../application-details.controller.js | 50 ++++++--- .../application-details.modal.html | 124 ++++++++++----------- .../views/applications/applications.controller.js | 22 +++- ecomp-portal-FE-os/pom.xml | 2 +- 7 files changed, 123 insertions(+), 83 deletions(-) (limited to 'ecomp-portal-FE-os') diff --git a/ecomp-portal-FE-os/client/configurations/dev.json b/ecomp-portal-FE-os/client/configurations/dev.json index c60e9bcd..78e3a205 100644 --- a/ecomp-portal-FE-os/client/configurations/dev.json +++ b/ecomp-portal-FE-os/client/configurations/dev.json @@ -98,7 +98,11 @@ "loggedinUser" : "http://localhost:8080/ecompportal/portalApi/loggedinUser", "modifyLoggedinUser" : "http://localhost:8080/ecompportal/portalApi/modifyLoggedinUser", "centralizedApps": "http://localhost:8080/ecompportal/portalApi/centralizedApps", - "uploadRoleFunction":"http://localhost:8080/ecompportal/portalApi/uploadRoleFunction/:appId" + "uploadRoleFunction":"http://localhost:8080/ecompportal/portalApi/uploadRoleFunction/:appId", + "checkIfUserIsSuperAdmin":"http://localhost:8080/ecompportal/portalApi/checkIfUserIsSuperAdmin", + "getCurrentLang": "http://localhost:8080/ecompportal/auxapi/languageSetting/user/:loginId", + "getLanguages": "http://localhost:8080/ecompportal/auxapi/language", + "updateLang": "http://localhost:8080/ecompportal/auxapi/languageSetting/user/:loginId" }, "cookieDomain": "onap.org" } diff --git a/ecomp-portal-FE-os/client/configurations/integ.json b/ecomp-portal-FE-os/client/configurations/integ.json index 4771d635..b0181f8c 100644 --- a/ecomp-portal-FE-os/client/configurations/integ.json +++ b/ecomp-portal-FE-os/client/configurations/integ.json @@ -99,6 +99,7 @@ "modifyLoggedinUser" : "portalApi/modifyLoggedinUser", "centralizedApps": "portalApi/centralizedApps", "uploadRoleFunction":"portalApi/uploadRoleFunction/:appId", + "checkIfUserIsSuperAdmin":"portalApi/checkIfUserIsSuperAdmin", "getCurrentLang":"auxapi/languageSetting/user/:loginId", "getLanguages":"auxapi/language", "updateLang":"auxapi/languageSetting/user/:loginId" diff --git a/ecomp-portal-FE-os/client/index.html b/ecomp-portal-FE-os/client/index.html index 648174e4..7a46d598 100644 --- a/ecomp-portal-FE-os/client/index.html +++ b/ecomp-portal-FE-os/client/index.html @@ -291,7 +291,6 @@ - diff --git a/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js b/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js index efd5165a..d89af17c 100644 --- a/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js +++ b/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js @@ -58,7 +58,7 @@ 'username': null, 'appPassword': null, 'thumbnail': emptyImg, - 'isEnabled': true, + 'isEnabled': false, 'restrictedApp': false, 'nameSpace': null, 'isCentralAuth': false @@ -172,26 +172,44 @@ //*************************** this.saveChanges = () => { - //if valid.. + //if valid.. if(this.app.isCentralAuth){ - //if valid.. - if(((angular.isUndefined(this.app.myLoginsAppName) || !this.app.myLoginsAppName)&&(angular.isUndefined(this.app.myLoginsAppOwner) || !this.app.myLoginsAppOwner)&&(angular.isUndefined(this.app.name) || !this.app.name)&&(angular.isUndefined(this.app.url) || !this.app.url) - &&(angular.isUndefined(this.app.username) || !this.app.username))) { - confirmBoxService.showInformation('Please fill in all required fields').then(isConfirmed => {}); - return; - }else if(!((angular.isUndefined(this.app.name) || !!this.app.name)&&(angular.isUndefined(this.app.url) || !!this.app.url))){ - confirmBoxService.showInformation('Please fill in all required fields').then(isConfirmed => {}); - return; - } + //if valid. + if(!this.app.isEnabled) + { + if(((angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.nameSpace) || !this.app.nameSpace) + ||(angular.isUndefined(this.app.username) || !this.app.username))) { + confirmBoxService.showInformation('Please fill in all required fields for centralized application').then(isConfirmed => {}); + return; + } + } + if(this.app.isEnabled){ + if(((angular.isUndefined(this.app.myLoginsAppName) || !this.app.myLoginsAppName)||(angular.isUndefined(this.app.myLoginsAppOwner) || !this.app.myLoginsAppOwner)||(angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url) + ||(angular.isUndefined(this.app.username) || !this.app.username)||(angular.isUndefined(this.app.nameSpace) || !this.app.nameSpace))) { + confirmBoxService.showInformation('Please fill in all required fields for centralized active application').then(isConfirmed => {}); + return; + } + } }else{ - if(((angular.isUndefined(this.app.myLoginsAppName) || !this.app.myLoginsAppName)||(angular.isUndefined(this.app.myLoginsAppOwner) || !this.app.myLoginsAppOwner)||(angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url) + + if(!this.app.isEnabled) + { + if((angular.isUndefined(this.app.name) || !this.app.name)){ + confirmBoxService.showInformation('Please fill in all required field ApplicationName to Save the applictaion').then(isConfirmed => {}); + return; + } + }else if(this.app.isEnabled && !this.app.restrictedApp){ + if(((angular.isUndefined(this.app.myLoginsAppName) || !this.app.myLoginsAppName)||(angular.isUndefined(this.app.myLoginsAppOwner) || !this.app.myLoginsAppOwner)||(angular.isUndefined(this.app.name) || !this.app.name)||(angular.isUndefined(this.app.url) || !this.app.url) ||(angular.isUndefined(this.app.username) || !this.app.username)||(angular.isUndefined(this.app.appPassword) || !this.app.appPassword))) { - confirmBoxService.showInformation('Please fill in all required fields along with password as the app is not centralized').then(isConfirmed => {}); - return; - }else if(!((angular.isUndefined(this.app.name) || !!this.app.name)&&(angular.isUndefined(this.app.url) || !!this.app.url))){ - confirmBoxService.showInformation('Please fill in all required fields').then(isConfirmed => {}); + confirmBoxService.showInformation('Please fill in all required fields along with password as the app is not centralized').then(isConfirmed => {}); + return; + } }else if(this.app.isEnabled && this.app.restrictedApp){ + if((angular.isUndefined(this.app.name) || !this.app.name) ||(angular.isUndefined(this.app.url) || !this.app.url)){ + confirmBoxService.showInformation('Please fill in all required fields').then(isConfirmed => {}); return; + } + } } this.isSaving = true; // For a restricted app, null out all irrelevant fields diff --git a/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.modal.html b/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.modal.html index b4251f15..780a974b 100644 --- a/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.modal.html +++ b/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.modal.html @@ -35,6 +35,16 @@ --> +