Commit d61a27d5 authored by Phil Hughes's avatar Phil Hughes

added job item component

parent 76ffde63
<script>
import CiIcon from '../../../vue_shared/components/ci_icon.vue';
export default {
components: {
CiIcon,
},
props: {
job: {
type: Object,
required: true,
},
},
};
</script>
<template>
<div>
<ci-icon :status="job.status" />
{{ job.name }}
<a
:href="job.build_path"
target="_blank"
>#{{ job.id }}</a>
</div>
</template>
...@@ -3,12 +3,14 @@ import { mapActions } from 'vuex'; ...@@ -3,12 +3,14 @@ import { mapActions } from 'vuex';
import Icon from '../../../vue_shared/components/icon.vue'; import Icon from '../../../vue_shared/components/icon.vue';
import CiIcon from '../../../vue_shared/components/ci_icon.vue'; import CiIcon from '../../../vue_shared/components/ci_icon.vue';
import LoadingIcon from '../../../vue_shared/components/loading_icon.vue'; import LoadingIcon from '../../../vue_shared/components/loading_icon.vue';
import Item from './item.vue';
export default { export default {
components: { components: {
Icon, Icon,
CiIcon, CiIcon,
LoadingIcon, LoadingIcon,
Item,
}, },
props: { props: {
stage: { stage: {
...@@ -62,17 +64,11 @@ export default { ...@@ -62,17 +64,11 @@ export default {
v-if="stage.isLoading && !stage.jobs.length" v-if="stage.isLoading && !stage.jobs.length"
/> />
<template v-else> <template v-else>
<div <item
v-for="job in stage.jobs" v-for="job in stage.jobs"
:key="job.id" :key="job.id"
> :job="job"
<ci-icon :status="job.status" /> />
{{ job.name }}
<a
:href="job.build_path"
target="_blank"
>#{{ job.id }}</a>
</div>
</template> </template>
</div> </div>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment