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

report_item.vue « components « reports « ci « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97d4ac7bf6f27b11d80b3e94f920769e21ac2f47 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<script>
import {
  components,
  componentNames,
  iconComponents,
  iconComponentNames,
} from 'ee_else_ce/ci/reports/components/issue_body';

export default {
  name: 'ReportItem',
  components: {
    ...components,
    ...iconComponents,
  },
  props: {
    issue: {
      type: Object,
      required: true,
    },
    component: {
      type: String,
      required: false,
      default: '',
      validator: (value) => value === '' || Object.values(componentNames).includes(value),
    },
    iconComponent: {
      type: String,
      required: false,
      default: iconComponentNames.IssueStatusIcon,
      validator: (value) => Object.values(iconComponentNames).includes(value),
    },
    // failed || success
    status: {
      type: String,
      required: true,
    },
    statusIconSize: {
      type: Number,
      required: false,
      default: 24,
    },
    isNew: {
      type: Boolean,
      required: false,
      default: false,
    },
    showReportSectionStatusIcon: {
      type: Boolean,
      required: false,
      default: true,
    },
  },
};
</script>
<template>
  <li class="report-block-list-issue align-items-center" data-qa-selector="report_item_row">
    <component
      :is="iconComponent"
      v-if="showReportSectionStatusIcon"
      :status="status"
      :status-icon-size="statusIconSize"
      class="gl-mr-2"
    />

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