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

42 lines
984 B
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2019-02-15 15:39:39 +05:30
import { GlLink, GlButton, GlTooltipDirective } from '@gitlab/ui';
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-02-15 15:39:39 +05:30
GlTooltip: GlTooltipDirective,
2018-11-08 19:23:39 +05:30
},
components: {
2018-12-13 13:39:08 +05:30
Icon,
2019-02-15 15:39:39 +05:30
GlLink,
GlButton,
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-02-15 15:39:39 +05:30
<div class="btn-group" role="group">
<gl-button
v-gl-tooltip
class="dropdown-toggle build-artifacts js-pipeline-dropdown-download"
2017-09-10 17:25:29 +05:30
title="Artifacts"
data-toggle="dropdown"
2018-03-17 18:26:18 +05:30
aria-label="Artifacts"
>
2019-02-15 15:39:39 +05:30
<icon name="download" /> <i class="fa fa-caret-down" aria-hidden="true"> </i>
</gl-button>
2018-11-08 19:23:39 +05:30
<ul class="dropdown-menu dropdown-menu-right">
2019-02-15 15:39:39 +05:30
<li v-for="(artifact, i) in artifacts" :key="i">
<gl-link :href="artifact.path" rel="nofollow" download>
2018-03-17 18:26:18 +05:30
Download {{ artifact.name }} artifacts
2019-02-15 15:39:39 +05:30
</gl-link>
2017-09-10 17:25:29 +05:30
</li>
</ul>
</div>
</template>