Commit 4f17d97c authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'resolve_config_banner_duplication' into 'master'

Resolve duplication between configuration_banner files

See merge request gitlab-org/gitlab!81395
parents 24f7775a 0af8af1a
- if @project
= render 'projects/services/prometheus/configuration_banner', project: @project, integration: integration
= render 'shared/prometheus_configuration_banner', project: @project, integration: integration, header_tag: :h4
%hr
%h4.gl-mb-3
= s_('PrometheusService|Manual configuration')
......
%b
= s_('PrometheusService|Prometheus cluster integration')
- if service.manual_configuration?
.info-well.p-2.mt-2
= s_('PrometheusService|To use a Prometheus installed on a cluster, deactivate the manual configuration.')
- else
.container-fluid
.row
- if service.prometheus_available?
.col-sm-2
.svg-container
= image_tag 'illustrations/monitoring/getting_started.svg'
.col-sm-10
%p.text-success.gl-mt-3
= s_('PrometheusService|You have a cluster with the Prometheus integration enabled.')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'gl-button btn btn-default'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
.col-sm-10
%p.gl-mt-3
= s_('PrometheusService|Configure GitLab to query a Prometheus installed in one of your clusters.')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-confirm'
......@@ -9,7 +9,7 @@
= link_to _('More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
- if @project
= render 'projects/settings/operations/configuration_banner', project: @project, service: service
= render 'shared/prometheus_configuration_banner', project: @project, integration: service, header_tag: :b, info_well_classes: 'gl-p-3 gl-mt-3'
%b.gl-mb-3
= s_('PrometheusService|Manual configuration')
......
%h4
= s_('PrometheusService|Prometheus cluster integration')
- header_tag = local_assigns.fetch(:header_tag)
- info_well_classes = local_assigns.fetch(:info_well_classes, '')
- integration = local_assigns.fetch(:integration)
= content_tag(header_tag, s_('PrometheusService|Prometheus cluster integration'))
- if integration.manual_configuration?
.info-well
.info-well{ class: info_well_classes }
= s_('PrometheusService|To use a Prometheus installed on a cluster, deactivate the manual configuration.')
- else
.container-fluid
......@@ -14,7 +17,7 @@
.col-sm-10
%p.text-success.gl-mt-3
= s_('PrometheusService|You have a cluster with the Prometheus integration enabled.')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button'
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-default'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
......@@ -22,5 +25,3 @@
%p.gl-mt-3
= s_('PrometheusService|Configure GitLab to query a Prometheus installed in one of your clusters.')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button btn-confirm'
%hr
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment