Class: InstanceClusterablePresenter
Class Method Summary
collapse
Instance Method Summary
collapse
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
#can_add_cluster?, #can_admin_cluster?, #can_create_cluster?, #environments_cluster_path
#initialize
#delegator_override, #delegator_override_with, #delegator_target, validator, validators, verify!
#__subject__, #can?, #declarative_policy_delegate, #is_a?, #path_with_line_numbers, #present, #url_builder, #web_path, #web_url
#can?, #can_all?, #can_any?
includes_helpers, redirect_legacy_paths, url_helpers
Class Method Details
.fabricate(clusterable, **attributes) ⇒ Object
8
9
10
11
12
13
14
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 8
def self.fabricate(clusterable, **attributes)
attributes_with_presenter_class = attributes.merge(presenter_class: InstanceClusterablePresenter)
Gitlab::View::Presenter::Factory
.new(clusterable, **attributes_with_presenter_class)
.fabricate!
end
|
Instance Method Details
#clear_cluster_cache_path(cluster) ⇒ Object
27
28
29
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 27
def clear_cluster_cache_path(cluster)
clear_cache_admin_cluster_path(cluster)
end
|
#cluster_path(cluster, params = {}) ⇒ Object
32
33
34
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 32
def cluster_path(cluster, params = {})
admin_cluster_path(cluster, params)
end
|
#cluster_status_cluster_path(cluster, params = {}) ⇒ Object
22
23
24
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 22
def cluster_status_cluster_path(cluster, params = {})
cluster_status_admin_cluster_path(cluster, params)
end
|
#connect_path ⇒ Object
37
38
39
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 37
def connect_path
connect_admin_clusters_path
end
|
#create_user_clusters_path ⇒ Object
47
48
49
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 47
def create_user_clusters_path
create_user_admin_clusters_path
end
|
#empty_state_help_text ⇒ Object
52
53
54
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 52
def empty_state_help_text
s_('ClusterIntegration|Adding an integration will share the cluster across all projects.')
end
|
#index_path(options = {}) ⇒ Object
17
18
19
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 17
def index_path(options = {})
admin_clusters_path(options)
end
|
#learn_more_link ⇒ Object
62
63
64
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 62
def learn_more_link
ApplicationController.helpers.link_to(s_('ClusterIntegration|Learn more about instance Kubernetes clusters'), help_page_path('user/instance/clusters/index.md'), target: '_blank', rel: 'noopener noreferrer')
end
|
#new_cluster_docs_path ⇒ Object
42
43
44
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 42
def new_cluster_docs_path
nil
end
|
57
58
59
|
# File 'app/presenters/instance_clusterable_presenter.rb', line 57
def
s_('ClusterIntegration|Adding a Kubernetes cluster will automatically share the cluster across all projects. Use review apps, deploy your applications, and easily run your pipelines for all projects using the same cluster.')
end
|