mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 17:13:21 +00:00 
			
		
		
		
	GUAC-897 Added status message while home or manage pages are loading.
This commit is contained in:
		| @@ -35,12 +35,27 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|     var userDAO                     = $injector.get('userDAO'); | ||||
|     var userService                 = $injector.get('userService'); | ||||
|      | ||||
|     // Set status to loading until we have all the connections, groups, and users have loaded | ||||
|     $scope.showStatus({ | ||||
|         title : 'status.loadingTitle', | ||||
|         text  : 'status.loadingText' | ||||
|     }); | ||||
|      | ||||
|     // All the connections and connection groups in root | ||||
|     $scope.connectionsAndGroups = []; | ||||
|      | ||||
|     // All users that the current user has permission to edit | ||||
|     $scope.users = []; | ||||
|      | ||||
|     // Hide the status message once users, groups, and connections have fully loaded | ||||
|     var usersLoaded                 = false; | ||||
|     var connectionsAndGroupsLoaded  = false; | ||||
|     function checkLoadStatus() { | ||||
|         if(usersLoaded && connectionsAndGroupsLoaded) { | ||||
|             $scope.showStatus(false); | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     $scope.basicPermissionsLoaded.then(function basicPermissionsHaveBeenLoaded() { | ||||
|         connectionGroupService.getAllGroupsAndConnections([], undefined, true, true).then(function filterConnectionsAndGroups(rootGroupList) { | ||||
|             $scope.rootGroup = rootGroupList[0]; | ||||
| @@ -57,6 +72,9 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|                     } | ||||
|                 ); | ||||
|             } | ||||
|              | ||||
|             connectionsAndGroupsLoaded = true;  | ||||
|             checkLoadStatus(); | ||||
|         }); | ||||
|          | ||||
|         userDAO.getUsers().success(function filterEditableUsers(users) { | ||||
| @@ -70,6 +88,9 @@ angular.module('manage').controller('manageController', ['$scope', '$injector', | ||||
|                     'UPDATE' | ||||
|                 ); | ||||
|             } | ||||
|              | ||||
|             usersLoaded = true; | ||||
|             checkLoadStatus(); | ||||
|         }); | ||||
|     }); | ||||
|      | ||||
|   | ||||
		Reference in New Issue
	
	Block a user