2018-11-18 11:00:15 +05:30
- project = local_assigns.fetch(:project)
2022-07-16 23:28:13 +05:30
= render 'shared/integrations/prometheus/custom_metrics', project: project, integration: integration
2020-04-22 19:07:51 +05:30
2019-10-12 21:52:04 +05:30
.col-lg-3
%p
= s_('PrometheusService|Common metrics are automatically monitored based on a library of metrics from popular exporters.')
2020-10-24 23:57:45 +05:30
= link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: "noopener noreferrer"
2018-11-18 11:00:15 +05:30
2019-10-12 21:52:04 +05:30
.col-lg-9
2023-05-27 22:25:52 +05:30
= render Pajamas::CardComponent.new(body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 js-panel-monitored-metrics', data: { active_metrics: active_common_project_prometheus_metrics_path(project, :json), metrics_help_path: help_page_path('user/project/integrations/prometheus_library/index') }}) do |c|
- c.header do
2019-10-12 21:52:04 +05:30
%strong
= s_('PrometheusService|Common metrics')
2023-05-27 22:25:52 +05:30
= gl_badge_tag 0, nil, class: 'js-monitored-count'
- c.body do
2019-10-12 21:52:04 +05:30
.loading-metrics.js-loading-metrics
%p.m-3
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true, css_class: 'metrics-load-spinner')
2019-10-12 21:52:04 +05:30
= s_('PrometheusService|Finding and configuring metrics...')
.empty-metrics.hidden.js-empty-metrics
%p.text-tertiary.m-3
= s_('PrometheusService|Waiting for your first deployment to an environment to find common metrics')
%ul.list-unstyled.metrics-list.hidden.js-metrics-list
2023-05-27 22:25:52 +05:30
= render Pajamas::CardComponent.new(body_options: { class: 'hidden gl-p-0' }, card_options: { class: 'hidden js-panel-missing-env-vars' }) do |c|
- c.header do
2023-03-04 22:38:38 +05:30
= sprite_icon('chevron-lg-right', css_class: 'panel-toggle js-panel-toggle-right')
= sprite_icon('chevron-lg-down', css_class: 'panel-toggle js-panel-toggle-down hidden')
2019-10-12 21:52:04 +05:30
= s_('PrometheusService|Missing environment variable')
2022-01-26 12:08:38 +05:30
= gl_badge_tag 0, nil, class: 'js-env-var-count'
2023-05-27 22:25:52 +05:30
- c.body do
2019-10-12 21:52:04 +05:30
.flash-container
.flash-notice
.flash-text
= s_("PrometheusService|To set up automatic monitoring, add the environment variable %{variable} to exporter's queries." % { variable: "<code>$CI_ENVIRONMENT_SLUG</code>" }).html_safe
2020-07-28 23:09:34 +05:30
= link_to s_('PrometheusService|More information'), help_page_path('operations/metrics/dashboards/variables.md', anchor: 'query-variables')
2019-10-12 21:52:04 +05:30
%ul.list-unstyled.metrics-list.js-missing-var-metrics-list