summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/components/stuck_block.vue
blob: 1d5789b175a0dbd229e9b5ccfb11d77b179285ff (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<script>
/**
 * Renders Stuck Runners block for job's view.
 */
export default {
  props: {
    hasNoRunnersForProject: {
      type: Boolean,
      required: true,
    },
    tags: {
      type: Array,
      required: false,
      default: () => [],
    },
    runnersPath: {
      type: String,
      required: true,
    },
  },
};
</script>
<template>
  <div class="bs-callout bs-callout-warning">
    <p
      v-if="tags.length"
      class="js-stuck-with-tags append-bottom-0"
    >
      {{ s__(`This job is stuck, because you don't have
  any active runners online with any of these tags assigned to them:`) }}
      <span
        v-for="(tag, index) in tags"
        :key="index"
        class="badge badge-primary"
      >
        {{ tag }}
      </span>
    </p>
    <p
      v-else-if="hasNoRunnersForProject"
      class="js-stuck-no-runners append-bottom-0"
    >
      {{ s__(`Job|This job is stuck, because the project
  doesn't have any runners online assigned to it.`) }}
    </p>
    <p
      v-else
      class="js-stuck-no-active-runner append-bottom-0"
    >
      {{ s__(`This job is stuck, because you don't
  have any active runners that can run this job.`) }}
    </p>

    {{ __("Go to") }}
    <a
      v-if="runnersPath"
      :href="runnersPath"
      class="js-runners-path"
    >
      {{ __("Runners page") }}
    </a>
  </div>
</template>