debian-mirror-gitlab/app/assets/javascripts/diffs/components/diff_code_quality.vue

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

48 lines
1.2 KiB
Vue
Raw Normal View History

2022-08-13 15:12:31 +05:30
<script>
2023-06-20 00:43:36 +05:30
import { GlButton } from '@gitlab/ui';
2023-03-04 22:38:38 +05:30
import { NEW_CODE_QUALITY_FINDINGS } from '../i18n';
2023-06-20 00:43:36 +05:30
import DiffCodeQualityItem from './diff_code_quality_item.vue';
2022-08-13 15:12:31 +05:30
export default {
2023-03-04 22:38:38 +05:30
i18n: {
newFindings: NEW_CODE_QUALITY_FINDINGS,
},
2023-06-20 00:43:36 +05:30
components: { GlButton, DiffCodeQualityItem },
2022-08-13 15:12:31 +05:30
props: {
codeQuality: {
type: Array,
required: true,
},
},
};
</script>
<template>
2023-03-04 22:38:38 +05:30
<div
data-testid="diff-codequality"
2023-05-27 22:25:52 +05:30
class="gl-relative codequality-findings-list gl-border-top-1 gl-border-bottom-1 gl-bg-gray-10 gl-text-black-normal gl-pl-5 gl-pt-4 gl-pb-4"
2023-03-04 22:38:38 +05:30
>
<h4
data-testid="diff-codequality-findings-heading"
class="gl-mt-0 gl-mb-0 gl-font-base gl-font-regular"
2022-08-13 15:12:31 +05:30
>
2023-03-04 22:38:38 +05:30
{{ $options.i18n.newFindings }}
</h4>
<ul class="gl-list-style-none gl-mb-0 gl-p-0">
2023-06-20 00:43:36 +05:30
<diff-code-quality-item
2022-08-13 15:12:31 +05:30
v-for="finding in codeQuality"
:key="finding.description"
2023-06-20 00:43:36 +05:30
:finding="finding"
/>
2022-08-13 15:12:31 +05:30
</ul>
<gl-button
data-testid="diff-codequality-close"
category="tertiary"
size="small"
icon="close"
class="gl-absolute gl-right-2 gl-top-2"
2022-10-11 01:57:18 +05:30
@click="$emit('hideCodeQualityFindings')"
2022-08-13 15:12:31 +05:30
/>
</div>
</template>