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