debian-mirror-gitlab/app/assets/javascripts/jobs/components/stuck_block.vue

68 lines
1.4 KiB
Vue
Raw Normal View History

2018-11-20 20:47:30 +05:30
<script>
2019-01-03 12:48:30 +05:30
import { GlLink } from '@gitlab-org/gitlab-ui';
2018-11-20 20:47:30 +05:30
/**
* Renders Stuck Runners block for job's view.
*/
export default {
2018-12-13 13:39:08 +05:30
components: {
GlLink,
},
2018-11-20 20:47:30 +05:30
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">
2019-01-03 12:48:30 +05:30
<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"
>
2018-11-20 20:47:30 +05:30
{{ tag }}
</span>
</p>
2019-01-03 12:48:30 +05:30
<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.`) }}
2018-12-13 13:39:08 +05:30
</p>
2019-01-03 12:48:30 +05:30
<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.`) }}
2018-11-20 20:47:30 +05:30
</p>
2019-01-03 12:48:30 +05:30
{{ __("Go to") }}
<gl-link
v-if="runnersPath"
:href="runnersPath"
class="js-runners-path"
>
{{ __("Runners page") }}
2018-12-13 13:39:08 +05:30
</gl-link>
2018-11-20 20:47:30 +05:30
</div>
</template>