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
2021-09-21 09:12:21 +00:00
presents :: Project
2018-11-07 01:06:33 +00:00
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
2019-11-26 09:08:36 +00:00
override :clear_cluster_cache_path
def clear_cluster_cache_path ( cluster )
clear_cache_project_cluster_path ( clusterable , cluster )
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 08:07:28 +00:00
override :sidebar_text
def sidebar_text
2022-03-16 18:08:16 +00:00
s_ ( 'ClusterIntegration|Use GitLab to deploy to your cluster, run jobs, use review apps, and more.' )
2018-11-07 08:07:28 +00:00
end
2018-11-07 01:06:33 +00:00
override :learn_more_link
def learn_more_link
2022-03-16 18:08:16 +00:00
ApplicationController . helpers . 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
2020-07-13 15:09:08 +00:00
def metrics_dashboard_path ( cluster )
metrics_dashboard_project_cluster_path ( clusterable , cluster )
end
2018-10-30 10:33:43 +00:00
end
2019-09-13 13:26:31 +00:00
2021-05-11 21:10:21 +00:00
ProjectClusterablePresenter . prepend_mod_with ( 'ProjectClusterablePresenter' )