diff options
author | zhangab <zhanganbing@chinamobile.com> | 2018-04-18 09:11:56 +0800 |
---|---|---|
committer | zhangab <zhanganbing@chinamobile.com> | 2018-04-18 09:12:03 +0800 |
commit | d698af153772ca4351ad3b23fbb987fc749890af (patch) | |
tree | 8fa49f10523134f9596814ef7a30528e298ac660 /usecaseui-common/src/main/webapp/app/fusion/scripts/services | |
parent | ffffd8a35ae5fcea703a7427844037c07c232b92 (diff) |
Fix Security/Vulnerability problems
Change-Id: Ie0f2c9e0794941d9b9a7f00a6c3d349269d98ed1
Issue-ID: USECASEUI-104
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'usecaseui-common/src/main/webapp/app/fusion/scripts/services')
5 files changed, 0 insertions, 357 deletions
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js deleted file mode 100644 index cb5fb80d..00000000 --- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js +++ /dev/null @@ -1,141 +0,0 @@ -app.factory('AdminService', function ($http, $q) { - return { - getRoles: function() { - return $http.get('get_roles') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getRoleFunctionList: function() { - return $http.get('get_role_functions') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getFnMenuItems: function(){ - - return $http.get('admin_fn_menu') - .then(function(response) { - if (typeof response.data === 'object') { - - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getCacheRegions: function() { - return $http.get('get_regions') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getUsageList: function() { - return $http.get('get_usage_list') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getBroadcastList: function() { - return $http.get('get_broadcast_list') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getBroadcast: function(messageLocationId, messageLocation, messageId) { - return $http.get('get_broadcast?message_location_id='+messageLocationId + '&message_location=' + messageLocation + ((messageId != null) ? '&message_id=' + messageId : '')) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getCollaborateList: function() { - return $http.get('get_collaborate_list') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getRole: function(roleId) { - - return $http.get('get_role?role_id=' + roleId) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - } - }; -});
\ No newline at end of file diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js deleted file mode 100644 index 4566c8fa..00000000 --- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js +++ /dev/null @@ -1,70 +0,0 @@ -var menuStructureConvert = function(menuItems) { - var megaMenuDataObjectTemp = [ - { - text: "ECOMP", - children:menuItems - }, - { - text: "Help", - children: [{ - text:"Contact Us", - url:"javascript:angular.element('[ng-controller=headerController]').scope().redirectLink('contact');" - }, - { - text:"Get Access", - url:"javascript:angular.element('[ng-controller=headerController]').scope().redirectLink('access');" - }] - } - ]; - return megaMenuDataObjectTemp; -}; -var unflatten = function( array, parent, tree ){ - tree = typeof tree !== 'undefined' ? tree : []; - parent = typeof parent !== 'undefined' ? parent : { menuId: null }; - var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; }); - - if( !_.isEmpty( children ) ){ - if( parent.menuId === null ){ - tree = children; - }else{ - parent['children'] = children - } - _.each( children, function( child ){ unflatten( array, child ) } ); - } - - return tree; - } -app.service('HeaderService', function ($http,$log, $q,UserInfoService) { - return{ - - getUserNameFromSession : function(){ - UserInfoService.getFunctionalMenuStaticDetailSession() - .then(function (res) { - $scope.userName = res.userName; - $scope.redirectUrl = res.portalUrl; - }); - }, - getTopMenuStaticInfo:function() { - var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext(); - promise.then( - function(res) { - if(res==null || res==''){ - $log.info('failed getting static User information'); - this.getUserNameFromSession(); - }else{ - $log.info('Received static User information'); - var resData = res; - $scope.inputUserInfo(resData); - $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName; - return $scope.userProfile; - } - }, - function(err) { - $log.info('failed getting static User information'); - } - ); - } - } - } -); - diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js deleted file mode 100644 index 12e19df2..00000000 --- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js +++ /dev/null @@ -1,35 +0,0 @@ -function isRealValue(obj){ - return obj && obj !== "null" && obj!== "undefined"; -} -app.factory('LeftMenuService', function ($http,$log, $q) { - return { - getLeftMenu: function() { - return $http.get('get_menu') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - getAppName: function() { - return $http.get('get_app_name') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - } - - }; -}); - diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js deleted file mode 100644 index ca4252df..00000000 --- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js +++ /dev/null @@ -1,79 +0,0 @@ - -app.factory('ProfileService', function ($http, $q) { - return { - getProfile: function() { - return $http.get('get_user') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getProfilePagination: function(pageNum,viewPerPage) { - return $http.get('get_user_pagination?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getPostProfile: function() { - return $http.get('post_search_sample') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getProfileDetail: function(profileId) { - return $http.get('get_profile?profile_id='+profileId) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getSelfProfileDetail: function() { - return $http.get('get_self_profile') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - } - }; -}); diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js deleted file mode 100644 index 66aa1c18..00000000 --- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js +++ /dev/null @@ -1,32 +0,0 @@ -app.factory('UserInfoService', function ($http, $q,$log) { - return { - getFunctionalMenuStaticDetailShareContext: function(contextId,key) { - var deferred = $q.defer(); - $http({ - method: "GET", - url: "get_userinfo", - }).success( function(res) { - if(res==null || res=='') - $log.info('Not be able to get User Info via shared context'); - deferred.resolve(res); - }).error( function(status) { - deferred.reject(status); - }); - return deferred.promise; - }, - getFunctionalMenuStaticDetailSession: function() { - var deferred = $q.defer(); - $http({ - method: "GET", - url: "get_topMenuInfo", - }).success(function(res) { - if(res==null || res=='') - $log.info('Not be able to get User Info via shared context'); - deferred.resolve(res); - }).error( function(status) { - deferred.reject(status); - }); - return deferred.promise; - } - }; -}); |