diff options
Diffstat (limited to 'app/views/projects/services')
10 files changed, 34 insertions, 18 deletions
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index e6761807409..2e49e74a9b3 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -1,4 +1,7 @@ -.row.prepend-top-default.append-bottom-default +- if lookup_context.template_exists?('top', "projects/services/#{@service.to_param}", true) + = render "projects/services/#{@service.to_param}/top" + +.row.gl-mt-3.gl-mb-3 .col-lg-4 %h4.gl-mt-0 = @service.title @@ -11,10 +14,10 @@ %p= @service.detailed_description .col-lg-8 = form_for(@service, as: :service, url: scoped_integration_path(@service), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'can-test' => @service.can_test?, 'test-url' => test_project_service_path(@project, @service) } }) do |form| - = render 'shared/service_settings', form: form, service: @service - .footer-block.row-content-block + = render 'shared/service_settings', form: form, integration: @service + .footer-block.row-content-block{ :class => "#{'gl-display-none' if @service.is_a?(AlertsService)}" } %input{ id: 'services_redirect_to', type: 'hidden', name: 'redirect_to', value: request.referrer } - = service_save_button + = service_save_button(disabled: @service.is_a?(AlertsService)) = link_to _('Cancel'), project_settings_integrations_path(@project), class: 'btn btn-cancel' diff --git a/app/views/projects/services/alerts/_help.html.haml b/app/views/projects/services/alerts/_help.html.haml index 4b09d1d9d0e..7abd198bea5 100644 --- a/app/views/projects/services/alerts/_help.html.haml +++ b/app/views/projects/services/alerts/_help.html.haml @@ -1,6 +1 @@ -.js-alerts-service-settings{ data: { activated: @service.activated?.to_s, - form_path: scoped_integration_path(@service), - authorization_key: @service.token, - url: @service.url || _('<namespace / project>'), - alerts_setup_url: help_page_path('user/project/integrations/generic_alerts.html', anchor: 'setting-up-generic-alerts'), - alerts_usage_url: help_page_path('user/project/operations/alert_management.html') } } +.js-alerts-service-settings{ data: alerts_settings_data(disabled: true) } diff --git a/app/views/projects/services/alerts/_top.html.haml b/app/views/projects/services/alerts/_top.html.haml new file mode 100644 index 00000000000..ebc93978832 --- /dev/null +++ b/app/views/projects/services/alerts/_top.html.haml @@ -0,0 +1,8 @@ +.row + .col-lg-12 + .gl-alert.gl-alert-info.js-alerts-moved-alert{ role: 'alert' } + = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + = _('You can now manage alert endpoint configuration in the Alerts section on the Operations settings page. Fields on this page have been deprecated.') + .gl-alert-actions + = link_to _('Visit settings page'), project_settings_operations_path(@project, anchor: 'js-alert-management-settings'), class: 'btn gl-alert-action btn-info new-gl-button' diff --git a/app/views/projects/services/prometheus/_configuration_banner.html.haml b/app/views/projects/services/prometheus/_configuration_banner.html.haml index dfcb1c5d240..b4e8458d8b9 100644 --- a/app/views/projects/services/prometheus/_configuration_banner.html.haml +++ b/app/views/projects/services/prometheus/_configuration_banner.html.haml @@ -12,14 +12,14 @@ .svg-container = image_tag 'illustrations/monitoring/getting_started.svg' .col-sm-10 - %p.text-success.prepend-top-default + %p.text-success.gl-mt-3 = s_('PrometheusService|Prometheus is being automatically managed on your clusters') = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn' - else .col-sm-2 = image_tag 'illustrations/monitoring/loading.svg' .col-sm-10 - %p.prepend-top-default + %p.gl-mt-3 = s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments') = link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn btn-success' diff --git a/app/views/projects/services/prometheus/_custom_metrics.html.haml b/app/views/projects/services/prometheus/_custom_metrics.html.haml index 210d0f37d65..3642460467b 100644 --- a/app/views/projects/services/prometheus/_custom_metrics.html.haml +++ b/app/views/projects/services/prometheus/_custom_metrics.html.haml @@ -3,7 +3,7 @@ .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.') - = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus', anchor: 'adding-custom-metrics'), target: '_blank', rel: "noopener noreferrer" + = link_to s_('PrometheusService|More information'), help_page_path('operations/metrics/index.md', anchor: 'adding-custom-metrics'), target: '_blank', rel: "noopener noreferrer" .col-lg-9 .card.custom-monitored-metrics.js-panel-custom-monitored-metrics{ data: { qa_selector: 'custom_metrics_container', active_custom_metrics: project_prometheus_metrics_path(project), environments_data: environments_list_data, service_active: "#{@service.active}" } } diff --git a/app/views/projects/services/prometheus/_external_alerts.html.haml b/app/views/projects/services/prometheus/_external_alerts.html.haml index 24ff0cc88a3..b27b1ab8723 100644 --- a/app/views/projects/services/prometheus/_external_alerts.html.haml +++ b/app/views/projects/services/prometheus/_external_alerts.html.haml @@ -3,6 +3,6 @@ - notify_url = notify_project_prometheus_alerts_url(@project, format: :json) - authorization_key = @project.alerting_setting.try(:token) -- learn_more_url = help_page_path('user/project/integrations/prometheus', anchor: 'external-prometheus-instances') +- learn_more_url = help_page_path('operations/metrics/alerts.md', anchor: 'external-prometheus-instances') -#js-settings-prometheus-alerts{ data: { notify_url: notify_url, authorization_key: authorization_key, change_key_url: reset_alerting_token_project_settings_operations_path(@project), learn_more_url: learn_more_url } } +#js-settings-prometheus-alerts{ data: { notify_url: notify_url, authorization_key: authorization_key, change_key_url: reset_alerting_token_project_settings_operations_path(@project), learn_more_url: learn_more_url, disabled: true } } diff --git a/app/views/projects/services/prometheus/_help.html.haml b/app/views/projects/services/prometheus/_help.html.haml index 1b5b794a7aa..c5b3fd31efa 100644 --- a/app/views/projects/services/prometheus/_help.html.haml +++ b/app/views/projects/services/prometheus/_help.html.haml @@ -1,7 +1,7 @@ - if @project = render 'projects/services/prometheus/configuration_banner', project: @project, service: @service -%h4.append-bottom-default +%h4.gl-mb-3 = s_('PrometheusService|Manual configuration') %p = s_('PrometheusService|Select the Active checkbox to override the Auto Configuration with custom settings. If unchecked, Auto Configuration settings are used.') diff --git a/app/views/projects/services/prometheus/_metrics.html.haml b/app/views/projects/services/prometheus/_metrics.html.haml index 3bd5f69f67e..9f5160f3dd5 100644 --- a/app/views/projects/services/prometheus/_metrics.html.haml +++ b/app/views/projects/services/prometheus/_metrics.html.haml @@ -33,5 +33,5 @@ .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 - = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus', anchor: 'metrics-and-labels') + = link_to s_('PrometheusService|More information'), help_page_path('operations/metrics/dashboards/variables.md', anchor: 'query-variables') %ul.list-unstyled.metrics-list.js-missing-var-metrics-list diff --git a/app/views/projects/services/prometheus/_show.html.haml b/app/views/projects/services/prometheus/_show.html.haml index 728a52f024f..9ce61ed5c13 100644 --- a/app/views/projects/services/prometheus/_show.html.haml +++ b/app/views/projects/services/prometheus/_show.html.haml @@ -3,7 +3,7 @@ %h4.gl-mt-0 = s_('PrometheusService|Metrics') -.row.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring +.row.gl-mb-3.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring = render 'projects/services/prometheus/metrics', project: @project = render 'projects/services/prometheus/external_alerts', project: @project diff --git a/app/views/projects/services/prometheus/_top.html.haml b/app/views/projects/services/prometheus/_top.html.haml new file mode 100644 index 00000000000..338414be5ab --- /dev/null +++ b/app/views/projects/services/prometheus/_top.html.haml @@ -0,0 +1,10 @@ +- return unless @service.manual_configuration? + +.row + .col-lg-12 + .gl-alert.gl-alert-info.js-alerts-moved-alert{ role: 'alert' } + = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + = s_('AlertSettings|You can now set up alert endpoints for manually configured Prometheus instances in the Alerts section on the Operations settings page. Alert endpoint fields on this page have been deprecated.') + .gl-alert-actions + = link_to _('Visit settings page'), project_settings_operations_path(@project, anchor: 'js-alert-management-settings'), class: 'btn gl-alert-action btn-info gl-button' |