Commit 47cb6b85 authored by Alexander Turinske's avatar Alexander Turinske Committed by Ash McKenzie

Update titles, changelog, and abstract out method

- the titles of the pages and sidebar are correct
- the changelog title is now more descriptive
- the unavailable data was abstracted out into a helper method
  to be used in multiple places
parent 8a83d964
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
<template #header> <template #header>
<header class="page-title-holder flex-fill d-flex align-items-center"> <header class="page-title-holder flex-fill d-flex align-items-center">
<h2 class="page-title flex-grow"> <h2 class="page-title flex-grow">
{{ s__('SecurityReports|Group Security Dashboard') }} {{ s__('SecurityReports|Vulnerability Report') }}
</h2> </h2>
<csv-export-button :vulnerabilities-export-endpoint="vulnerabilitiesExportEndpoint" /> <csv-export-button :vulnerabilities-export-endpoint="vulnerabilitiesExportEndpoint" />
</header> </header>
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
<template functional> <template functional>
<div> <div>
<h1>{{ $options.i18n.title }}</h1> <h2>{{ $options.i18n.title }}</h2>
<div class="security-charts gl-display-flex gl-flex-wrap"> <div class="security-charts gl-display-flex gl-flex-wrap">
<slot></slot> <slot></slot>
</div> </div>
......
...@@ -14,4 +14,12 @@ module SecurityHelper ...@@ -14,4 +14,12 @@ module SecurityHelper
vulnerabilities_export_endpoint: expose_path(api_v4_security_vulnerability_exports_path) vulnerabilities_export_endpoint: expose_path(api_v4_security_vulnerability_exports_path)
} }
end end
def security_dashboard_unavailable_view_data
{
empty_state_svg_path: image_path('illustrations/security-dashboard-empty-state.svg'),
dashboard_documentation: help_page_path('user/application_security/security_dashboard/index'),
is_unavailable: "true"
}
end
end end
- breadcrumb_title _("Security Dashboard") - breadcrumb_title _("Security Dashboard")
- page_title _("Security Dashboard") - page_title _("Security Dashboard")
#js-group-security-dashboard{ data: { is_unavailable: "true", #js-group-security-dashboard{ data: security_dashboard_unavailable_view_data }
empty_state_svg_path: image_path('illustrations/security-dashboard-empty-state.svg'),
dashboard_documentation: help_page_path('user/application_security/security_dashboard/index') } }
- breadcrumb_title _("Vulnerability Report") - breadcrumb_title _("Vulnerability Report")
- page_title _("Vulnerability Report") - page_title _("Vulnerability Report")
#js-group-vulnerabilities{ data: { is_unavailable: "true", #js-group-vulnerabilities{ data: security_dashboard_unavailable_view_data }
empty_state_svg_path: image_path('illustrations/security-dashboard-empty-state.svg'),
dashboard_documentation: help_page_path('user/application_security/security_dashboard/index') } }
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
%ul.sidebar-sub-level-items{ data: { qa_selector: 'group_secure_submenu' } } %ul.sidebar-sub-level-items{ data: { qa_selector: 'group_secure_submenu' } }
- if group_level_security_dashboard_available?(@group) - if group_level_security_dashboard_available?(@group)
= nav_link(path: 'dashboard#show') do = nav_link(path: 'dashboard#show') do
= link_to group_security_dashboard_path(@group), title: _('Security'), data: { qa_selector: 'security_dashboard_link' } do = link_to group_security_dashboard_path(@group), title: _('Security Dashboard'), data: { qa_selector: 'security_dashboard_link' } do
%span= _('Security') %span= _('Security Dashboard')
- if group_level_security_dashboard_available?(@group) - if group_level_security_dashboard_available?(@group)
= nav_link(path: 'vulnerabilities#index') do = nav_link(path: 'vulnerabilities#index') do
......
--- ---
title: Add new security charts page title: Add new security charts page and unavailable view
merge_request: 38088 merge_request: 38088
author: author:
type: changed type: changed
...@@ -158,7 +158,7 @@ RSpec.describe 'Group navbar' do ...@@ -158,7 +158,7 @@ RSpec.describe 'Group navbar' do
new_nav_item: { new_nav_item: {
nav_item: _('Security & Compliance'), nav_item: _('Security & Compliance'),
nav_sub_items: [ nav_sub_items: [
_('Security'), _('Security Dashboard'),
_('Vulnerability Report'), _('Vulnerability Report'),
_('Compliance') _('Compliance')
] ]
......
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