2018-12-05 23:21:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
class Projects::ClustersController < Clusters::ClustersController
|
|
|
|
prepend_before_action :project
|
|
|
|
before_action :repository
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2019-09-04 21:01:54 +05:30
|
|
|
before_action do
|
2022-07-16 23:28:13 +05:30
|
|
|
push_frontend_feature_flag(:show_gitlab_agent_feedback, type: :ops)
|
2019-09-04 21:01:54 +05:30
|
|
|
end
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
layout 'project'
|
2018-11-08 19:23:39 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
private
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
def clusterable
|
|
|
|
@clusterable ||= ClusterablePresenter.fabricate(project, current_user: current_user)
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
def project
|
2021-11-11 11:23:49 +05:30
|
|
|
@project ||= find_routable!(Project, File.join(params[:namespace_id], params[:project_id]), request.fullpath)
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
2018-03-27 19:54:05 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
def repository
|
|
|
|
@repository ||= project.repository
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
def metrics_dashboard_params
|
|
|
|
params.permit(:embedded, :group, :title, :y_label).merge(
|
|
|
|
{
|
|
|
|
cluster: cluster,
|
|
|
|
cluster_type: :project
|
|
|
|
}
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|