debian-mirror-gitlab/app/assets/javascripts/reports/components/summary_row.vue

70 lines
1.4 KiB
Vue
Raw Normal View History

2018-11-18 11:00:15 +05:30
<script>
import CiIcon from '~/vue_shared/components/ci_icon.vue';
2018-11-20 20:47:30 +05:30
import Popover from '~/vue_shared/components/help_popover.vue';
2018-11-18 11:00:15 +05:30
/**
* Renders the summary row for each report
*
* Used both in MR widget and Pipeline's view for:
* - Unit tests reports
* - Security reports
*/
export default {
name: 'ReportSummaryRow',
components: {
CiIcon,
Popover,
},
props: {
summary: {
type: String,
required: true,
},
statusIcon: {
type: String,
required: true,
},
popoverOptions: {
type: Object,
required: false,
default: null,
},
},
computed: {
iconStatus() {
return {
group: this.statusIcon,
icon: `status_${this.statusIcon}`,
};
},
},
};
</script>
<template>
<div class="report-block-list-issue report-block-list-issue-parent">
<div class="report-block-list-icon append-right-10 prepend-left-5">
2018-12-05 23:21:45 +05:30
<gl-loading-icon
2018-11-18 11:00:15 +05:30
v-if="statusIcon === 'loading'"
css-class="report-block-list-loading-icon"
/>
<ci-icon
v-else
:status="iconStatus"
/>
</div>
<div class="report-block-list-issue-description">
<div class="report-block-list-issue-description-text">
{{ summary }}
</div>
<popover
v-if="popoverOptions"
:options="popoverOptions"
/>
</div>
</div>
</template>