UserManagment now displays users after arriving through user profile page
authorLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 25 Apr 2017 17:19:32 +0000 (13:19 -0400)
committerLaurence Maultsby <laurence.maultsby@riftio.com>
Tue, 25 Apr 2017 17:19:32 +0000 (13:19 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/plugins/user_management/src/userProfile/userProfileActions.js
skyquake/plugins/user_management/src/userProfile/userProfileSource.js
skyquake/plugins/user_management/src/userProfile/userProfileStore.js

index a0a34d9..128b597 100644 (file)
@@ -11,15 +11,10 @@ module.exports = function(Alt) {
                                        'editUser',
                                        'handleCloseUserPanel',
                                        'handleHideColumns',
-                                       'getUsersSuccess',
                                        'getUsersNotification',
                                        'handleDisabledChange',
                                        'handlePlatformRoleUpdate',
-                                       'handleAddUser',
-                                       'handleCreateUser',
                                        'handleUpdateUser',
-                                       'updateUserSuccess',
-                                       'createUserSuccess',
-                                       'deleteUserSuccess'
+                                       'updateUserSuccess'
                                        );
 }
index 267387a..aaf10d7 100644 (file)
@@ -17,34 +17,6 @@ if (DEV_MODE) {
 
 module.exports = function(Alt) {
     return {
-        getUsers: {
-          remote: function() {
-              return new Promise(function(resolve, reject) {
-                $.ajax({
-                  url: `/user?api_server=${API_SERVER}`,
-                  type: 'GET',
-                  beforeSend: Utils.addAuthorizationStub,
-                  success: function(data, textStatus, jqXHR) {
-                    resolve(data.user);
-                  }
-                }).fail(function(xhr){
-                  //Authentication and the handling of fail states should be wrapped up into a connection class.
-                  Utils.checkAuthentication(xhr.status);
-                  let msg = xhr.responseText;
-                  if(xhr.errorMessage) {
-                    msg = xhr.errorMessage
-                  }
-                  reject(msg);
-                });
-              });
-          },
-          interceptResponse: interceptResponse({
-            'error': 'There was an error retrieving the resource orchestrator information.'
-          }),
-          success: Alt.actions.global.getUsersSuccess,
-          loading: Alt.actions.global.showScreenLoader,
-          error: Alt.actions.global.showNotification
-        },
         updateUser: {
           remote: function(state, user) {
             return new Promise(function(resolve, reject) {
@@ -74,35 +46,6 @@ module.exports = function(Alt) {
           loading: Alt.actions.global.showScreenLoader,
           error: Alt.actions.global.showNotification
         },
-        deleteUser: {
-          remote: function(state, user) {
-            return new Promise(function(resolve, reject) {
-              $.ajax({
-                url: `/user/${user['user-name']}/${user['user-domain']}?api_server=${API_SERVER}`,
-                type: 'DELETE',
-                data: user,
-                beforeSend: Utils.addAuthorizationStub,
-                success: function(data, textStatus, jqXHR) {
-                  resolve(data);
-                }
-              }).fail(function(xhr){
-                //Authentication and the handling of fail states should be wrapped up into a connection class.
-                Utils.checkAuthentication(xhr.status);
-                let msg = xhr.responseText;
-                if(xhr.errorMessage) {
-                  msg = xhr.errorMessage
-                }
-                reject(msg);
-              });
-            });
-          },
-          interceptResponse: interceptResponse({
-            'error': 'There was an error deleting the user.'
-          }),
-          success: Alt.actions.global.deleteUserSuccess,
-          loading: Alt.actions.global.showScreenLoader,
-          error: Alt.actions.global.showNotification
-        },
         createUser: {
             remote: function(state, user) {
 
index 8febbd1..b8a721b 100644 (file)
@@ -167,11 +167,6 @@ export default class UserProfileStore {
     handleUpdateUser() {
 
     }
-
-    getUsersSuccess(users) {
-        this.alt.actions.global.hideScreenLoader.defer();
-        this.setState({users});
-    }
     updateUserSuccess() {
         this.alt.actions.global.hideScreenLoader.defer();
         let users = this.users || [];