diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-07-19 12:37:22 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-07-19 12:37:22 +0900 |
commit | 7ade498101d02573b20a2405ebe0bdb8efd8aa3b (patch) | |
tree | 6624be9396753ab4d55643f748348a8f75bcc832 /app/assets/javascripts/vue_shared/components/reports/summary_row.vue | |
parent | e7be6b2b3624ba44d56143084731cb9a6168f974 (diff) | |
parent | 98eccfc44c597ba14939659ca3b9150197129961 (diff) | |
download | gitlab-ce-7ade498101d02573b20a2405ebe0bdb8efd8aa3b.tar.gz |
Merge branch 'master-ce' into artifact-format-v2
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/reports/summary_row.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/reports/summary_row.vue | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/reports/summary_row.vue b/app/assets/javascripts/vue_shared/components/reports/summary_row.vue new file mode 100644 index 00000000000..997bad960e2 --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/reports/summary_row.vue @@ -0,0 +1,66 @@ +<script> +import CiIcon from '~/vue_shared/components/ci_icon.vue'; +import LoadingIcon from '~/vue_shared/components/loading_icon.vue'; +import Popover from './help_popover.vue'; + +/** + * 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, + LoadingIcon, + Popover, + }, + props: { + summary: { + type: String, + required: true, + }, + statusIcon: { + type: String, + required: true, + }, + popoverOptions: { + type: Object, + required: true, + }, + }, + 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"> + <loading-icon + 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 :options="popoverOptions" /> + </div> + </div> +</template> |