2018-10-30 10:33:43 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ProjectClusterablePresenter < ClusterablePresenter
|
2018-11-07 01:06:33 +00:00
|
|
|
extend ::Gitlab::Utils::Override
|
|
|
|
include ActionView::Helpers::UrlHelper
|
|
|
|
|
|
|
|
override :cluster_status_cluster_path
|
2018-11-01 00:39:01 +00:00
|
|
|
def cluster_status_cluster_path(cluster, params = {})
|
|
|
|
cluster_status_project_cluster_path(clusterable, cluster, params)
|
|
|
|
end
|
|
|
|
|
2018-11-07 01:06:33 +00:00
|
|
|
override :install_applications_cluster_path
|
2018-11-01 00:39:01 +00:00
|
|
|
def install_applications_cluster_path(cluster, application)
|
|
|
|
install_applications_project_cluster_path(clusterable, cluster, application)
|
|
|
|
end
|
|
|
|
|
2018-11-07 01:06:33 +00:00
|
|
|
override :cluster_path
|
2018-11-01 00:39:01 +00:00
|
|
|
def cluster_path(cluster, params = {})
|
|
|
|
project_cluster_path(clusterable, cluster, params)
|
|
|
|
end
|
2018-11-06 20:26:30 +00:00
|
|
|
|
2018-11-07 01:06:33 +00:00
|
|
|
override :learn_more_link
|
|
|
|
def learn_more_link
|
|
|
|
link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
|
2018-11-06 20:26:30 +00:00
|
|
|
end
|
2018-10-30 10:33:43 +00:00
|
|
|
end
|