2020-04-22 19:07:51 +05:30
- project = local_assigns.fetch(:project)
.col-lg-3
%p
= s_('PrometheusService|Custom metrics require Prometheus installed on a cluster with environment scope "*" OR a manually configured Prometheus to be available.')
2023-07-09 08:55:56 +05:30
= link_to s_('PrometheusService|More information'), help_page_path('operations/metrics/index.md'), target: '_blank', rel: "noopener noreferrer"
2020-04-22 19:07:51 +05:30
.col-lg-9
2023-05-27 22:25:52 +05:30
= render Pajamas::CardComponent.new(header_options: { class: 'gl-display-flex gl-align-items-center' }, body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 custom-monitored-metrics js-panel-custom-monitored-metrics', data: { active_custom_metrics: project_prometheus_metrics_path(project), environments_data: environments_list_data, service_active: "#{integration.active}" } }) do |c|
- c.header do
2020-04-22 19:07:51 +05:30
%strong
= s_('PrometheusService|Custom metrics')
2023-05-27 22:25:52 +05:30
= gl_badge_tag 0, nil, class: 'gl-ml-2 js-custom-monitored-count'
2023-03-04 22:38:38 +05:30
= link_to s_('PrometheusService|New metric'), new_project_prometheus_metric_path(project), class: 'btn gl-button btn-confirm gl-ml-auto js-new-metric-button hidden'
2023-05-27 22:25:52 +05:30
- c.body do
2020-04-22 19:07:51 +05:30
.flash-container.hidden
.flash-warning
.flash-text
.loading-metrics.js-loading-custom-metrics
%p.m-3
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true, css_class: 'metrics-load-spinner')
2020-04-22 19:07:51 +05:30
= s_('PrometheusService|Finding custom metrics...')
.empty-metrics.hidden.js-empty-custom-metrics
%p.text-tertiary.m-3.js-no-active-integration-text.hidden
= s_('PrometheusService|Enable Prometheus to define custom metrics, using either option above')
%p.text-tertiary.m-3.js-new-metric-text.hidden
= s_('PrometheusService|No custom metrics have been created. Create one using the button above')
%ul.list-unstyled.metrics-list.hidden.js-custom-metrics-list