2018-11-18 11:00:15 +05:30
|
|
|
<script>
|
2020-01-01 13:55:28 +05:30
|
|
|
import { GlLoadingIcon } from '@gitlab/ui';
|
2018-11-18 11:00:15 +05:30
|
|
|
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,
|
2018-12-13 13:39:08 +05:30
|
|
|
GlLoadingIcon,
|
2018-11-18 11:00:15 +05:30
|
|
|
},
|
|
|
|
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>
|
2019-10-12 21:52:04 +05:30
|
|
|
<div class="report-block-list-issue report-block-list-issue-parent align-items-center">
|
2019-09-30 21:07:59 +05:30
|
|
|
<div class="report-block-list-icon append-right-default">
|
|
|
|
<gl-loading-icon
|
|
|
|
v-if="statusIcon === 'loading'"
|
|
|
|
css-class="report-block-list-loading-icon"
|
|
|
|
size="md"
|
|
|
|
/>
|
|
|
|
<ci-icon v-else :status="iconStatus" :size="24" />
|
2018-11-18 11:00:15 +05:30
|
|
|
</div>
|
|
|
|
<div class="report-block-list-issue-description">
|
2020-04-22 19:07:51 +05:30
|
|
|
<div class="report-block-list-issue-description-text">
|
|
|
|
{{ summary
|
|
|
|
}}<span v-if="popoverOptions" class="text-nowrap"
|
|
|
|
> <popover v-if="popoverOptions" :options="popoverOptions" class="align-top" />
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-if="$slots.default"
|
|
|
|
class="text-right flex-fill d-flex justify-content-end flex-column flex-sm-row"
|
|
|
|
>
|
|
|
|
<slot></slot>
|
2018-11-18 11:00:15 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|