summaryrefslogtreecommitdiff
path: root/app/views/clusters
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-07 00:09:26 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-07 00:09:26 +0000
commit418a39f6c20ebaf9572c4ef3ae924b0c6ffc5e3b (patch)
treec4ae73eee4e0a2ba535e87893858d9e76778d09d /app/views/clusters
parent2633d5ef5ed868eccb174c6ff644a3fb8224f990 (diff)
downloadgitlab-ce-418a39f6c20ebaf9572c4ef3ae924b0c6ffc5e3b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/clusters')
-rw-r--r--app/views/clusters/clusters/_integrations.html.haml19
-rw-r--r--app/views/clusters/clusters/_integrations_tab.html.haml6
-rw-r--r--app/views/clusters/clusters/show.html.haml1
3 files changed, 26 insertions, 0 deletions
diff --git a/app/views/clusters/clusters/_integrations.html.haml b/app/views/clusters/clusters/_integrations.html.haml
new file mode 100644
index 00000000000..9675f77c235
--- /dev/null
+++ b/app/views/clusters/clusters/_integrations.html.haml
@@ -0,0 +1,19 @@
+.settings.expanded.border-0.m-0
+ %p
+ = s_('ClusterIntegration|Integrations enable you to integrate your cluster as part of your GitLab workflow.')
+ = link_to _('Learn more'), help_page_path('user/clusters/integrations.md'), target: '_blank'
+ .settings-content#advanced-settings-section
+ - if can?(current_user, :admin_cluster, @cluster) && @prometheus_integration.integration?
+ .sub-section.form-group
+ = form_for @prometheus_integration, url: @cluster.integrations_path, as: :integration, method: :post, html: { class: 'js-cluster-integrations-form' } do |form|
+ = form.hidden_field :application_type
+ .form-group
+ .gl-form-checkbox.custom-control.custom-checkbox
+ = form.check_box :enabled, { class: 'custom-control-input'}, true, false
+ = form.label :enabled, s_('ClusterIntegration|Enable Prometheus integration'), class: 'custom-control-label'
+ .gl-form-group
+ .form-text.text-gl-muted
+ - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path("user/clusters/integrations", anchor: "prometheus-cluster-integration") }
+ - link_end = '</a>'.html_safe
+ = html_escape(s_('ClusterIntegration|Before you enable this integration, follow the %{link_start}documented process%{link_end}.')) % { link_start: link_start, link_end: link_end }
+ = form.submit _('Save changes'), class: 'btn gl-button btn-success'
diff --git a/app/views/clusters/clusters/_integrations_tab.html.haml b/app/views/clusters/clusters/_integrations_tab.html.haml
new file mode 100644
index 00000000000..77b8b6ca3e6
--- /dev/null
+++ b/app/views/clusters/clusters/_integrations_tab.html.haml
@@ -0,0 +1,6 @@
+- tab_name = 'integrations'
+- active = params[:tab] == tab_name
+
+%li.nav-item{ role: 'presentation' }
+ %a#cluster-apps-tab.nav-link{ class: active_when(active), href: clusterable.cluster_path(@cluster.id, params: {tab: tab_name}) }
+ %span= _('Integrations')
diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml
index cb464eeafbb..01ba7c06154 100644
--- a/app/views/clusters/clusters/show.html.haml
+++ b/app/views/clusters/clusters/show.html.haml
@@ -59,6 +59,7 @@
= render_if_exists 'clusters/clusters/environments_tab'
= render 'clusters/clusters/health_tab'
= render 'applications_tab'
+ = render 'integrations_tab'
= render 'advanced_settings_tab'
.tab-content.py-3