2018-08-16 11:23:38 -04:00
|
|
|
<script>
|
2018-10-22 13:43:43 -04:00
|
|
|
import JobContainerItem from './job_container_item.vue';
|
2018-08-16 11:23:38 -04:00
|
|
|
|
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-08-16 11:23:38 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
jobId: {
|
|
|
|
type: Number,
|
|
|
|
required: true,
|
2018-08-16 11:23:38 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
isJobActive(currentJobId) {
|
|
|
|
return this.jobId === currentJobId;
|
2018-10-03 10:13:20 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
},
|
|
|
|
};
|
2018-08-16 11:23:38 -04:00
|
|
|
</script>
|
|
|
|
<template>
|
2018-10-03 10:13:20 -04:00
|
|
|
<div class="js-jobs-container builds-container">
|
2018-10-22 13:43:43 -04:00
|
|
|
<job-container-item
|
2018-10-03 10:13:20 -04:00
|
|
|
v-for="job in jobs"
|
|
|
|
:key="job.id"
|
2018-10-22 13:43:43 -04:00
|
|
|
:job="job"
|
|
|
|
:is-active="isJobActive(job.id)"
|
|
|
|
/>
|
2018-08-16 11:23:38 -04:00
|
|
|
</div>
|
|
|
|
</template>
|