From e7d89fc6590d4e8ef0fe0e7e0e2107d5467aa049 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 5 Dec 2015 22:30:42 -0800 Subject: [PATCH] GUAC-1406: Add filtering to main connection list of the home screen. --- .../app/home/controllers/homeController.js | 18 ++++++++++++++++++ .../src/main/webapp/app/home/styles/home.css | 15 +++++++++++++++ .../main/webapp/app/home/templates/home.html | 13 ++++++++++--- guacamole/src/main/webapp/translations/de.json | 2 ++ guacamole/src/main/webapp/translations/en.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/ru.json | 2 ++ 9 files changed, 55 insertions(+), 3 deletions(-) diff --git a/guacamole/src/main/webapp/app/home/controllers/homeController.js b/guacamole/src/main/webapp/app/home/controllers/homeController.js index 12eb1c25e..1360ff593 100644 --- a/guacamole/src/main/webapp/app/home/controllers/homeController.js +++ b/guacamole/src/main/webapp/app/home/controllers/homeController.js @@ -44,6 +44,24 @@ angular.module('home').controller('homeController', ['$scope', '$injector', */ $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' + ]; + /** * Returns whether critical data has completed being loaded. * diff --git a/guacamole/src/main/webapp/app/home/styles/home.css b/guacamole/src/main/webapp/app/home/styles/home.css index d34ca6f1d..f055bd314 100644 --- a/guacamole/src/main/webapp/app/home/styles/home.css +++ b/guacamole/src/main/webapp/app/home/styles/home.css @@ -53,3 +53,18 @@ div.recent-connections div.connection { max-width: 75%; overflow: hidden; } + +.connection-list-ui .header .filter { + margin: 0; + padding: 0.75em 0.5em; +} + +.connection-list-ui .header .filter input { + -moz-border-radius: 0; + -webkit-border-radius: 0; + -khtml-border-radius: 0; + border-radius: 0; + border: none; + border-left: 1px solid rgba(0, 0, 0, 0.125); + background-color: transparent; +} diff --git a/guacamole/src/main/webapp/app/home/templates/home.html b/guacamole/src/main/webapp/app/home/templates/home.html index a2c362ac5..d38d5da6a 100644 --- a/guacamole/src/main/webapp/app/home/templates/home.html +++ b/guacamole/src/main/webapp/app/home/templates/home.html @@ -1,5 +1,5 @@ -

{{'HOME.SECTION_HEADER_ALL_CONNECTIONS' | translate}}

+
+

{{'HOME.SECTION_HEADER_ALL_CONNECTIONS' | translate}}

+ +
diff --git a/guacamole/src/main/webapp/translations/de.json b/guacamole/src/main/webapp/translations/de.json index cd8990583..5940dcd2e 100644 --- a/guacamole/src/main/webapp/translations/de.json +++ b/guacamole/src/main/webapp/translations/de.json @@ -148,6 +148,8 @@ "HOME" : { + "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", + "INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT", "INFO_NO_RECENT_CONNECTIONS" : "Keine aktiven Verbindungen.", diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json index 4e6987ca6..caf3cbdbd 100644 --- a/guacamole/src/main/webapp/translations/en.json +++ b/guacamole/src/main/webapp/translations/en.json @@ -148,6 +148,8 @@ "HOME" : { + "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", + "INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT", "INFO_NO_RECENT_CONNECTIONS" : "No recent connections.", diff --git a/guacamole/src/main/webapp/translations/fr.json b/guacamole/src/main/webapp/translations/fr.json index 679df2344..e1a835120 100644 --- a/guacamole/src/main/webapp/translations/fr.json +++ b/guacamole/src/main/webapp/translations/fr.json @@ -139,6 +139,8 @@ "HOME" : { + "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", + "INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT", "INFO_NO_RECENT_CONNECTIONS" : "Pas de connexion récente.", diff --git a/guacamole/src/main/webapp/translations/it.json b/guacamole/src/main/webapp/translations/it.json index 611c7bc2c..3c71c0841 100644 --- a/guacamole/src/main/webapp/translations/it.json +++ b/guacamole/src/main/webapp/translations/it.json @@ -137,6 +137,8 @@ "HOME" : { + "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", + "INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT", "INFO_NO_RECENT_CONNECTIONS" : "Nessuna connessione recente.", diff --git a/guacamole/src/main/webapp/translations/nl.json b/guacamole/src/main/webapp/translations/nl.json index 8c0d5d894..111b99ae8 100644 --- a/guacamole/src/main/webapp/translations/nl.json +++ b/guacamole/src/main/webapp/translations/nl.json @@ -148,6 +148,8 @@ "HOME" : { + "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", + "INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT", "INFO_NO_RECENT_CONNECTIONS" : "Geen recente verbindingen.", diff --git a/guacamole/src/main/webapp/translations/ru.json b/guacamole/src/main/webapp/translations/ru.json index 5a6fed077..822faf72b 100644 --- a/guacamole/src/main/webapp/translations/ru.json +++ b/guacamole/src/main/webapp/translations/ru.json @@ -137,6 +137,8 @@ "HOME" : { + "FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER", + "INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT", "INFO_NO_RECENT_CONNECTIONS" : "Нет недавних подключения.",