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

55 lines
1 KiB
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2018-11-08 19:23:39 +05:30
import tooltip from '../../vue_shared/directives/tooltip';
2018-12-13 13:39:08 +05:30
import Icon from '../../vue_shared/components/icon.vue';
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
export default {
directives: {
tooltip,
},
components: {
2018-12-13 13:39:08 +05:30
Icon,
2018-11-08 19:23:39 +05:30
},
props: {
artifacts: {
type: Array,
required: true,
2018-03-17 18:26:18 +05:30
},
2018-11-08 19:23:39 +05:30
},
};
2017-09-10 17:25:29 +05:30
</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>
2018-11-08 19:23:39 +05:30
<ul class="dropdown-menu dropdown-menu-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
2018-11-08 19:23:39 +05:30
:href="artifact.path"
2017-09-10 17:25:29 +05:30
rel="nofollow"
download
2018-03-17 18:26:18 +05:30
>
Download {{ artifact.name }} artifacts
2017-09-10 17:25:29 +05:30
</a>
</li>
</ul>
</div>
</template>