Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-26 18:08:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-26 18:08:45 +0300
commit2a53c24c512db8613255884b1db42402a31d831b (patch)
tree37831911612043071365082fb0838c671ec7bbb7 /app/views
parent8e812185ddf4c77ae3b1512b2d04725190e64209 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/_head.html.haml1
-rw-r--r--app/views/projects/services/_form.html.haml5
-rw-r--r--app/views/projects/services/alerts/_help.html.haml1
-rw-r--r--app/views/projects/services/alerts/_top.html.haml12
-rw-r--r--app/views/projects/settings/operations/_alert_management.html.haml18
-rw-r--r--app/views/projects/settings/operations/show.html.haml1
6 files changed, 36 insertions, 2 deletions
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 5fcafb9332e..d1311f17b72 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -53,7 +53,6 @@
= stylesheet_link_tag "application_dark", media: "all"
- else
= stylesheet_link_tag "application", media: "all"
- = stylesheet_link_tag "print", media: "print"
= stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations']
= stylesheet_link_tag 'performance_bar' if performance_bar_enabled?
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index 966ad3ca14f..2240c1296ee 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -1,3 +1,6 @@
+- 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
@@ -12,7 +15,7 @@
.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, integration: @service
- .footer-block.row-content-block
+ .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
&nbsp;
diff --git a/app/views/projects/services/alerts/_help.html.haml b/app/views/projects/services/alerts/_help.html.haml
index 4b09d1d9d0e..f0faea7e12d 100644
--- a/app/views/projects/services/alerts/_help.html.haml
+++ b/app/views/projects/services/alerts/_help.html.haml
@@ -2,5 +2,6 @@
form_path: scoped_integration_path(@service),
authorization_key: @service.token,
url: @service.url || _('<namespace / project>'),
+ disabled: 'true',
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') } }
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..443dbf40e3e
--- /dev/null
+++ b/app/views/projects/services/alerts/_top.html.haml
@@ -0,0 +1,12 @@
+- return unless show_alerts_moved_alert?
+
+.row
+ .col-lg-12
+ .gl-alert.gl-alert-info.js-alerts-moved-alert{ role: 'alert', data: { feature_id: UserCalloutsHelper::ALERTS_MOVED, dismiss_endpoint: user_callouts_path } }
+ = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
+ %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') }
+ = sprite_icon('close', size: 16, css_class: 'gl-icon')
+ .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), class: 'btn gl-alert-action btn-info new-gl-button'
diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml
new file mode 100644
index 00000000000..b838a04a3cf
--- /dev/null
+++ b/app/views/projects/settings/operations/_alert_management.html.haml
@@ -0,0 +1,18 @@
+- return unless can?(current_user, :admin_operations, @project)
+
+%section.settings.no-animate.js-alert-management-settings
+ .settings-header
+ %h3{ :class => "h4" }
+ = _('Alerts')
+ %button.btn.js-settings-toggle{ type: 'button' }
+ = _('Expand')
+ %p
+ = _('Display alerts from all your monitoring tools directly within GitLab.')
+ = link_to _('More information'), help_page_path('user/project/operations/alert_management'), target: '_blank', rel: 'noopener noreferrer'
+ .settings-content
+ .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: project_alert_management_index_path(@project) } }
diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml
index 9e4fbf81ca4..3c05605f6ce 100644
--- a/app/views/projects/settings/operations/show.html.haml
+++ b/app/views/projects/settings/operations/show.html.haml
@@ -2,6 +2,7 @@
- page_title _('Operations Settings')
- breadcrumb_title _('Operations Settings')
+= render 'projects/settings/operations/alert_management', service: alerts_service
= render 'projects/settings/operations/incidents'
= render 'projects/settings/operations/error_tracking'
= render 'projects/settings/operations/prometheus', service: prometheus_service if Feature.enabled?(:settings_operations_prometheus_service)