summaryrefslogtreecommitdiff
path: root/app/controllers/projects/clusters_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/clusters_controller.rb')
-rw-r--r--app/controllers/projects/clusters_controller.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb
new file mode 100644
index 00000000000..feda6deeaa6
--- /dev/null
+++ b/app/controllers/projects/clusters_controller.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class Projects::ClustersController < Clusters::ClustersController
+ include ProjectUnauthorized
+
+ prepend_before_action :project
+ before_action :repository
+
+ layout 'project'
+
+ private
+
+ def clusterable
+ @clusterable ||= ClusterablePresenter.fabricate(project, current_user: current_user)
+ end
+
+ def project
+ @project ||= find_routable!(Project, File.join(params[:namespace_id], params[:project_id]), not_found_or_authorized_proc: project_unauthorized_proc)
+ end
+
+ def repository
+ @repository ||= project.repository
+ end
+end