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

report_item.vue « components « reports « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 01e6d357a21e58d676c5ea232d376a4137eb81fa (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<script>
import IssueStatusIcon from '~/reports/components/issue_status_icon.vue';
import { components, componentNames } from '~/reports/components/issue_body';

export default {
  name: 'ReportItem',
  components: {
    IssueStatusIcon,
    ...components,
  },
  props: {
    issue: {
      type: Object,
      required: true,
    },
    component: {
      type: String,
      required: false,
      default: '',
      validator: value => value === '' || Object.values(componentNames).includes(value),
    },
    // failed || success
    status: {
      type: String,
      required: true,
    },
    isNew: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
};
</script>
<template>
  <li
    :class="{ 'is-dismissed': issue.isDismissed }"
    class="report-block-list-issue"
  >
    <issue-status-icon
      :status="status"
      class="append-right-5"
    />

    <component
      :is="component"
      v-if="component"
      :issue="issue"
      :status="status"
      :is-new="isNew"
    />
  </li>
</template>