From 19da6e32a2b7cc87750a07d16e881999f76ba9dd Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 2 Apr 2019 08:44:45 -0700 Subject: [PATCH] GUACAMOLE-723: Allow connections in Guacamole menu dropdown to be filtered. --- .../app/client/controllers/clientController.js | 18 ++++++++++++++++++ .../webapp/app/client/styles/guac-menu.css | 10 ++++++++++ .../webapp/app/client/templates/client.html | 7 ++++++- guacamole/src/main/webapp/translations/de.json | 2 ++ guacamole/src/main/webapp/translations/en.json | 2 ++ guacamole/src/main/webapp/translations/es.json | 2 ++ guacamole/src/main/webapp/translations/fr.json | 2 ++ guacamole/src/main/webapp/translations/it.json | 2 ++ guacamole/src/main/webapp/translations/nl.json | 2 ++ guacamole/src/main/webapp/translations/no.json | 2 ++ guacamole/src/main/webapp/translations/ru.json | 2 ++ guacamole/src/main/webapp/translations/zh.json | 2 ++ 12 files changed, 52 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index 11ded35fc..94da2e3ec 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -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, diff --git a/guacamole/src/main/webapp/app/client/styles/guac-menu.css b/guacamole/src/main/webapp/app/client/styles/guac-menu.css index 73562ceb8..48fb3b372 100644 --- a/guacamole/src/main/webapp/app/client/styles/guac-menu.css +++ b/guacamole/src/main/webapp/app/client/styles/guac-menu.css @@ -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; } diff --git a/guacamole/src/main/webapp/app/client/templates/client.html b/guacamole/src/main/webapp/app/client/templates/client.html index 6e40461e4..9d06549f9 100644 --- a/guacamole/src/main/webapp/app/client/templates/client.html +++ b/guacamole/src/main/webapp/app/client/templates/client.html @@ -56,8 +56,13 @@

+