2018-10-30 06:33:43 -04:00
# frozen_string_literal: true
class ProjectClusterablePresenter < ClusterablePresenter
2018-11-06 20:06:33 -05:00
extend :: Gitlab :: Utils :: Override
2021-09-21 05:12:21 -04:00
presents :: Project
2018-11-06 20:06:33 -05:00
override :cluster_status_cluster_path
2018-10-31 20:39:01 -04:00
def cluster_status_cluster_path ( cluster , params = { } )
cluster_status_project_cluster_path ( clusterable , cluster , params )
end
2019-11-26 04:08:36 -05:00
override :clear_cluster_cache_path
def clear_cluster_cache_path ( cluster )
clear_cache_project_cluster_path ( clusterable , cluster )
end
2018-11-06 20:06:33 -05:00
override :cluster_path
2018-10-31 20:39:01 -04:00
def cluster_path ( cluster , params = { } )
project_cluster_path ( clusterable , cluster , params )
end
2018-11-06 15:26:30 -05:00
2018-11-07 03:07:28 -05:00
override :sidebar_text
def sidebar_text
2022-03-16 14:08:16 -04:00
s_ ( 'ClusterIntegration|Use GitLab to deploy to your cluster, run jobs, use review apps, and more.' )
2018-11-07 03:07:28 -05:00
end
2018-11-06 20:06:33 -05:00
override :learn_more_link
def learn_more_link
2022-03-16 14:08:16 -04: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 15:26:30 -05:00
end
2020-07-13 11:09:08 -04:00
def metrics_dashboard_path ( cluster )
metrics_dashboard_project_cluster_path ( clusterable , cluster )
end
2018-10-30 06:33:43 -04:00
end
2019-09-13 09:26:31 -04:00
2021-05-11 17:10:21 -04:00
ProjectClusterablePresenter . prepend_mod_with ( 'ProjectClusterablePresenter' )