summaryrefslogtreecommitdiff
path: root/app/views/projects/services
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/services')
-rw-r--r--app/views/projects/services/_form.html.haml18
-rw-r--r--app/views/projects/services/edit.html.haml9
-rw-r--r--app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml2
-rw-r--r--app/views/projects/services/mattermost_slash_commands/_help.html.haml8
-rw-r--r--app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml2
-rw-r--r--app/views/projects/services/prometheus/_configuration_banner.html.haml14
-rw-r--r--app/views/projects/services/prometheus/_custom_metrics.html.haml2
-rw-r--r--app/views/projects/services/prometheus/_external_alerts.html.haml2
-rw-r--r--app/views/projects/services/prometheus/_help.html.haml2
-rw-r--r--app/views/projects/services/prometheus/_metrics.html.haml2
-rw-r--r--app/views/projects/services/prometheus/_show.html.haml4
-rw-r--r--app/views/projects/services/prometheus/_top.html.haml2
-rw-r--r--app/views/projects/services/slack_slash_commands/_help.html.haml4
13 files changed, 36 insertions, 35 deletions
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index 3c99b4c5e68..724684c9a0a 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -1,15 +1,15 @@
-- if lookup_context.template_exists?('top', "projects/services/#{@service.to_param}", true)
- = render "projects/services/#{@service.to_param}/top"
+- if lookup_context.template_exists?('top', "projects/services/#{integration.to_param}", true)
+ = render "projects/services/#{integration.to_param}/top", integration: integration
%h3.page-title
- = @service.title
- - if @service.operating?
+ = integration.title
+ - if integration.operating?
= sprite_icon('check', css_class: 'gl-text-green-500')
-= 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: { 'test-url' => test_project_service_path(@project, @service) } }) do |form|
- = render 'shared/service_settings', form: form, integration: @service
- %input{ id: 'services_redirect_to', type: 'hidden', name: 'redirect_to', value: request.referrer }
+= form_for(integration, as: :service, url: scoped_integration_path(integration), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'test-url' => test_project_service_path(@project, integration) } }) do |form|
+ = render 'shared/service_settings', form: form, integration: integration
+ %input{ id: 'services_redirect_to', type: 'hidden', name: 'redirect_to', value: request.referer }
-- if lookup_context.template_exists?('show', "projects/services/#{@service.to_param}", true)
+- if lookup_context.template_exists?('show', "projects/services/#{integration.to_param}", true)
%hr
- = render "projects/services/#{@service.to_param}/show"
+ = render "projects/services/#{integration.to_param}/show", integration: integration
diff --git a/app/views/projects/services/edit.html.haml b/app/views/projects/services/edit.html.haml
index 1aaea50c8d5..a250daafdbb 100644
--- a/app/views/projects/services/edit.html.haml
+++ b/app/views/projects/services/edit.html.haml
@@ -1,8 +1,9 @@
-- breadcrumb_title @service.title
+- breadcrumb_title @integration.title
- add_to_breadcrumbs _('Integration Settings'), project_settings_integrations_path(@project)
-- page_title @service.title, _('Integrations')
+- page_title @integration.title, _('Integrations')
- @content_class = 'limit-container-width' unless fluid_layout
-= render 'form'
+= render 'form', integration: @integration
+
- if @web_hook_logs
- = render partial: 'projects/hook_logs/index', locals: { hook: @service.service_hook, hook_logs: @web_hook_logs, project: @project }
+ = render partial: 'projects/hook_logs/index', locals: { hook: @integration.service_hook, hook_logs: @web_hook_logs, project: @project }
diff --git a/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml
index fe983961657..9d8ce186232 100644
--- a/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml
+++ b/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml
@@ -57,7 +57,7 @@
.form-group
= label_tag :request_url, s_('MattermostService|Request URL'), class: 'col-12 col-form-label label-bold'
.col-12.input-group
- = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
+ = text_field_tag :request_url, service_trigger_url(integration), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append
= clipboard_button(target: '#request_url', class: 'input-group-text')
diff --git a/app/views/projects/services/mattermost_slash_commands/_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_help.html.haml
index 4a7757daebc..993df389fb0 100644
--- a/app/views/projects/services/mattermost_slash_commands/_help.html.haml
+++ b/app/views/projects/services/mattermost_slash_commands/_help.html.haml
@@ -10,8 +10,8 @@
%p.inline
= s_("MattermostService|After you configure the integration, view your new Mattermost commands by entering")
%kbd.inline /<trigger> help
- - if !enabled && @service.project_level?
- = render 'projects/services/mattermost_slash_commands/detailed_help', subject: @service
+ - if !enabled && integration.project_level?
+ = render 'projects/services/mattermost_slash_commands/detailed_help', integration: integration
-- if enabled && @service.project_level?
- = render 'projects/services/mattermost_slash_commands/installation_info', subject: @service
+- if enabled && integration.project_level?
+ = render 'projects/services/mattermost_slash_commands/installation_info', integration: integration
diff --git a/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml b/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml
index 53ee363de53..38adc69dd5e 100644
--- a/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml
+++ b/app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml
@@ -1,5 +1,5 @@
.services-installation-info
- - unless @service.activated?
+ - unless integration.activated?
.row
.col-sm-9.offset-sm-3
= link_to new_project_mattermost_path(@project), class: 'btn gl-button btn-lg' do
diff --git a/app/views/projects/services/prometheus/_configuration_banner.html.haml b/app/views/projects/services/prometheus/_configuration_banner.html.haml
index 3786b845692..a34aa22acbb 100644
--- a/app/views/projects/services/prometheus/_configuration_banner.html.haml
+++ b/app/views/projects/services/prometheus/_configuration_banner.html.haml
@@ -1,26 +1,26 @@
%h4
- = s_('PrometheusService|Auto configuration')
+ = s_('PrometheusService|Prometheus cluster integration')
-- if service.manual_configuration?
+- if integration.manual_configuration?
.info-well
- = s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration.')
+ = s_('PrometheusService|To use a Prometheus installed on a cluster, deactivate the manual configuration.')
- else
.container-fluid
.row
- - if service.prometheus_available?
+ - if integration.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|GitLab is managing Prometheus on your clusters.')
+ = 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'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
.col-sm-10
%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 gl-button btn-confirm'
+ = 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
diff --git a/app/views/projects/services/prometheus/_custom_metrics.html.haml b/app/views/projects/services/prometheus/_custom_metrics.html.haml
index a901d5b3575..724950bcb39 100644
--- a/app/views/projects/services/prometheus/_custom_metrics.html.haml
+++ b/app/views/projects/services/prometheus/_custom_metrics.html.haml
@@ -6,7 +6,7 @@
= 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}" } }
+ .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: "#{integration.active}" } }
.card-header
%strong
= s_('PrometheusService|Custom metrics')
diff --git a/app/views/projects/services/prometheus/_external_alerts.html.haml b/app/views/projects/services/prometheus/_external_alerts.html.haml
index b27b1ab8723..168b4853a9a 100644
--- a/app/views/projects/services/prometheus/_external_alerts.html.haml
+++ b/app/views/projects/services/prometheus/_external_alerts.html.haml
@@ -1,5 +1,5 @@
- return unless can?(current_user, :read_prometheus_alerts, @project)
-- return unless @service.manual_configuration?
+- return unless integration.manual_configuration?
- notify_url = notify_project_prometheus_alerts_url(@project, format: :json)
- authorization_key = @project.alerting_setting.try(:token)
diff --git a/app/views/projects/services/prometheus/_help.html.haml b/app/views/projects/services/prometheus/_help.html.haml
index 04bd800c47a..9b3cb8893c4 100644
--- a/app/views/projects/services/prometheus/_help.html.haml
+++ b/app/views/projects/services/prometheus/_help.html.haml
@@ -1,5 +1,5 @@
- if @project
- = render 'projects/services/prometheus/configuration_banner', project: @project, service: @service
+ = render 'projects/services/prometheus/configuration_banner', project: @project, integration: integration
%h4.gl-mb-3
= s_('PrometheusService|Manual configuration')
diff --git a/app/views/projects/services/prometheus/_metrics.html.haml b/app/views/projects/services/prometheus/_metrics.html.haml
index 4bafd4d06e0..09fe77b8a9c 100644
--- a/app/views/projects/services/prometheus/_metrics.html.haml
+++ b/app/views/projects/services/prometheus/_metrics.html.haml
@@ -1,6 +1,6 @@
- project = local_assigns.fetch(:project)
-= render 'projects/services/prometheus/custom_metrics', project: project
+= render 'projects/services/prometheus/custom_metrics', project: project, integration: integration
.col-lg-3
%p
diff --git a/app/views/projects/services/prometheus/_show.html.haml b/app/views/projects/services/prometheus/_show.html.haml
index 9ce61ed5c13..3350ac8a6c5 100644
--- a/app/views/projects/services/prometheus/_show.html.haml
+++ b/app/views/projects/services/prometheus/_show.html.haml
@@ -4,6 +4,6 @@
= s_('PrometheusService|Metrics')
.row.gl-mb-3.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring
- = render 'projects/services/prometheus/metrics', project: @project
+ = render 'projects/services/prometheus/metrics', project: @project, integration: integration
-= render 'projects/services/prometheus/external_alerts', project: @project
+= render 'projects/services/prometheus/external_alerts', project: @project, integration: integration
diff --git a/app/views/projects/services/prometheus/_top.html.haml b/app/views/projects/services/prometheus/_top.html.haml
index db02ea85865..f7446273a80 100644
--- a/app/views/projects/services/prometheus/_top.html.haml
+++ b/app/views/projects/services/prometheus/_top.html.haml
@@ -1,4 +1,4 @@
-- return unless @service.manual_configuration?
+- return unless integration.manual_configuration?
.row
.col-lg-12
diff --git a/app/views/projects/services/slack_slash_commands/_help.html.haml b/app/views/projects/services/slack_slash_commands/_help.html.haml
index b68addcb093..9702f9b08f2 100644
--- a/app/views/projects/services/slack_slash_commands/_help.html.haml
+++ b/app/views/projects/services/slack_slash_commands/_help.html.haml
@@ -11,7 +11,7 @@
%p.inline
= s_("SlackService|See list of available commands in Slack after setting up this service, by entering")
%kbd.inline /<command> help
- - if @service.project_level?
+ - if integration.project_level?
%p= _("To set up this service:")
%ul.list-unstyled.indent-list
%li
@@ -39,7 +39,7 @@
.form-group
= label_tag :url, 'URL', class: 'col-12 col-form-label label-bold'
.col-12.input-group
- = text_field_tag :url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
+ = text_field_tag :url, service_trigger_url(integration), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append
= clipboard_button(target: '#url', class: 'input-group-text')