mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-897 Added status message while home or manage pages are loading.
This commit is contained in:
@@ -39,6 +39,12 @@ angular.module('home').controller('homeController', ['$scope', '$injector',
|
|||||||
// All valid recent connections
|
// All valid recent connections
|
||||||
$scope.recentConnections = [];
|
$scope.recentConnections = [];
|
||||||
|
|
||||||
|
// Set status to loading until we have all the connections and groups loaded
|
||||||
|
$scope.showStatus({
|
||||||
|
title : 'status.loadingTitle',
|
||||||
|
text : 'status.loadingText'
|
||||||
|
});
|
||||||
|
|
||||||
/* Fetch all connections and groups, then find which recent connections
|
/* Fetch all connections and groups, then find which recent connections
|
||||||
* still refer to valid connections and groups.
|
* still refer to valid connections and groups.
|
||||||
*/
|
*/
|
||||||
@@ -76,6 +82,8 @@ angular.module('home').controller('homeController', ['$scope', '$injector',
|
|||||||
$scope.recentConnections.push(recentConnection);
|
$scope.recentConnections.push(recentConnection);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.showStatus(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -35,12 +35,27 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
|||||||
var userDAO = $injector.get('userDAO');
|
var userDAO = $injector.get('userDAO');
|
||||||
var userService = $injector.get('userService');
|
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
|
// All the connections and connection groups in root
|
||||||
$scope.connectionsAndGroups = [];
|
$scope.connectionsAndGroups = [];
|
||||||
|
|
||||||
// All users that the current user has permission to edit
|
// All users that the current user has permission to edit
|
||||||
$scope.users = [];
|
$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() {
|
$scope.basicPermissionsLoaded.then(function basicPermissionsHaveBeenLoaded() {
|
||||||
connectionGroupService.getAllGroupsAndConnections([], undefined, true, true).then(function filterConnectionsAndGroups(rootGroupList) {
|
connectionGroupService.getAllGroupsAndConnections([], undefined, true, true).then(function filterConnectionsAndGroups(rootGroupList) {
|
||||||
$scope.rootGroup = rootGroupList[0];
|
$scope.rootGroup = rootGroupList[0];
|
||||||
@@ -57,6 +72,9 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connectionsAndGroupsLoaded = true;
|
||||||
|
checkLoadStatus();
|
||||||
});
|
});
|
||||||
|
|
||||||
userDAO.getUsers().success(function filterEditableUsers(users) {
|
userDAO.getUsers().success(function filterEditableUsers(users) {
|
||||||
@@ -70,6 +88,9 @@ angular.module('manage').controller('manageController', ['$scope', '$injector',
|
|||||||
'UPDATE'
|
'UPDATE'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usersLoaded = true;
|
||||||
|
checkLoadStatus();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -3,6 +3,11 @@
|
|||||||
"title" : "Guacamole ${project.version}"
|
"title" : "Guacamole ${project.version}"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"status" : {
|
||||||
|
"loadingTitle" : "Loading",
|
||||||
|
"loadingText" : "Guacamole is loading; please wait..."
|
||||||
|
},
|
||||||
|
|
||||||
"login": {
|
"login": {
|
||||||
"loginError" : "Invalid Login",
|
"loginError" : "Invalid Login",
|
||||||
"username" : "Username",
|
"username" : "Username",
|
||||||
|
Reference in New Issue
Block a user