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

67 lines
1.4 KiB
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2020-04-22 19:07:51 +05:30
import { GlDeprecatedButton } 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,
2020-04-22 19:07:51 +05:30
GlDeprecatedButton,
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">
2020-04-22 19:07:51 +05:30
<gl-deprecated-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') }}
2020-04-22 19:07:51 +05:30
</gl-deprecated-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
2020-04-22 19:07:51 +05:30
<gl-deprecated-button v-if="ciLintPath" :href="ciLintPath" class="js-ci-lint">
2018-03-27 19:54:05 +05:30
{{ s__('Pipelines|CI Lint') }}
2020-04-22 19:07:51 +05:30
</gl-deprecated-button>
2017-09-10 17:25:29 +05:30
</div>
</template>