Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipelines/components/pipelines_list/nav_controls.vue')
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/nav_controls.vue66
1 files changed, 66 insertions, 0 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/nav_controls.vue b/app/assets/javascripts/pipelines/components/pipelines_list/nav_controls.vue
new file mode 100644
index 00000000000..a66bbb7e5ba
--- /dev/null
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/nav_controls.vue
@@ -0,0 +1,66 @@
+<script>
+import { GlDeprecatedButton } from '@gitlab/ui';
+import LoadingButton from '~/vue_shared/components/loading_button.vue';
+
+export default {
+ name: 'PipelineNavControls',
+ components: {
+ LoadingButton,
+ GlDeprecatedButton,
+ },
+ 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">
+ <gl-deprecated-button
+ v-if="newPipelinePath"
+ :href="newPipelinePath"
+ variant="success"
+ class="js-run-pipeline"
+ >
+ {{ s__('Pipelines|Run Pipeline') }}
+ </gl-deprecated-button>
+
+ <loading-button
+ v-if="resetCachePath"
+ :loading="isResetCacheButtonLoading"
+ :label="s__('Pipelines|Clear Runner Caches')"
+ class="js-clear-cache"
+ @click="onClickResetCache"
+ />
+
+ <gl-deprecated-button v-if="ciLintPath" :href="ciLintPath" class="js-ci-lint">
+ {{ s__('Pipelines|CI Lint') }}
+ </gl-deprecated-button>
+ </div>
+</template>