Commit 554bf24b authored by Matija Čupić's avatar Matija Čupić

Add cluster pagination to ClustersController#index

parent 01c9d8fe
...@@ -8,6 +8,7 @@ class Projects::ClustersController < Projects::ApplicationController ...@@ -8,6 +8,7 @@ class Projects::ClustersController < Projects::ApplicationController
before_action :authorize_admin_cluster!, only: [:destroy] before_action :authorize_admin_cluster!, only: [:destroy]
def index def index
@clusters = Kaminari.paginate_array(@clusters).page(params[:page]).per(20)
@active_count = project.clusters.enabled.count @active_count = project.clusters.enabled.count
@inactive_count = project.clusters.disabled.count @inactive_count = project.clusters.disabled.count
@all_count = @active_count + @inactive_count @all_count = @active_count + @inactive_count
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment