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

67 lines
1.3 KiB
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2020-03-09 13:42:32 +05:30
import { GlButton } from '@gitlab/ui';
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,
2019-02-15 15:39:39 +05:30
GlButton,
2018-11-08 19:23:39 +05:30
},
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-02-15 15:39:39 +05:30
<gl-button
2018-03-27 19:54:05 +05:30
v-if="newPipelinePath"
2017-09-10 17:25:29 +05:30
:href="newPipelinePath"
2019-02-15 15:39:39 +05:30
variant="success"
class="js-run-pipeline"
2018-03-27 19:54:05 +05:30
>
{{ s__('Pipelines|Run Pipeline') }}
2019-02-15 15:39:39 +05:30
</gl-button>
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-02-15 15:39:39 +05:30
class="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-02-15 15:39:39 +05:30
<gl-button v-if="ciLintPath" :href="ciLintPath" class="js-ci-lint">
2018-03-27 19:54:05 +05:30
{{ s__('Pipelines|CI Lint') }}
2019-02-15 15:39:39 +05:30
</gl-button>
2017-09-10 17:25:29 +05:30
</div>
</template>