diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-11-27 16:03:35 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-11-27 16:03:35 +0300 |
commit | 554bf24b2a9e2964286272e690be417901cbd6e0 (patch) | |
tree | 9406b85d5083ea0b02dbaad594faae50979fcdd9 /app/controllers/projects/clusters_controller.rb | |
parent | 01c9d8fe5d9d5b52f1d9c65daed5a432e230b877 (diff) |
Add cluster pagination to ClustersController#index
Diffstat (limited to 'app/controllers/projects/clusters_controller.rb')
-rw-r--r-- | app/controllers/projects/clusters_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb index 01990fc3e2a..eb93dfabf3a 100644 --- a/app/controllers/projects/clusters_controller.rb +++ b/app/controllers/projects/clusters_controller.rb @@ -8,6 +8,7 @@ class Projects::ClustersController < Projects::ApplicationController before_action :authorize_admin_cluster!, only: [:destroy] def index + @clusters = Kaminari.paginate_array(@clusters).page(params[:page]).per(20) @active_count = project.clusters.enabled.count @inactive_count = project.clusters.disabled.count @all_count = @active_count + @inactive_count |