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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 09:11:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 09:11:22 +0300
commit13ad005a25f163520ff94b90cdd53495c5a0b5c4 (patch)
tree5b2fb4262633c200a8e701de2d1fa97105641ed2 /app/assets/javascripts/pages
parent9a61b4604efea1c8e57f4c90addbc94ecbe874de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r--app/assets/javascripts/pages/projects/pipeline_schedules/index/index.js26
-rw-r--r--app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue32
-rw-r--r--app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue62
3 files changed, 14 insertions, 106 deletions
diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/index/index.js b/app/assets/javascripts/pages/projects/pipeline_schedules/index/index.js
index ec183edda53..0eff9110412 100644
--- a/app/assets/javascripts/pages/projects/pipeline_schedules/index/index.js
+++ b/app/assets/javascripts/pages/projects/pipeline_schedules/index/index.js
@@ -1,29 +1,3 @@
-import Vue from 'vue';
import initPipelineSchedulesApp from '~/ci/pipeline_schedules/mount_pipeline_schedules_app';
-import PipelineSchedulesCallout from '../shared/components/pipeline_schedules_callout.vue';
-
-function initPipelineSchedulesCallout() {
- const el = document.getElementById('pipeline-schedules-callout');
-
- if (!el) {
- return;
- }
-
- const { docsUrl, illustrationUrl } = el.dataset;
-
- // eslint-disable-next-line no-new
- new Vue({
- el,
- name: 'PipelineSchedulesCalloutRoot',
- provide: {
- docsUrl,
- illustrationUrl,
- },
- render(createElement) {
- return createElement(PipelineSchedulesCallout);
- },
- });
-}
initPipelineSchedulesApp();
-initPipelineSchedulesCallout();
diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
index 642fd56eab1..9c4582ece21 100644
--- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
+++ b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue
@@ -1,12 +1,5 @@
<script>
-import {
- GlFormRadio,
- GlFormRadioGroup,
- GlIcon,
- GlLink,
- GlSprintf,
- GlTooltipDirective,
-} from '@gitlab/ui';
+import { GlFormRadio, GlFormRadioGroup, GlIcon, GlLink, GlTooltipDirective } from '@gitlab/ui';
import { getWeekdayNames } from '~/lib/utils/datetime_utility';
import { __, s__, sprintf } from '~/locale';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
@@ -23,7 +16,6 @@ export default {
GlFormRadioGroup,
GlIcon,
GlLink,
- GlSprintf,
},
directives: {
GlTooltip: GlTooltipDirective,
@@ -97,8 +89,7 @@ export default {
},
{
value: KEY_CUSTOM,
- text: s__('PipelineScheduleIntervalPattern|Custom (%{linkStart}Learn more%{linkEnd}.)'),
- link: this.cronSyntaxUrl,
+ text: s__('PipelineScheduleIntervalPattern|Custom'),
},
];
},
@@ -155,6 +146,10 @@ export default {
return value === KEY_CUSTOM && this.dailyLimit;
},
},
+ i18n: {
+ learnCronSyntax: s__('PipelineScheduleIntervalPattern|Set a custom interval with Cron syntax.'),
+ cronSyntaxLink: s__('PipelineScheduleIntervalPattern|What is Cron syntax?'),
+ },
};
</script>
@@ -167,19 +162,14 @@ export default {
:value="option.value"
:data-testid="option.value"
>
- <gl-sprintf v-if="option.link" :message="option.text">
- <template #link="{ content }">
- <gl-link :href="option.link" target="_blank" class="gl-font-sm">{{ content }}</gl-link>
- </template>
- </gl-sprintf>
-
- <template v-else>{{ option.text }}</template>
+ {{ option.text }}
<gl-icon
v-if="showDailyLimitMessage(option)"
v-gl-tooltip.hover
name="question-o"
:title="scheduleDailyLimitMsg"
+ data-testid="daily-limit"
/>
</gl-form-radio>
</gl-form-radio-group>
@@ -193,5 +183,11 @@ export default {
required="true"
@input="onCustomInput"
/>
+ <p class="gl-mt-1 gl-mb-0 gl-text-secondary">
+ {{ $options.i18n.learnCronSyntax }}
+ <gl-link :href="cronSyntaxUrl" target="_blank">
+ {{ $options.i18n.cronSyntaxLink }}
+ </gl-link>
+ </p>
</div>
</template>
diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue
deleted file mode 100644
index b3ad50f395b..00000000000
--- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-<script>
-import { GlButton } from '@gitlab/ui';
-import Vue from 'vue';
-import { getCookie, setCookie, parseBoolean } from '~/lib/utils/common_utils';
-import Translate from '~/vue_shared/translate';
-
-Vue.use(Translate);
-
-const cookieKey = 'pipeline_schedules_callout_dismissed';
-
-export default {
- name: 'PipelineSchedulesCallout',
- components: {
- GlButton,
- },
- inject: ['docsUrl', 'illustrationUrl'],
- data() {
- return {
- calloutDismissed: parseBoolean(getCookie(cookieKey)),
- };
- },
- methods: {
- dismissCallout() {
- this.calloutDismissed = true;
- setCookie(cookieKey, this.calloutDismissed);
- },
- },
-};
-</script>
-<template>
- <div v-if="!calloutDismissed" class="pipeline-schedules-user-callout user-callout">
- <div class="bordered-box landing content-block gl-p-5!" data-testid="innerContent">
- <gl-button
- category="tertiary"
- icon="close"
- :aria-label="__('Dismiss')"
- class="gl-absolute gl-top-2 gl-right-2"
- @click="dismissCallout"
- />
- <div class="svg-content">
- <img :src="illustrationUrl" />
- </div>
- <div class="user-callout-copy">
- <h4>{{ __('Scheduling Pipelines') }}</h4>
- <p>
- {{
- __(`The pipelines schedule runs pipelines in the future,
-repeatedly, for specific branches or tags.
-Those scheduled pipelines will inherit limited project access based on their associated user.`)
- }}
- </p>
- <p>
- {{ __('Learn more in the') }}
- <a :href="docsUrl" target="_blank" rel="nofollow">
- {{ __('pipeline schedules documentation') }}</a
- >.
- <!-- oneline to prevent extra space before period -->
- </p>
- </div>
- </div>
- </div>
-</template>