Use frontend code to create document paths

For the vulnerability report, we need many images and paths to the docs. This is currently provided by backend, for example: https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/helpers/ee/projects_helper.rb#L190-213

empty_state_svg_path: image_path('illustrations/security-dashboard-empty-state.svg'),
survey_request_svg_path: image_path('illustrations/security-dashboard_empty.svg'),
no_vulnerabilities_svg_path: image_path('illustrations/issues.svg'),
dashboard_documentation: help_page_path('user/application_security/security_dashboard/index'),
not_enabled_scanners_help_path: help_page_path('user/application_security/index', anchor: 'quick-start'),
operational_empty_state_svg_path: image_path('illustrations/security-dashboard_empty.svg'),
operational_help_path: help_page_path('user/application_security/policies/index'),
security_dashboard_help_path: help_page_path('user/application_security/security_dashboard/index'),
auto_fix_documentation: help_page_path('user/application_security/index', anchor: 'auto-fix-merge-requests'),

We can construct these paths on the frontend instead:

  1. For help_page_path, there is already a helper: https://gitlab.com/gitlab-org/gitlab/blob/e60f24faf128eab36a89f7e1c93598d49635e936/app/assets/javascripts/helpers/help_page_helper.js

Implementation Plan

For the following backend files, take all the help_page_path calls and convert them to the frontend equivalent if possible.

  • ee/app/helpers/ee/projects_helper.rb
  • ee/app/helpers/groups/security_features_helper.rb
  • ee/app/helpers/security_helper.rb
  • ee/app/views/projects/pipelines/_tabs_content.html.haml
Edited by Daniel Tian