2021-06-14 11:09:48 -04:00
< script >
import { GlBanner } from '@gitlab/ui' ;
import { s _ _ } from '~/locale' ;
2022-01-26 16:16:58 -05:00
import Tracking from '~/tracking' ;
export const SECURITY _UPGRADE _BANNER = 'security_upgrade_banner' ;
export const UPGRADE _OR _FREE _TRIAL = 'upgrade_or_free_trial' ;
2021-06-14 11:09:48 -04:00
export default {
components : {
GlBanner ,
} ,
2022-01-26 16:16:58 -05:00
mixins : [ Tracking . mixin ( { property : SECURITY _UPGRADE _BANNER } ) ] ,
2021-06-14 11:09:48 -04:00
inject : [ 'upgradePath' ] ,
i18n : {
2021-07-26 08:10:08 -04:00
title : s _ _ ( 'SecurityConfiguration|Secure your project' ) ,
2021-06-14 11:09:48 -04:00
bodyStart : s _ _ (
2021-07-26 08:10:08 -04:00
` SecurityConfiguration|Immediately begin risk analysis and remediation with application security features. Start with SAST and Secret Detection, available to all plans. Upgrade to Ultimate to get all features, including: ` ,
2021-06-14 11:09:48 -04:00
) ,
bodyListItems : [
2021-07-26 08:10:08 -04:00
s _ _ ( 'SecurityConfiguration|Vulnerability details and statistics in the merge request' ) ,
s _ _ ( 'SecurityConfiguration|High-level vulnerability statistics across projects and groups' ) ,
s _ _ ( 'SecurityConfiguration|Runtime security metrics for application environments' ) ,
s _ _ (
'SecurityConfiguration|More scan types, including Container Scanning, DAST, Dependency Scanning, Fuzzing, and Licence Compliance' ,
) ,
2021-06-14 11:09:48 -04:00
] ,
buttonText : s _ _ ( 'SecurityConfiguration|Upgrade or start a free trial' ) ,
} ,
2022-01-26 16:16:58 -05:00
mounted ( ) {
this . track ( 'display_banner' , { label : SECURITY _UPGRADE _BANNER } ) ;
} ,
methods : {
bannerClosed ( ) {
this . track ( 'dismiss_banner' , { label : SECURITY _UPGRADE _BANNER } ) ;
} ,
bannerButtonClicked ( ) {
this . track ( 'click_button' , { label : UPGRADE _OR _FREE _TRIAL } ) ;
} ,
} ,
2021-06-14 11:09:48 -04:00
} ;
< / script >
< template >
< gl-banner
: title = "$options.i18n.title"
: button - text = "$options.i18n.buttonText"
: button - link = "upgradePath"
2021-07-26 08:10:08 -04:00
variant = "introduction"
2022-01-26 16:16:58 -05:00
@ close = "bannerClosed"
@ primary = "bannerButtonClicked"
2021-06-14 11:09:48 -04:00
v - on = "$listeners"
>
< p > { { $options . i18n . bodyStart } } < / p >
2021-07-26 08:10:08 -04:00
< ul class = "gl-pl-6" >
2021-06-14 11:09:48 -04:00
< li v-for ="bodyListItem in $options.i18n.bodyListItems" :key ="bodyListItem" >
{ { bodyListItem } }
< / li >
< / ul >
< / gl-banner >
< / template >