debian-mirror-gitlab/app/assets/javascripts/pipelines/components/nav_controls.vue

68 lines
1.3 KiB
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2018-05-09 12:01:36 +05:30
import LoadingButton from '../../vue_shared/components/loading_button.vue';
2018-03-27 19:54:05 +05:30
export default {
name: 'PipelineNavControls',
2018-05-09 12:01:36 +05:30
components: {
LoadingButton,
},
2018-03-27 19:54:05 +05:30
props: {
newPipelinePath: {
type: String,
required: false,
default: null,
},
resetCachePath: {
type: String,
required: false,
default: null,
},
ciLintPath: {
type: String,
required: false,
default: null,
},
2018-05-09 12:01:36 +05:30
isResetCacheButtonLoading: {
type: Boolean,
required: false,
default: false,
},
},
methods: {
onClickResetCache() {
this.$emit('resetRunnersCache', this.resetCachePath);
},
2017-09-10 17:25:29 +05:30
},
2018-03-27 19:54:05 +05:30
};
2017-09-10 17:25:29 +05:30
</script>
<template>
<div class="nav-controls">
<a
2018-03-27 19:54:05 +05:30
v-if="newPipelinePath"
2017-09-10 17:25:29 +05:30
:href="newPipelinePath"
2018-03-27 19:54:05 +05:30
class="btn btn-create js-run-pipeline"
>
{{ s__('Pipelines|Run Pipeline') }}
2017-09-10 17:25:29 +05:30
</a>
2018-05-09 12:01:36 +05:30
<loading-button
2018-03-27 19:54:05 +05:30
v-if="resetCachePath"
2018-05-09 12:01:36 +05:30
@click="onClickResetCache"
:loading="isResetCacheButtonLoading"
2018-03-27 19:54:05 +05:30
class="btn btn-default js-clear-cache"
2018-05-09 12:01:36 +05:30
:label="s__('Pipelines|Clear Runner Caches')"
/>
2018-03-17 18:26:18 +05:30
2017-09-10 17:25:29 +05:30
<a
2018-03-27 19:54:05 +05:30
v-if="ciLintPath"
2017-09-10 17:25:29 +05:30
:href="ciLintPath"
2018-03-27 19:54:05 +05:30
class="btn btn-default js-ci-lint"
>
{{ s__('Pipelines|CI Lint') }}
2017-09-10 17:25:29 +05:30
</a>
</div>
</template>