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>
2019-01-03 12:48:30 +05:30
import tooltip from '../../vue_shared/directives/tooltip';
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: {
2019-01-03 12:48:30 +05:30
tooltip,
2018-11-08 19:23:39 +05:30
},
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>
2019-01-03 12:48:30 +05:30
<div
class="btn-group"
role="group"
>
<button
v-tooltip
class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download"
2017-09-10 17:25:29 +05:30
title="Artifacts"
2019-01-03 12:48:30 +05:30
data-placement="top"
2017-09-10 17:25:29 +05:30
data-toggle="dropdown"
2018-03-17 18:26:18 +05:30
aria-label="Artifacts"
>
2019-01-03 12:48:30 +05:30
<icon name="download" />
<i
class="fa fa-caret-down"
aria-hidden="true"
>
</i>
</button>
2018-11-08 19:23:39 +05:30
<ul class="dropdown-menu dropdown-menu-right">
2019-01-03 12:48:30 +05:30
<li
v-for="(artifact, i) in artifacts"
:key="i">
<a
:href="artifact.path"
rel="nofollow"
download
>
2018-03-17 18:26:18 +05:30
Download {{ artifact.name }} artifacts
2019-01-03 12:48:30 +05:30
</a>
2017-09-10 17:25:29 +05:30
</li>
</ul>
</div>
</template>