summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/reports/components/report_link.vue
blob: e32e1ac49ca339d4662a868f8c5231ec6083c306 (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
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
export default {
  name: 'ReportIssueLink',
  props: {
    issue: {
      type: Object,
      required: true,
    },
  },
};
</script>
<template>
  <div class="report-block-list-issue-description-link">
    in

    <a
      v-if="issue.urlPath"
      :href="issue.urlPath"
      target="_blank"
      rel="noopener noreferrer nofollow"
      class="break-link"
    >
      {{ issue.path
      }}<template v-if="issue.line"
        >:{{ issue.line }}</template
      >
    </a>
    <template v-else>
      {{ issue.path
      }}<template v-if="issue.line"
        >:{{ issue.line }}</template
      >
    </template>
  </div>
</template>