Welcome to mirror list, hosted at ThFree Co, Russian Federation.

diff_inline_findings_item.vue « components « diffs « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8a30d6ee7f84fa8a22ae12535890968bbb9ded61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<script>
import { GlIcon } from '@gitlab/ui';
import { getSeverity } from '~/ci/reports/utils';

export default {
  components: { GlIcon },

  props: {
    finding: {
      type: Object,
      required: true,
    },
  },
  computed: {
    enhancedFinding() {
      return getSeverity(this.finding);
    },
    listText() {
      return `${this.finding.severity} - ${this.finding.description}`;
    },
  },
};
</script>

<template>
  <li class="gl-py-1 gl-font-regular gl-display-flex">
    <span class="gl-mr-3">
      <gl-icon
        :size="12"
        :name="enhancedFinding.name"
        :class="enhancedFinding.class"
        class="inline-findings-severity-icon"
      />
    </span>
    <span data-testid="description-plain-text" class="gl-display-flex">
      {{ listText }}
    </span>
  </li>
</template>