debian-mirror-gitlab/app/assets/javascripts/security_configuration/components/upgrade_banner.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
2 KiB
Vue
Raw Normal View History

2021-09-04 01:27:46 +05:30
<script>
import { GlBanner } from '@gitlab/ui';
import { s__ } from '~/locale';
2022-04-04 11:22:00 +05:30
import Tracking from '~/tracking';
export const SECURITY_UPGRADE_BANNER = 'security_upgrade_banner';
export const UPGRADE_OR_FREE_TRIAL = 'upgrade_or_free_trial';
2021-09-04 01:27:46 +05:30
export default {
components: {
GlBanner,
},
2022-04-04 11:22:00 +05:30
mixins: [Tracking.mixin({ property: SECURITY_UPGRADE_BANNER })],
2021-09-04 01:27:46 +05:30
inject: ['upgradePath'],
i18n: {
2021-10-27 15:23:28 +05:30
title: s__('SecurityConfiguration|Secure your project'),
2021-09-04 01:27:46 +05:30
bodyStart: s__(
2021-10-27 15:23:28 +05:30
`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-09-04 01:27:46 +05:30
),
bodyListItems: [
2021-10-27 15:23:28 +05:30
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-09-04 01:27:46 +05:30
],
buttonText: s__('SecurityConfiguration|Upgrade or start a free trial'),
},
2022-04-04 11:22:00 +05:30
mounted() {
this.track('render', { 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-09-04 01:27:46 +05:30
};
</script>
<template>
<gl-banner
:title="$options.i18n.title"
:button-text="$options.i18n.buttonText"
:button-link="upgradePath"
2021-10-27 15:23:28 +05:30
variant="introduction"
2022-04-04 11:22:00 +05:30
@close="bannerClosed"
@primary="bannerButtonClicked"
2021-09-04 01:27:46 +05:30
v-on="$listeners"
>
<p>{{ $options.i18n.bodyStart }}</p>
2021-10-27 15:23:28 +05:30
<ul class="gl-pl-6">
2021-09-04 01:27:46 +05:30
<li v-for="bodyListItem in $options.i18n.bodyListItems" :key="bodyListItem">
{{ bodyListItem }}
</li>
</ul>
</gl-banner>
</template>