mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUACAMOLE-723: Display connection selection menu only if multiple choices are available.
This commit is contained in:
@@ -280,9 +280,12 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
})(guacClientManager.getManagedClients());
|
})(guacClientManager.getManagedClients());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map of data source identifier to the root connection group of that data
|
* The root connection groups of the connection hierarchy that should be
|
||||||
* source, or null if the connection group hierarchy has not yet been
|
* presented to the user for selecting a different connection, as a map of
|
||||||
* loaded.
|
* data source identifier to the root connection group of that data
|
||||||
|
* source. This will be null if the connection group hierarchy has not yet
|
||||||
|
* been loaded or if the hierarchy is inapplicable due to only one
|
||||||
|
* connection or balancing group being available.
|
||||||
*
|
*
|
||||||
* @type Object.<String, ConnectionGroup>
|
* @type Object.<String, ConnectionGroup>
|
||||||
*/
|
*/
|
||||||
@@ -313,7 +316,13 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
ConnectionGroup.ROOT_IDENTIFIER
|
ConnectionGroup.ROOT_IDENTIFIER
|
||||||
)
|
)
|
||||||
.then(function rootGroupsRetrieved(rootConnectionGroups) {
|
.then(function rootGroupsRetrieved(rootConnectionGroups) {
|
||||||
$scope.rootConnectionGroups = rootConnectionGroups;
|
|
||||||
|
// Store retrieved groups only if there are multiple connections or
|
||||||
|
// balancing groups available
|
||||||
|
var clientPages = userPageService.getClientPages(rootConnectionGroups);
|
||||||
|
if (clientPages.length > 1)
|
||||||
|
$scope.rootConnectionGroups = rootConnectionGroups;
|
||||||
|
|
||||||
}, requestService.WARN);
|
}, requestService.WARN);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user