summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/reports/components/test_issue_body.vue
blob: 0b01bee45575eaf10c7589c7a2c42aa77710184e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script>
  import { mapActions } from 'vuex';

  export default {
    props: {
      issue: {
        type: Object,
        required: true,
      },
      // failed || success
      status: {
        type: String,
        required: true,
      },
    },
    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">
      <!-- TODO_SAM: I've duplicated this from modal_open_name,
      because it's expecting a title and we have name
      Not sure if it's worth refactring now, or if it's ok
      to leave it duplciated and fix it when we move the components around
       -->
      <button
        type="button"
        class="btn-link btn-blank text-left break-link vulnerability-name-button"
        @click="handleIssueClick()"
      >
        {{ issue.name }}
      </button>
    </div>
  </div>
</template>