From ac3ee41699d3e73e811e0639449cad2945b0e320 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 26 Feb 2015 17:33:45 -0800 Subject: [PATCH] GUAC-1099: Paginate guacGroupList directive. --- .../webapp/app/groupList/directives/guacGroupList.js | 12 ++++++++++-- .../src/main/webapp/app/groupList/groupListModule.js | 2 +- .../app/groupList/templates/guacGroupList.html | 9 ++++++++- .../src/main/webapp/app/home/templates/home.html | 3 ++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js b/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js index d1190bab6..2bf75a89d 100644 --- a/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js +++ b/guacamole/src/main/webapp/app/groupList/directives/guacGroupList.js @@ -21,7 +21,8 @@ */ /** - * A directive which displays the contents of a connection group. + * A directive which displays the contents of a connection group within an + * automatically-paginated view. */ angular.module('groupList').directive('guacGroupList', [function guacGroupList() { @@ -75,7 +76,14 @@ angular.module('groupList').directive('guacGroupList', [function guacGroupList() * * @type Boolean */ - showRootGroup : '=' + showRootGroup : '=', + + /** + * The maximum number of connections or groups to show per page. + * + * @type Number + */ + pageSize : '=' }, diff --git a/guacamole/src/main/webapp/app/groupList/groupListModule.js b/guacamole/src/main/webapp/app/groupList/groupListModule.js index 99841eeea..084f3b931 100644 --- a/guacamole/src/main/webapp/app/groupList/groupListModule.js +++ b/guacamole/src/main/webapp/app/groupList/groupListModule.js @@ -24,4 +24,4 @@ * Module for displaying the contents of a connection group, allowing the user * to select individual connections or groups. */ -angular.module('groupList', ['rest']); +angular.module('groupList', ['pager', 'rest']); diff --git a/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html b/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html index 287804321..ae1ef679f 100644 --- a/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html +++ b/guacamole/src/main/webapp/app/groupList/templates/guacGroupList.html @@ -51,6 +51,13 @@ -
+ +
+
+
+ + + diff --git a/guacamole/src/main/webapp/app/home/templates/home.html b/guacamole/src/main/webapp/app/home/templates/home.html index 5fabad7c5..4396625b1 100644 --- a/guacamole/src/main/webapp/app/home/templates/home.html +++ b/guacamole/src/main/webapp/app/home/templates/home.html @@ -41,7 +41,8 @@ + connection-group-template="'app/home/templates/connectionGroup.html'" + page-size="20">