gitlab-org--gitlab-foss/app/assets/javascripts/ci/pipeline_schedules/components/table/cells/pipeline_schedule_next_run.vue

33 lines
642 B
Vue

<script>
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
export default {
components: {
TimeAgoTooltip,
},
props: {
schedule: {
type: Object,
required: true,
},
},
computed: {
showTimeAgo() {
return this.schedule.active && this.schedule.nextRunAt;
},
realNextRunTime() {
return this.schedule.realNextRun;
},
},
};
</script>
<template>
<div>
<time-ago-tooltip v-if="showTimeAgo" :time="realNextRunTime" />
<span v-else data-testid="pipeline-schedule-inactive">
{{ s__('PipelineSchedules|Inactive') }}
</span>
</div>
</template>