GUAC-1406: Add filtering to connection admin UI.

This commit is contained in:
Michael Jumper
2015-12-03 16:48:25 -08:00
parent e38d4a089a
commit edc3f19216
8 changed files with 52 additions and 9 deletions

View File

@@ -90,6 +90,25 @@ angular.module('settings').directive('guacSettingsConnections', [function guacSe
*/
$scope.permissions = null;
/**
* Array of all connection properties that are filterable.
*
* @type String[]
*/
$scope.filteredConnectionProperties = [
'name',
'protocol'
];
/**
* Array of all connection group properties that are filterable.
*
* @type String[]
*/
$scope.filteredConnectionGroupProperties = [
'name'
];
/**
* Returns whether critical data has completed being loaded.
*

View File

@@ -24,16 +24,28 @@
<!-- Connection management -->
<p>{{'SETTINGS_CONNECTIONS.HELP_CONNECTIONS' | translate}}</p>
<!-- Form action buttons -->
<div class="action-buttons">
<!-- Connection management toolbar -->
<div class="toolbar">
<a class="add-connection button"
ng-show="canCreateConnections()"
href="#/manage/{{dataSource}}/connections/">{{'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION' | translate}}</a>
<!-- Form action buttons -->
<div class="action-buttons">
<a class="add-connection-group button"
ng-show="canCreateConnectionGroups()"
href="#/manage/{{dataSource}}/connectionGroups/">{{'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION_GROUP' | translate}}</a>
<a class="add-connection button"
ng-show="canCreateConnections()"
href="#/manage/{{dataSource}}/connections/">{{'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION' | translate}}</a>
<a class="add-connection-group button"
ng-show="canCreateConnectionGroups()"
href="#/manage/{{dataSource}}/connectionGroups/">{{'SETTINGS_CONNECTIONS.ACTION_NEW_CONNECTION_GROUP' | translate}}</a>
</div>
<!-- Connection filter -->
<guac-group-list-filter connection-groups="rootGroups"
filtered-connection-groups="filteredRootGroups"
placeholder="'SETTINGS_CONNECTIONS.FIELD_PLACEHOLDER_FILTER' | translate"
connection-properties="filteredConnectionProperties"
connection-group-properties="filteredConnectionGroupProperties"></guac-group-list-filter>
</div>
@@ -41,7 +53,7 @@
<div class="connection-list">
<guac-group-list
page-size="25"
connection-groups="rootGroups"
connection-groups="filteredRootGroups"
connection-template="'app/settings/templates/connection.html'"
connection-group-template="'app/settings/templates/connectionGroup.html'"/>
</div>