mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 14:41:21 +00:00
GUAC-1334: Fix the horribly-broken location chooser (not updated to use updated guacGroupList).
This commit is contained in:
@@ -33,6 +33,14 @@ angular.module('manage').directive('locationChooser', [function locationChooser(
|
||||
|
||||
scope: {
|
||||
|
||||
/**
|
||||
* The identifier of the data source from which the given root
|
||||
* connection group was retrieved.
|
||||
*
|
||||
* @type String
|
||||
*/
|
||||
dataSource : '=',
|
||||
|
||||
/**
|
||||
* The root connection group of the connection group hierarchy to
|
||||
* display.
|
||||
@@ -105,6 +113,19 @@ angular.module('manage').directive('locationChooser', [function locationChooser(
|
||||
$scope.menuOpen = !$scope.menuOpen;
|
||||
};
|
||||
|
||||
// Update the root group map when data source or root group change
|
||||
$scope.$watchGroup(['dataSource', 'rootGroup'], function updateRootGroups() {
|
||||
|
||||
// Abort if the root group is not set
|
||||
if (!$scope.dataSource || !$scope.rootGroup)
|
||||
return null;
|
||||
|
||||
// Wrap root group in map
|
||||
$scope.rootGroups = {};
|
||||
$scope.rootGroups[$scope.dataSource] = $scope.rootGroup;
|
||||
|
||||
});
|
||||
|
||||
// Expose selection function to group list template
|
||||
$scope.groupListContext = {
|
||||
|
||||
|
Reference in New Issue
Block a user