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>2020-11-13 18:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-13 18:09:24 +0300
commit37699393e9d68181a04f54ded5ae1b08b6272291 (patch)
tree6d02f81cb671476f5b9b8a635f9307fd7728d04f /app/assets/javascripts/ci_lint
parent7f59234892f27812dc91044cd63a6a4655e26263 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ci_lint')
-rw-r--r--app/assets/javascripts/ci_lint/components/ci_lint.vue9
-rw-r--r--app/assets/javascripts/ci_lint/components/ci_lint_results.vue37
-rw-r--r--app/assets/javascripts/ci_lint/index.js5
3 files changed, 42 insertions, 9 deletions
diff --git a/app/assets/javascripts/ci_lint/components/ci_lint.vue b/app/assets/javascripts/ci_lint/components/ci_lint.vue
index cae82ea316c..def45026b35 100644
--- a/app/assets/javascripts/ci_lint/components/ci_lint.vue
+++ b/app/assets/javascripts/ci_lint/components/ci_lint.vue
@@ -19,7 +19,11 @@ export default {
type: String,
required: true,
},
- helpPagePath: {
+ lintHelpPagePath: {
+ type: String,
+ required: true,
+ },
+ pipelineSimulationHelpPagePath: {
type: String,
required: true,
},
@@ -106,7 +110,7 @@ export default {
>
<gl-form-checkbox v-model="dryRun"
>{{ __('Simulate a pipeline created for the default branch') }}
- <gl-link :href="helpPagePath" target="_blank"
+ <gl-link :href="pipelineSimulationHelpPagePath" target="_blank"
><gl-icon class="gl-text-blue-600" name="question-o"/></gl-link
></gl-form-checkbox>
</div>
@@ -120,6 +124,7 @@ export default {
:errors="errors"
:warnings="warnings"
:dry-run="dryRun"
+ :lint-help-page-path="lintHelpPagePath"
/>
</div>
</template>
diff --git a/app/assets/javascripts/ci_lint/components/ci_lint_results.vue b/app/assets/javascripts/ci_lint/components/ci_lint_results.vue
index 28b2a028b29..8b37c94de19 100644
--- a/app/assets/javascripts/ci_lint/components/ci_lint_results.vue
+++ b/app/assets/javascripts/ci_lint/components/ci_lint_results.vue
@@ -1,5 +1,5 @@
<script>
-import { GlAlert, GlTable } from '@gitlab/ui';
+import { GlAlert, GlLink, GlSprintf, GlTable } from '@gitlab/ui';
import CiLintWarnings from './ci_lint_warnings.vue';
import CiLintResultsValue from './ci_lint_results_value.vue';
import CiLintResultsParam from './ci_lint_results_param.vue';
@@ -8,8 +8,17 @@ import { __ } from '~/locale';
const thBorderColor = 'gl-border-gray-100!';
export default {
- correct: { variant: 'success', text: __('syntax is correct') },
- incorrect: { variant: 'danger', text: __('syntax is incorrect') },
+ correct: {
+ variant: 'success',
+ text: __('syntax is correct.'),
+ },
+ incorrect: {
+ variant: 'danger',
+ text: __('syntax is incorrect.'),
+ },
+ includesText: __(
+ 'CI configuration validated, including all configuration added with the %{codeStart}includes%{codeEnd} keyword. %{link}',
+ ),
warningTitle: __('The form contains the following warning:'),
fields: [
{
@@ -25,6 +34,8 @@ export default {
],
components: {
GlAlert,
+ GlLink,
+ GlSprintf,
GlTable,
CiLintWarnings,
CiLintResultsValue,
@@ -51,6 +62,10 @@ export default {
type: Boolean,
required: true,
},
+ lintHelpPagePath: {
+ type: String,
+ required: true,
+ },
},
data() {
return {
@@ -82,8 +97,20 @@ export default {
:title="__('Status:')"
:dismissible="false"
data-testid="ci-lint-status"
- >{{ status.text }}</gl-alert
- >
+ >{{ status.text }}
+ <gl-sprintf :message="$options.includesText">
+ <template #code="{content}">
+ <code>
+ {{ content }}
+ </code>
+ </template>
+ <template #link>
+ <gl-link :href="lintHelpPagePath" target="_blank">
+ {{ __('More information') }}
+ </gl-link>
+ </template>
+ </gl-sprintf>
+ </gl-alert>
<pre
v-if="shouldShowError"
diff --git a/app/assets/javascripts/ci_lint/index.js b/app/assets/javascripts/ci_lint/index.js
index 430cb167d32..e4cda4cb369 100644
--- a/app/assets/javascripts/ci_lint/index.js
+++ b/app/assets/javascripts/ci_lint/index.js
@@ -12,7 +12,7 @@ const apolloProvider = new VueApollo({
export default (containerId = '#js-ci-lint') => {
const containerEl = document.querySelector(containerId);
- const { endpoint, helpPagePath } = containerEl.dataset;
+ const { endpoint, lintHelpPagePath, pipelineSimulationHelpPagePath } = containerEl.dataset;
return new Vue({
el: containerEl,
@@ -21,7 +21,8 @@ export default (containerId = '#js-ci-lint') => {
return createElement(CiLint, {
props: {
endpoint,
- helpPagePath,
+ lintHelpPagePath,
+ pipelineSimulationHelpPagePath,
},
});
},