gitlab-org--gitlab-foss/app/assets/javascripts/pipelines/components/nav_controls.vue
Dmitriy Zaporozhets 7f8a520f8a Unite green buttons under one css class
Rename btn-new, btn-create and btn-save to btn-success

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-09-19 13:55:48 +03:00

67 lines
1.3 KiB
Vue

<script>
import LoadingButton from '../../vue_shared/components/loading_button.vue';
export default {
name: 'PipelineNavControls',
components: {
LoadingButton,
},
props: {
newPipelinePath: {
type: String,
required: false,
default: null,
},
resetCachePath: {
type: String,
required: false,
default: null,
},
ciLintPath: {
type: String,
required: false,
default: null,
},
isResetCacheButtonLoading: {
type: Boolean,
required: false,
default: false,
},
},
methods: {
onClickResetCache() {
this.$emit('resetRunnersCache', this.resetCachePath);
},
},
};
</script>
<template>
<div class="nav-controls">
<a
v-if="newPipelinePath"
:href="newPipelinePath"
class="btn btn-success js-run-pipeline"
>
{{ s__('Pipelines|Run Pipeline') }}
</a>
<loading-button
v-if="resetCachePath"
:loading="isResetCacheButtonLoading"
:label="s__('Pipelines|Clear Runner Caches')"
class="btn btn-default js-clear-cache"
@click="onClickResetCache"
/>
<a
v-if="ciLintPath"
:href="ciLintPath"
class="btn btn-default js-ci-lint"
>
{{ s__('Pipelines|CI Lint') }}
</a>
</div>
</template>