item.vue 736 Bytes
Newer Older
Phil Hughes's avatar
Phil Hughes committed
1
<script>
2
import { GlButton } from '@gitlab/ui';
3
import JobDescription from './detail/description.vue';
Phil Hughes's avatar
Phil Hughes committed
4 5 6

export default {
  components: {
7
    JobDescription,
8
    GlButton,
Phil Hughes's avatar
Phil Hughes committed
9 10 11 12 13 14 15
  },
  props: {
    job: {
      type: Object,
      required: true,
    },
  },
Phil Hughes's avatar
Phil Hughes committed
16 17 18 19 20
  computed: {
    jobId() {
      return `#${this.job.id}`;
    },
  },
21 22 23 24 25
  methods: {
    clickViewLog() {
      this.$emit('clickViewLog', this.job);
    },
  },
Phil Hughes's avatar
Phil Hughes committed
26 27 28 29
};
</script>

<template>
Phil Hughes's avatar
Phil Hughes committed
30
  <div class="ide-job-item">
31
    <job-description :job="job" class="gl-mr-3" />
Phil Hughes's avatar
Phil Hughes committed
32
    <div class="ml-auto align-self-center">
33
      <gl-button v-if="job.started" category="secondary" size="small" @click="clickViewLog">
Phil Hughes's avatar
Phil Hughes committed
34
        {{ __('View log') }}
35
      </gl-button>
Phil Hughes's avatar
Phil Hughes committed
36
    </div>
Phil Hughes's avatar
Phil Hughes committed
37 38
  </div>
</template>