summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue
blob: 908b10afee6ab531d2917da141ef41be6e580aac (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
<script>
import { GlLink, GlButton, GlTooltipDirective } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';

export default {
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  components: {
    Icon,
    GlLink,
    GlButton,
  },
  props: {
    artifacts: {
      type: Array,
      required: true,
    },
  },
};
</script>
<template>
  <div class="btn-group" role="group">
    <gl-button
      v-gl-tooltip
      class="dropdown-toggle build-artifacts js-pipeline-dropdown-download"
      title="Artifacts"
      data-toggle="dropdown"
      aria-label="Artifacts"
    >
      <icon name="download" /> <i class="fa fa-caret-down" aria-hidden="true"> </i>
    </gl-button>
    <ul class="dropdown-menu dropdown-menu-right">
      <li v-for="(artifact, i) in artifacts" :key="i">
        <gl-link :href="artifact.path" rel="nofollow" download>
          Download {{ artifact.name }} artifacts
        </gl-link>
      </li>
    </ul>
  </div>
</template>