summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js
diff options
context:
space:
mode:
authorKotta, Shireesha (sk434m) <sk434m@att.com>2019-06-13 14:41:15 -0400
committerKotta, Shireesha (sk434m) <sk434m@att.com>2019-06-17 15:51:28 -0400
commitb75f35b0a1824aab32b4329fa62076b0f0307853 (patch)
tree97582ed38384d8a9b984107522440aa126130cd6 /ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js
parent4027435c28e1433df2476b83a6e77ba4d1d865bd (diff)
Application Onboarding page changes
Issue-ID: PORTAL-644 Application Onboarding page changes , DB scripts Change-Id: Id689e15f5abd56192420e6761440659531108ab4 Signed-off-by: Kotta, Shireesha (sk434m) <sk434m@att.com>
Diffstat (limited to 'ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js')
-rw-r--r--ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js50
1 files changed, 34 insertions, 16 deletions
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