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

57 lines
1.4 KiB
Vue
Raw Normal View History

2018-11-20 20:47:30 +05:30
<script>
2019-02-15 15:39:39 +05:30
import { GlLink } from '@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">
2020-06-23 00:09:42 +05:30
<p v-if="tags.length" class="js-stuck-with-tags gl-mb-0">
2019-02-15 15:39:39 +05:30
{{
s__(`This job is stuck because you don't have
2020-06-23 00:09:42 +05:30
any active runners online or available with any of these tags assigned to them:`)
2019-02-15 15:39:39 +05:30
}}
2020-07-28 23:09:34 +05:30
<span v-for="(tag, index) in tags" :key="index" class="badge badge-primary gl-mr-2">
2018-11-20 20:47:30 +05:30
{{ tag }}
</span>
</p>
2020-06-23 00:09:42 +05:30
<p v-else-if="hasNoRunnersForProject" class="js-stuck-no-runners gl-mb-0">
2019-02-15 15:39:39 +05:30
{{
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>
2020-06-23 00:09:42 +05:30
<p v-else class="js-stuck-no-active-runner gl-mb-0">
2019-02-15 15:39:39 +05:30
{{
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>
2020-06-23 00:09:42 +05:30
{{ __('Go to project') }}
2019-02-15 15:39:39 +05:30
<gl-link v-if="runnersPath" :href="runnersPath" class="js-runners-path">
2020-06-23 00:09:42 +05:30
{{ __('CI settings') }}
2018-12-13 13:39:08 +05:30
</gl-link>
2018-11-20 20:47:30 +05:30
</div>
</template>