debian-mirror-gitlab/app/assets/javascripts/jobs/components/jobs_container.vue
2018-12-13 13:39:08 +05:30

35 lines
594 B
Vue

<script>
import JobContainerItem from './job_container_item.vue';
export default {
components: {
JobContainerItem,
},
props: {
jobs: {
type: Array,
required: true,
},
jobId: {
type: Number,
required: true,
},
},
methods: {
isJobActive(currentJobId) {
return this.jobId === currentJobId;
},
},
};
</script>
<template>
<div class="js-jobs-container builds-container">
<job-container-item
v-for="job in jobs"
:key="job.id"
:job="job"
:is-active="isJobActive(job.id)"
/>
</div>
</template>