From 15843133cb53eaa3c0ffbdcbdbfc581819a5fcdc Mon Sep 17 00:00:00 2001 From: "Kishore Reddy, Gujja (kg811t)" Date: Thu, 12 Apr 2018 15:30:01 -0400 Subject: pom, new modules changes Issue-ID: PORTAL-254 portal/SDK release 2.3.0, domain, sdk aaf modules Change-Id: I4308550f295620d10d049fef3a88db3365a48a6f Signed-off-by: Kishore Reddy, Gujja (kg811t) --- ecomp-sdk/epsdk-app-overlay/pom.xml | 2 +- .../webapp/WEB-INF/fusion/defs/definitions.xml | 5 +- .../scripts/DS2-controllers/admin-controller.js | 86 ++++++++++++++++++++-- .../ds2-admin/modals/role-function-add.html | 54 ++++++++++---- 4 files changed, 126 insertions(+), 21 deletions(-) (limited to 'ecomp-sdk/epsdk-app-overlay') diff --git a/ecomp-sdk/epsdk-app-overlay/pom.xml b/ecomp-sdk/epsdk-app-overlay/pom.xml index 53147a81..96f9022d 100644 --- a/ecomp-sdk/epsdk-app-overlay/pom.xml +++ b/ecomp-sdk/epsdk-app-overlay/pom.xml @@ -5,7 +5,7 @@ org.onap.portal.sdk epsdk-project - 2.2.0-SNAPSHOT + 2.3.0-SNAPSHOT diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml index 49064879..05556d27 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/WEB-INF/fusion/defs/definitions.xml @@ -47,8 +47,9 @@ - - + + + diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js index 0d95e72a..a8b89757 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js @@ -1,4 +1,4 @@ -appDS2.controller('adminController', function($scope, $http,AdminService, $modal, $routeParams, $rootScope){ +appDS2.controller('adminController', function($scope, $http,AdminService, $modal, $routeParams, $rootScope){ $scope.totalPages = 5; $scope.viewPerPage = 8; @@ -71,8 +71,63 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal }); } - $scope.addRoleFunction = function(roleData){ + if(/[^a-zA-Z0-9\-\.\_]/.test(roleData.type)){ + errorMsg = 'Type can only contain alphanumeric characters, dots(.) and underscores(_)'; + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + items: function () { + return errorMsg; + } + } + }); + return; + } + if(roleData.action !== '*' && /[^a-zA-Z0-9\-\.\_]/.test(roleData.action)){ + errorMsg = 'Action can only contain alphanumeric characters, hyphens(-), dots(.) and underscores(_) and single asterisk character(*)'; + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + items: function () { + return errorMsg; + } + } + }); + return; + } + if(/[^a-zA-Z0-9\-\:\_\./*]/.test(roleData.code)){ + errorMsg = 'Code can only contain alphanumeric characters, hyphens(-), dots(.), colons(:), forwardSlash(/) , asterisk(*) and underscores(_)'; + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + items: function () { + return errorMsg; + } + } + }); + return; + } + if(/[^a-zA-Z0-9\-\_ \.]/.test(roleData.name)){ + errorMsg = 'Name can only contain alphanumeric characters, spaces, hyphens(-), dots(.) and underscores(_)'; + var modalInstance = $modal.open({ + templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html', + controller: ModalInstanceCtrl, + sizeClass: 'modal-small', + resolve: { + items: function () { + return errorMsg; + } + } + }); + return; + } AdminService.addRoleFunctionList(roleData).then(function(msg){ var message = msg; if(message.data!=null && message.data!=''){ @@ -100,6 +155,22 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal $scope.roleFun=items; $scope.msg=items; + $scope.ngRepeatDemo = [ + {id: 'menuradiobutton1', value: 'menu', labelvalue: 'menu'}, + {id: 'urlradiobutton2', value: 'url', labelvalue: 'url'}, + {id: 'otherradiobutton3', value: 'other', labelvalue: 'other'} + ] + $scope.selectedvalueradioButtonGroup = { + type: 'menu' + } + $scope.roleFun = { + action: '*' + } + + $scope.selectedvalueradioButtonOther = { + type: '' + } + // remove role function associated to a role on Role Edit page $scope.roleFunRemoveRole = function (roleFunction) { AdminService.removeRoleFunction(roleFunction, $routeParams.roleId).then(function(msg){ @@ -324,7 +395,12 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal }); } - $scope.save = function (data) { + $scope.save = function (data,type) { + if(type !== 'other'){ + data.type = type ; + } else{ + data.type = $scope.selectedvalueradioButtonOther.type ; + } $modalInstance.close(data); }; @@ -419,8 +495,8 @@ appDS2.controller('adminController', function($scope, $http,AdminService, $modal } }); - modalInstance.result.then(function (data) { - $scope.addRoleFunction(data); + modalInstance.result.then(function (data,type) { + $scope.addRoleFunction(data,type); }); } diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html index 5752a278..ad3d538b 100644 --- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html +++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html @@ -1,4 +1,4 @@ -
+

Role Function Create

@@ -6,13 +6,14 @@ ng-click="$dismiss('cancel')">
- +
- *Name *Name +

- *Code *Code +
- Code is Required + Code is + Required
-
+
- Type + * + Type + +
+
+
+ Type is Required

- Action *Action +
- +
+ Action is Required +

-