gitlab-org--gitlab-foss/app/assets/javascripts/jobs/components/jobs_container.vue

36 lines
594 B
Vue
Raw Normal View History

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