diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-07-31 16:50:34 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-08-02 17:59:22 +0100 |
commit | bfeb7c2c3f61a6ea8f36479e7260ba97459152c9 (patch) | |
tree | 9b813c6ab41cf1456d8f306ec4b8ee19be7b0872 /app/assets/javascripts/reports/components/test_issue_body.vue | |
parent | 28c15d4f94cda8c6635d832d6bde7a131e207023 (diff) | |
download | gitlab-ce-bfeb7c2c3f61a6ea8f36479e7260ba97459152c9.tar.gz |
Adds frontend support to render test reports on theMR widget
Creates an app to render grouped test reports in the MR widget
Ports CSS from EE into CE
Creates a reusable code component
Adds getters and utils to the existing reports store
Diffstat (limited to 'app/assets/javascripts/reports/components/test_issue_body.vue')
-rw-r--r-- | app/assets/javascripts/reports/components/test_issue_body.vue | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app/assets/javascripts/reports/components/test_issue_body.vue b/app/assets/javascripts/reports/components/test_issue_body.vue new file mode 100644 index 00000000000..13b7fdf58bc --- /dev/null +++ b/app/assets/javascripts/reports/components/test_issue_body.vue @@ -0,0 +1,48 @@ +<script> + import { mapActions } from 'vuex'; + + export default { + name: 'TestIssueBody', + props: { + issue: { + type: Object, + required: true, + }, + // failed || success + status: { + type: String, + required: true, + }, + isNew: { + type: Boolean, + required: false, + default: false, + }, + }, + methods: { + ...mapActions(['openModal']), + handleIssueClick() { + const { issue, status, openModal } = this; + openModal({ issue, status }); + }, + }, + }; +</script> +<template> + <div class="report-block-list-issue-description prepend-top-5 append-bottom-5"> + <div class="report-block-list-issue-description-text"> + <button + type="button" + class="btn-link btn-blank text-left break-link vulnerability-name-button" + @click="handleIssueClick()" + > + <div + v-if="isNew" + class="badge badge-danger append-right-5" + > + {{ s__('New') }} + </div>{{ issue.name }} + </button> + </div> + </div> +</template> |