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/tokens/pipeline_source_token.vue')
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_source_token.vue71
1 files changed, 6 insertions, 65 deletions
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_source_token.vue b/app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_source_token.vue
index 71efa8b2ab4..9643ddfbd21 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_source_token.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/tokens/pipeline_source_token.vue
@@ -1,8 +1,9 @@
<script>
import { GlFilteredSearchToken, GlFilteredSearchSuggestion } from '@gitlab/ui';
-import { s__ } from '~/locale';
+import { PIPELINE_SOURCES } from 'ee_else_ce/pipelines/components/pipelines_list/tokens/constants';
export default {
+ PIPELINE_SOURCES,
components: {
GlFilteredSearchToken,
GlFilteredSearchSuggestion,
@@ -18,68 +19,8 @@ export default {
},
},
computed: {
- sources() {
- return [
- {
- text: s__('Pipeline|Source|Push'),
- value: 'push',
- },
- {
- text: s__('Pipeline|Source|Web'),
- value: 'web',
- },
- {
- text: s__('Pipeline|Source|Trigger'),
- value: 'trigger',
- },
- {
- text: s__('Pipeline|Source|Schedule'),
- value: 'schedule',
- },
- {
- text: s__('Pipeline|Source|API'),
- value: 'api',
- },
- {
- text: s__('Pipeline|Source|External'),
- value: 'external',
- },
- {
- text: s__('Pipeline|Source|Pipeline'),
- value: 'pipeline',
- },
- {
- text: s__('Pipeline|Source|Chat'),
- value: 'chat',
- },
- {
- text: s__('Pipeline|Source|Web IDE'),
- value: 'webide',
- },
- {
- text: s__('Pipeline|Source|Merge Request'),
- value: 'merge_request_event',
- },
- {
- text: s__('Pipeline|Source|External Pull Request'),
- value: 'external_pull_request_event',
- },
- {
- text: s__('Pipeline|Source|Parent Pipeline'),
- value: 'parent_pipeline',
- },
- {
- text: s__('Pipeline|Source|On-Demand DAST Scan'),
- value: 'ondemand_dast_scan',
- },
- {
- text: s__('Pipeline|Source|On-Demand DAST Validation'),
- value: 'ondemand_dast_validation',
- },
- ];
- },
- findActiveSource() {
- return this.sources.find((source) => source.value === this.value.data);
+ activeSource() {
+ return PIPELINE_SOURCES.find((source) => source.value === this.value.data);
},
},
};
@@ -89,13 +30,13 @@ export default {
<gl-filtered-search-token v-bind="{ ...$props, ...$attrs }" v-on="$listeners">
<template #view>
<div class="gl-display-flex gl-align-items-center">
- <span>{{ findActiveSource.text }}</span>
+ <span>{{ activeSource.text }}</span>
</div>
</template>
<template #suggestions>
<gl-filtered-search-suggestion
- v-for="source in sources"
+ v-for="source in $options.PIPELINE_SOURCES"
:key="source.value"
:value="source.value"
>