2018-11-01 00:39:01 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::ClustersController < Clusters::ClustersController
|
|
|
|
prepend_before_action :project
|
|
|
|
before_action :repository
|
|
|
|
|
2019-06-06 19:57:28 +00:00
|
|
|
before_action do
|
|
|
|
push_frontend_feature_flag(:prometheus_computed_alerts)
|
|
|
|
end
|
|
|
|
|
2018-11-01 00:39:01 +00:00
|
|
|
layout 'project'
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def clusterable
|
|
|
|
@clusterable ||= ClusterablePresenter.fabricate(project, current_user: current_user)
|
|
|
|
end
|
|
|
|
|
|
|
|
def project
|
2019-05-13 08:50:23 +00:00
|
|
|
@project ||= find_routable!(Project, File.join(params[:namespace_id], params[:project_id]))
|
2018-11-01 00:39:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def repository
|
|
|
|
@repository ||= project.repository
|
|
|
|
end
|
|
|
|
end
|
2019-09-18 14:02:45 +00:00
|
|
|
|
|
|
|
Projects::ClustersController.prepend_if_ee('EE::Projects::ClustersController')
|