GUAC-1138: Move filtering logic into own directive.

This commit is contained in:
Michael Jumper
2015-03-26 13:17:23 -07:00
parent 647a1b15b3
commit 2df72c308c
6 changed files with 176 additions and 40 deletions

View File

@@ -29,7 +29,6 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj
// Required types
var ActiveConnectionWrapper = $injector.get('ActiveConnectionWrapper');
var ConnectionGroup = $injector.get('ConnectionGroup');
var FilterPattern = $injector.get('FilterPattern');
var StableSort = $injector.get('StableSort');
// Required services
@@ -55,20 +54,6 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj
*/
$scope.wrappers = null;
/**
* The filter search string to use to restrict the displayed active sessions
*
* @type String
*/
$scope.filterSearchString = null;
/**
* The pattern object to use when filtering active sessions.
*
* @type FilterPattern
*/
$scope.filterPattern = new FilterPattern();
/**
* StableSort instance which maintains the sort order of the visible
* connection wrappers.
@@ -361,9 +346,4 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj
};
// Recompile the filter pattern when changed
$scope.$watch('filterSearchString', function recompilePredicate(searchString) {
$scope.filterPattern.compile(searchString);
});
}]);