GUAC-1406: Add filtering to main connection list of the home screen.

This commit is contained in:
Michael Jumper
2015-12-05 22:30:42 -08:00
parent edc3f19216
commit e7d89fc659
9 changed files with 55 additions and 3 deletions

View File

@@ -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.
*

View File

@@ -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;
}

View File

@@ -1,5 +1,5 @@
<!--
Copyright (C) 2014 Glyptodon LLC
Copyright (C) 2015 Glyptodon LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -34,11 +34,18 @@
</div>
<!-- All connections for this user -->
<h2 class="header">{{'HOME.SECTION_HEADER_ALL_CONNECTIONS' | translate}}</h2>
<div class="header">
<h2>{{'HOME.SECTION_HEADER_ALL_CONNECTIONS' | translate}}</h2>
<guac-group-list-filter connection-groups="rootConnectionGroups"
filtered-connection-groups="filteredRootConnectionGroups"
placeholder="'HOME.FIELD_PLACEHOLDER_FILTER' | translate"
connection-properties="filteredConnectionProperties"
connection-group-properties="filteredConnectionGroupProperties"></guac-group-list-filter>
</div>
<div class="all-connections">
<guac-group-list
context="context"
connection-groups="rootConnectionGroups"
connection-groups="filteredRootConnectionGroups"
connection-template="'app/home/templates/connection.html'"
connection-group-template="'app/home/templates/connectionGroup.html'"
page-size="20"></guac-group-list>

View File

@@ -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.",

View File

@@ -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.",

View File

@@ -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.",

View File

@@ -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.",

View File

@@ -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.",

View File

@@ -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" : "Нет недавних подключения.",