Class: ProjectClusterablePresenter

Inherits:
ClusterablePresenter show all
Extended by:
Gitlab::Utils::Override
Includes:
ActionView::Helpers::UrlHelper
Defined in:
app/presenters/project_clusterable_presenter.rb

Instance Attribute Summary

Attributes included from Gitlab::View::Presenter::Base

#subject

Instance Method Summary collapse

Methods included from Gitlab::Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Methods inherited from ClusterablePresenter

#authorize_aws_role_path, #can_add_cluster?, #can_create_cluster?, #create_aws_clusters_path, #create_gcp_clusters_path, #create_user_clusters_path, #empty_state_help_text, #environments_cluster_path, fabricate, #index_path, #new_path

Methods inherited from Gitlab::View::Presenter::Delegated

#initialize

Methods included from Gitlab::View::Presenter::Base

#can?, #declarative_policy_delegate, #is_a?, #present, #url_builder, #web_path, #web_url

Methods included from Gitlab::Allowable

#can?

Methods included from Gitlab::Routing

add_helpers, includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

This class inherits a constructor from Gitlab::View::Presenter::Delegated

Instance Method Details

#clear_cluster_cache_path(cluster) ⇒ Object


23
24
25
# File 'app/presenters/project_clusterable_presenter.rb', line 23

def clear_cluster_cache_path(cluster)
  clear_cache_project_cluster_path(clusterable, cluster)
end

#cluster_path(cluster, params = {}) ⇒ Object


28
29
30
# File 'app/presenters/project_clusterable_presenter.rb', line 28

def cluster_path(cluster, params = {})
  project_cluster_path(clusterable, cluster, params)
end

#cluster_status_cluster_path(cluster, params = {}) ⇒ Object


8
9
10
# File 'app/presenters/project_clusterable_presenter.rb', line 8

def cluster_status_cluster_path(cluster, params = {})
  cluster_status_project_cluster_path(clusterable, cluster, params)
end

#install_applications_cluster_path(cluster, application) ⇒ Object


13
14
15
# File 'app/presenters/project_clusterable_presenter.rb', line 13

def install_applications_cluster_path(cluster, application)
  install_applications_project_cluster_path(clusterable, cluster, application)
end

38
39
40
# File 'app/presenters/project_clusterable_presenter.rb', line 38

def learn_more_link
  link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
end

#metrics_dashboard_path(cluster) ⇒ Object


42
43
44
# File 'app/presenters/project_clusterable_presenter.rb', line 42

def metrics_dashboard_path(cluster)
  metrics_dashboard_project_cluster_path(clusterable, cluster)
end

33
34
35
# File 'app/presenters/project_clusterable_presenter.rb', line 33

def sidebar_text
  s_('ClusterIntegration|With a Kubernetes cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way.')
end

#update_applications_cluster_path(cluster, application) ⇒ Object


18
19
20
# File 'app/presenters/project_clusterable_presenter.rb', line 18

def update_applications_cluster_path(cluster, application)
  update_applications_project_cluster_path(clusterable, cluster, application)
end