summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-08-13 09:25:35 +0000
committerPhil Hughes <me@iamphill.com>2018-08-13 09:25:35 +0000
commitf8d32eccc4c8976054d3b75a4080b145af3c4914 (patch)
tree9635582681a5719d0b1654ffc56e22efd7949f64 /app/assets
parent632d3a94124a62c4bf0af7ef762accd620738025 (diff)
parentde76dfad92bf006f322b23bdd57f7666cb63900e (diff)
downloadgitlab-ce-f8d32eccc4c8976054d3b75a4080b145af3c4914.tar.gz
Merge branch '50101-stuck-component' into 'master'
Creates vue component for warning block about stuck runners See merge request gitlab-org/gitlab-ce!21114
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/jobs/components/stuck_block.vue63
1 files changed, 63 insertions, 0 deletions
diff --git a/app/assets/javascripts/jobs/components/stuck_block.vue b/app/assets/javascripts/jobs/components/stuck_block.vue
new file mode 100644
index 00000000000..18883fea950
--- /dev/null
+++ b/app/assets/javascripts/jobs/components/stuck_block.vue
@@ -0,0 +1,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="hasNoRunnersForProject"
+ class="js-stuck-no-runners"
+ >
+ {{ s__(`Job|This job is stuck, because the project
+ doesn't have any runners online assigned to it.`) }}
+ </p>
+ <p
+ v-else-if="tags.length"
+ class="js-stuck-with-tags"
+ >
+ {{ 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
+ class="js-stuck-no-active-runner"
+ >
+ {{ 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>