summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/components/jobs/item.vue
blob: f84315b63d2fbc3304b7d02446d8fc230e3378ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<script>
import { GlButton } from '@gitlab/ui';
import JobDescription from './detail/description.vue';

export default {
  components: {
    JobDescription,
    GlButton,
  },
  props: {
    job: {
      type: Object,
      required: true,
    },
  },
  computed: {
    jobId() {
      return `#${this.job.id}`;
    },
  },
  methods: {
    clickViewLog() {
      this.$emit('clickViewLog', this.job);
    },
  },
};
</script>

<template>
  <div class="ide-job-item">
    <job-description :job="job" class="gl-mr-3" />
    <div class="ml-auto align-self-center">
      <gl-button v-if="job.started" category="secondary" size="small" @click="clickViewLog">
        {{ __('View log') }}
      </gl-button>
    </div>
  </div>
</template>