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-05-30 16:15:17 +05:30
import { GlLink, GlButton, GlTooltipDirective } from '@gitlab/ui';
2019-02-15 15:39:39 +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: {
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,
2019-05-30 16:15:17 +05:30
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">
2019-05-30 16:15:17 +05:30
<gl-button
2019-02-15 15:39:39 +05:30
v-gl-tooltip
2019-05-30 16:15:17 +05:30
class="dropdown-toggle build-artifacts js-pipeline-dropdown-download"
title="Artifacts"
2017-09-10 17:25:29 +05:30
data-toggle="dropdown"
2019-05-30 16:15:17 +05:30
aria-label="Artifacts"
2018-03-17 18:26:18 +05:30
>
2019-05-30 16:15:17 +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">
2019-05-30 16:15:17 +05:30
<gl-link :href="artifact.path" rel="nofollow" download>
Download {{ artifact.name }} artifacts
</gl-link>
2017-09-10 17:25:29 +05:30
</li>
</ul>
</div>
</template>