summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/reports/components/report_item.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/reports/components/report_item.vue')
-rw-r--r--app/assets/javascripts/reports/components/report_item.vue53
1 files changed, 53 insertions, 0 deletions
diff --git a/app/assets/javascripts/reports/components/report_item.vue b/app/assets/javascripts/reports/components/report_item.vue
new file mode 100644
index 00000000000..01e6d357a21
--- /dev/null
+++ b/app/assets/javascripts/reports/components/report_item.vue
@@ -0,0 +1,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>