Merge branch '33338-internationalization-support-for-prometheus-service-configuration' into 'master'
Resolve "Internationalization support for Prometheus Service Configuration" Closes #33338 See merge request gitlab-org/gitlab-ce!15336
This commit is contained in:
commit
8ee3ea74f5
|
@ -25,7 +25,7 @@ class PrometheusService < MonitoringService
|
||||||
end
|
end
|
||||||
|
|
||||||
def description
|
def description
|
||||||
'Prometheus monitoring'
|
s_('PrometheusService|Prometheus monitoring')
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.to_param
|
def self.to_param
|
||||||
|
@ -38,8 +38,8 @@ class PrometheusService < MonitoringService
|
||||||
type: 'text',
|
type: 'text',
|
||||||
name: 'api_url',
|
name: 'api_url',
|
||||||
title: 'API URL',
|
title: 'API URL',
|
||||||
placeholder: 'Prometheus API Base URL, like http://prometheus.example.com/',
|
placeholder: s_('PrometheusService|Prometheus API Base URL, like http://prometheus.example.com/'),
|
||||||
help: 'By default, Prometheus listens on ‘http://localhost:9090’. It’s not recommended to change the default address and port as this might affect or conflict with other services running on the GitLab server.',
|
help: s_('PrometheusService|By default, Prometheus listens on ‘http://localhost:9090’. It’s not recommended to change the default address and port as this might affect or conflict with other services running on the GitLab server.'),
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,42 +4,39 @@
|
||||||
.row.prepend-top-default.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring
|
.row.prepend-top-default.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring
|
||||||
.col-lg-3
|
.col-lg-3
|
||||||
%h4.prepend-top-0
|
%h4.prepend-top-0
|
||||||
Metrics
|
= s_('PrometheusService|Metrics')
|
||||||
%p
|
%p
|
||||||
Metrics are automatically configured and monitored
|
= s_('PrometheusService|Metrics are automatically configured and monitored based on a library of metrics from popular exporters.')
|
||||||
based on a library of metrics from popular exporters.
|
= link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus')
|
||||||
= link_to 'More information', help_page_path('user/project/integrations/prometheus')
|
|
||||||
|
|
||||||
.col-lg-9
|
.col-lg-9
|
||||||
.panel.panel-default.js-panel-monitored-metrics{ data: { "active-metrics" => "#{project_prometheus_active_metrics_path(@project, :json)}" } }
|
.panel.panel-default.js-panel-monitored-metrics{ data: { "active-metrics" => "#{project_prometheus_active_metrics_path(@project, :json)}" } }
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h3.panel-title
|
%h3.panel-title
|
||||||
Monitored
|
= s_('PrometheusService|Monitored')
|
||||||
%span.badge.js-monitored-count 0
|
%span.badge.js-monitored-count 0
|
||||||
.panel-body
|
.panel-body
|
||||||
.loading-metrics.text-center.js-loading-metrics
|
.loading-metrics.text-center.js-loading-metrics
|
||||||
= icon('spinner spin 3x', class: 'metrics-load-spinner')
|
= icon('spinner spin 3x', class: 'metrics-load-spinner')
|
||||||
%p Finding and configuring metrics...
|
%p
|
||||||
|
= s_('PrometheusService|Finding and configuring metrics...')
|
||||||
.empty-metrics.text-center.hidden.js-empty-metrics
|
.empty-metrics.text-center.hidden.js-empty-metrics
|
||||||
= custom_icon('icon_empty_metrics')
|
= custom_icon('icon_empty_metrics')
|
||||||
%p No metrics are being monitored. To start monitoring, deploy to an environment.
|
%p
|
||||||
= link_to project_environments_path(@project), title: 'View environments', class: 'btn btn-success' do
|
= s_('PrometheusService|No metrics are being monitored. To start monitoring, deploy to an environment.')
|
||||||
View environments
|
= link_to s_('PrometheusService|View environments'), project_environments_path(@project), class: 'btn btn-success'
|
||||||
%ul.list-unstyled.metrics-list.hidden.js-metrics-list
|
%ul.list-unstyled.metrics-list.hidden.js-metrics-list
|
||||||
|
|
||||||
.panel.panel-default.hidden.js-panel-missing-env-vars
|
.panel.panel-default.hidden.js-panel-missing-env-vars
|
||||||
.panel-heading
|
.panel-heading
|
||||||
%h3.panel-title
|
%h3.panel-title
|
||||||
= icon('caret-right lg fw', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel')
|
= icon('caret-right lg fw', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel')
|
||||||
Missing environment variable
|
= s_('PrometheusService|Missing environment variable')
|
||||||
%span.badge.js-env-var-count 0
|
%span.badge.js-env-var-count 0
|
||||||
.panel-body.hidden
|
.panel-body.hidden
|
||||||
.flash-container
|
.flash-container
|
||||||
.flash-notice
|
.flash-notice
|
||||||
.flash-text
|
.flash-text
|
||||||
To set up automatic monitoring, add the environment variable
|
= s_("PrometheusService|To set up automatic monitoring, add the environment variable %{variable} to exporter's queries." % { variable: "<code>$CI_ENVIRONMENT_SLUG</code>" }).html_safe
|
||||||
%code
|
= link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus', anchor: 'metrics-and-labels')
|
||||||
$CI_ENVIRONMENT_SLUG
|
|
||||||
to exporter’s queries.
|
|
||||||
= link_to 'More information', help_page_path('user/project/integrations/prometheus', anchor: 'metrics-and-labels')
|
|
||||||
%ul.list-unstyled.metrics-list.js-missing-var-metrics-list
|
%ul.list-unstyled.metrics-list.js-missing-var-metrics-list
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Add internationalization support for the prometheus integration
|
||||||
|
merge_request: 33338
|
||||||
|
author:
|
||||||
|
type: other
|
Loading…
Reference in New Issue