2018-11-20 20:47:30 +05:30
|
|
|
<script>
|
2018-12-13 13:39:08 +05:30
|
|
|
import { GlLink } from '@gitlab-org/gitlab-ui';
|
|
|
|
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
|
|
|
import timeagoMixin from '~/vue_shared/mixins/timeago';
|
2018-11-20 20:47:30 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
TimeagoTooltip,
|
|
|
|
GlLink,
|
|
|
|
},
|
|
|
|
mixins: [timeagoMixin],
|
|
|
|
props: {
|
|
|
|
artifact: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
2018-11-20 20:47:30 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isExpired() {
|
|
|
|
return this.artifact.expired;
|
2018-12-05 23:21:45 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
// Only when the key is `false` we can render this block
|
|
|
|
willExpire() {
|
|
|
|
return this.artifact.expired === false;
|
2018-11-20 20:47:30 +05:30
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
};
|
2018-11-20 20:47:30 +05:30
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="block">
|
|
|
|
<div class="title">
|
|
|
|
{{ s__('Job|Job artifacts') }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p
|
2018-12-05 23:21:45 +05:30
|
|
|
v-if="isExpired"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-artifacts-removed build-detail-row"
|
|
|
|
>
|
|
|
|
{{ s__('Job|The artifacts were removed') }}
|
|
|
|
</p>
|
2018-12-05 23:21:45 +05:30
|
|
|
|
2018-11-20 20:47:30 +05:30
|
|
|
<p
|
2018-12-05 23:21:45 +05:30
|
|
|
v-else-if="willExpire"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-artifacts-will-be-removed build-detail-row"
|
|
|
|
>
|
2018-12-05 23:21:45 +05:30
|
|
|
{{ s__('Job|The artifacts will be removed in') }}
|
2018-11-20 20:47:30 +05:30
|
|
|
</p>
|
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
<timeago-tooltip
|
|
|
|
v-if="artifact.expire_at"
|
|
|
|
:time="artifact.expire_at"
|
2018-11-20 20:47:30 +05:30
|
|
|
/>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="btn-group d-flex"
|
|
|
|
role="group"
|
|
|
|
>
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link
|
2018-12-05 23:21:45 +05:30
|
|
|
v-if="artifact.keep_path"
|
|
|
|
:href="artifact.keep_path"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-keep-artifacts btn btn-sm btn-default"
|
|
|
|
data-method="post"
|
|
|
|
>
|
|
|
|
{{ s__('Job|Keep') }}
|
2018-12-13 13:39:08 +05:30
|
|
|
</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link
|
2018-12-05 23:21:45 +05:30
|
|
|
v-if="artifact.download_path"
|
|
|
|
:href="artifact.download_path"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-download-artifacts btn btn-sm btn-default"
|
|
|
|
download
|
|
|
|
rel="nofollow"
|
|
|
|
>
|
|
|
|
{{ s__('Job|Download') }}
|
2018-12-13 13:39:08 +05:30
|
|
|
</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link
|
2018-12-05 23:21:45 +05:30
|
|
|
v-if="artifact.browse_path"
|
|
|
|
:href="artifact.browse_path"
|
2018-11-20 20:47:30 +05:30
|
|
|
class="js-browse-artifacts btn btn-sm btn-default"
|
|
|
|
>
|
|
|
|
{{ s__('Job|Browse') }}
|
2018-12-13 13:39:08 +05:30
|
|
|
</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|