Commit 120a503b authored by syasonik's avatar syasonik

Route alert management docs urls to helpful locations

parent 44a18a86
...@@ -5,8 +5,8 @@ module Projects::AlertManagementHelper ...@@ -5,8 +5,8 @@ module Projects::AlertManagementHelper
{ {
'project-path' => project.full_path, 'project-path' => project.full_path,
'enable-alert-management-path' => project_settings_operations_path(project, anchor: 'js-alert-management-settings'), 'enable-alert-management-path' => project_settings_operations_path(project, anchor: 'js-alert-management-settings'),
'alerts-help-url' => help_page_url('operations/incident_management/index.md'), 'alerts-help-url' => help_page_url('operations/incident_management/alerts.md'),
'populating-alerts-help-url' => help_page_url('operations/incident_management/index.md', anchor: 'enable-alert-management'), 'populating-alerts-help-url' => help_page_url('operations/incident_management/integrations.md', anchor: 'configuration'),
'empty-alert-svg-path' => image_path('illustrations/alert-management-empty-state.svg'), 'empty-alert-svg-path' => image_path('illustrations/alert-management-empty-state.svg'),
'user-can-enable-alert-management' => can?(current_user, :admin_operations, project).to_s, 'user-can-enable-alert-management' => can?(current_user, :admin_operations, project).to_s,
'alert-management-enabled' => alert_management_enabled?(project).to_s, 'alert-management-enabled' => alert_management_enabled?(project).to_s,
......
---
title: Link to more helpful docs from alert management pages
merge_request: 51665
author:
type: changed
...@@ -28,8 +28,8 @@ RSpec.describe Projects::AlertManagementHelper do ...@@ -28,8 +28,8 @@ RSpec.describe Projects::AlertManagementHelper do
expect(helper.alert_management_data(current_user, project)).to match( expect(helper.alert_management_data(current_user, project)).to match(
'project-path' => project_path, 'project-path' => project_path,
'enable-alert-management-path' => setting_path, 'enable-alert-management-path' => setting_path,
'alerts-help-url' => 'http://test.host/help/operations/incident_management/index.md', 'alerts-help-url' => 'http://test.host/help/operations/incident_management/alerts.md',
'populating-alerts-help-url' => 'http://test.host/help/operations/incident_management/index.md#enable-alert-management', 'populating-alerts-help-url' => 'http://test.host/help/operations/incident_management/integrations.md#configuration',
'empty-alert-svg-path' => match_asset_path('/assets/illustrations/alert-management-empty-state.svg'), 'empty-alert-svg-path' => match_asset_path('/assets/illustrations/alert-management-empty-state.svg'),
'user-can-enable-alert-management' => 'true', 'user-can-enable-alert-management' => 'true',
'alert-management-enabled' => 'false', 'alert-management-enabled' => 'false',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment