summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue
blob: 1b9e0f917a4436cb295997551fbea862c5e13e71 (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
43
44
45
46
47
48
49
50
51
52
53
54
<script>
  import tooltip from '../../vue_shared/directives/tooltip';
  import icon from '../../vue_shared/components/icon.vue';

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