GUACAMOLE-723: Allow connections in Guacamole menu dropdown to be filtered.

This commit is contained in:
Michael Jumper
2019-04-02 08:44:45 -07:00
parent 7fddb26202
commit 19da6e32a2
12 changed files with 52 additions and 1 deletions

View File

@@ -288,6 +288,24 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
*/
$scope.rootConnectionGroups = null;
/**
* Array of all connection properties that are filterable.
*
* @type String[]
*/
$scope.filteredConnectionProperties = [
'name'
];
/**
* Array of all connection group properties that are filterable.
*
* @type String[]
*/
$scope.filteredConnectionGroupProperties = [
'name'
];
// Retrieve root groups and all descendants
dataSourceService.apply(
connectionGroupService.getConnectionGroupTree,

View File

@@ -78,6 +78,16 @@
font-size: 0.8em;
}
#guac-menu .header .filter input {
border-bottom: 1px solid rgba(0,0,0,0.125);
border-left: none;
}
#guac-menu .header .filter {
margin-bottom: 0.5em;
padding: 0;
}
#guac-menu #mouse-settings .choice {
text-align: center;
}

View File

@@ -56,8 +56,13 @@
<h2 ng-show="rootConnectionGroups">
<guac-menu menu-title="client.name">
<div class="all-connections">
<guac-group-list-filter connection-groups="rootConnectionGroups"
filtered-connection-groups="filteredRootConnectionGroups"
placeholder="'CLIENT.FIELD_PLACEHOLDER_FILTER' | translate"
connection-properties="filteredConnectionProperties"
connection-group-properties="filteredConnectionGroupProperties"></guac-group-list-filter>
<guac-group-list
connection-groups="rootConnectionGroups"
connection-groups="filteredRootConnectionGroups"
templates="{
'connection' : 'app/client/templates/connection.html',
'connection-group' : 'app/client/templates/connectionGroup.html'