debian-mirror-gitlab/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue

55 lines
1.1 KiB
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
import tooltip from '../../vue_shared/directives/tooltip';
2018-03-17 18:26:18 +05:30
import icon from '../../vue_shared/components/icon.vue';
2017-09-10 17:25:29 +05:30
export default {
2018-03-17 18:26:18 +05:30
directives: {
tooltip,
},
components: {
icon,
},
2017-09-10 17:25:29 +05:30
props: {
artifacts: {
type: Array,
required: true,
},
},
};
</script>
<template>
<div
class="btn-group"
2018-03-17 18:26:18 +05:30
role="group"
>
2017-09-10 17:25:29 +05:30
<button
v-tooltip
class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download"
title="Artifacts"
data-placement="top"
data-toggle="dropdown"
2018-03-17 18:26:18 +05:30
aria-label="Artifacts"
>
<icon name="download" />
2017-09-10 17:25:29 +05:30
<i
class="fa fa-caret-down"
2018-03-17 18:26:18 +05:30
aria-hidden="true"
>
2017-09-10 17:25:29 +05:30
</i>
</button>
<ul class="dropdown-menu dropdown-menu-align-right">
2018-03-17 18:26:18 +05:30
<li
v-for="(artifact, i) in artifacts"
:key="i">
2017-09-10 17:25:29 +05:30
<a
rel="nofollow"
download
2018-03-17 18:26:18 +05:30
:href="artifact.path"
>
Download {{ artifact.name }} artifacts
2017-09-10 17:25:29 +05:30
</a>
</li>
</ul>
</div>
</template>