debian-mirror-gitlab/app/presenters/project_clusterable_presenter.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.2 KiB
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
class ProjectClusterablePresenter < ClusterablePresenter
2019-02-15 15:39:39 +05:30
extend ::Gitlab::Utils::Override
2021-11-18 22:05:49 +05:30
presents ::Project
2019-02-15 15:39:39 +05:30
override :cluster_status_cluster_path
2018-12-13 13:39:08 +05:30
def cluster_status_cluster_path(cluster, params = {})
cluster_status_project_cluster_path(clusterable, cluster, params)
end
2020-01-01 13:55:28 +05:30
override :clear_cluster_cache_path
def clear_cluster_cache_path(cluster)
clear_cache_project_cluster_path(clusterable, cluster)
end
2019-02-15 15:39:39 +05:30
override :cluster_path
2018-12-13 13:39:08 +05:30
def cluster_path(cluster, params = {})
project_cluster_path(clusterable, cluster, params)
end
2019-02-15 15:39:39 +05:30
override :sidebar_text
def sidebar_text
2022-05-07 20:08:51 +05:30
s_('ClusterIntegration|Use GitLab to deploy to your cluster, run jobs, use review apps, and more.')
2019-02-15 15:39:39 +05:30
end
override :learn_more_link
def learn_more_link
2022-05-07 20:08:51 +05:30
ApplicationController.helpers.link_to(s_('ClusterIntegration|Learn more about Kubernetes.'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
2019-02-15 15:39:39 +05:30
end
2020-07-28 23:09:34 +05:30
def metrics_dashboard_path(cluster)
metrics_dashboard_project_cluster_path(clusterable, cluster)
end
2018-12-13 13:39:08 +05:30
end
2019-12-04 20:38:33 +05:30
2021-06-08 01:23:25 +05:30
ProjectClusterablePresenter.prepend_mod_with('ProjectClusterablePresenter')