Commit a1ccb6a9 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'pipeline-error-message' into 'master'

Update pipeline alert text to be more readable

See merge request gitlab-org/gitlab!49575
parents b97abf7d 2c45d9a3
...@@ -16,6 +16,7 @@ import { ...@@ -16,6 +16,7 @@ import {
GlSearchBoxByType, GlSearchBoxByType,
GlSprintf, GlSprintf,
GlLoadingIcon, GlLoadingIcon,
GlSafeHtmlDirective as SafeHtml,
} from '@gitlab/ui'; } from '@gitlab/ui';
import * as Sentry from '~/sentry/wrapper'; import * as Sentry from '~/sentry/wrapper';
import { s__, __, n__ } from '~/locale'; import { s__, __, n__ } from '~/locale';
...@@ -34,7 +35,7 @@ export default { ...@@ -34,7 +35,7 @@ export default {
'Pipeline|Specify variable values to be used in this run. The values specified in %{linkStart}CI/CD settings%{linkEnd} will be used by default.', 'Pipeline|Specify variable values to be used in this run. The values specified in %{linkStart}CI/CD settings%{linkEnd} will be used by default.',
), ),
formElementClasses: 'gl-mr-3 gl-mb-3 gl-flex-basis-quarter gl-flex-shrink-0 gl-flex-grow-0', formElementClasses: 'gl-mr-3 gl-mb-3 gl-flex-basis-quarter gl-flex-shrink-0 gl-flex-grow-0',
errorTitle: __('The form contains the following error:'), errorTitle: __('Pipeline cannot be run.'),
warningTitle: __('The form contains the following warning:'), warningTitle: __('The form contains the following warning:'),
maxWarningsSummary: __('%{total} warnings found: showing first %{warningsDisplayed}'), maxWarningsSummary: __('%{total} warnings found: showing first %{warningsDisplayed}'),
components: { components: {
...@@ -53,6 +54,7 @@ export default { ...@@ -53,6 +54,7 @@ export default {
GlSprintf, GlSprintf,
GlLoadingIcon, GlLoadingIcon,
}, },
directives: { SafeHtml },
props: { props: {
pipelinesPath: { pipelinesPath: {
type: String, type: String,
...@@ -335,8 +337,9 @@ export default { ...@@ -335,8 +337,9 @@ export default {
variant="danger" variant="danger"
class="gl-mb-4" class="gl-mb-4"
data-testid="run-pipeline-error-alert" data-testid="run-pipeline-error-alert"
>{{ error }}</gl-alert
> >
<span v-safe-html="error"></span>
</gl-alert>
<gl-alert <gl-alert
v-if="shouldShowWarning" v-if="shouldShowWarning"
:title="$options.warningTitle" :title="$options.warningTitle"
...@@ -365,7 +368,7 @@ export default { ...@@ -365,7 +368,7 @@ export default {
</p> </p>
</details> </details>
</gl-alert> </gl-alert>
<gl-form-group :label="s__('Pipeline|Run for')"> <gl-form-group :label="s__('Pipeline|Run for branch name or tag')">
<gl-dropdown :text="refShortName" block> <gl-dropdown :text="refShortName" block>
<gl-search-box-by-type v-model.trim="searchTerm" :placeholder="__('Search refs')" /> <gl-search-box-by-type v-model.trim="searchTerm" :placeholder="__('Search refs')" />
<gl-dropdown-section-header>{{ __('Branches') }}</gl-dropdown-section-header> <gl-dropdown-section-header>{{ __('Branches') }}</gl-dropdown-section-header>
...@@ -391,12 +394,6 @@ export default { ...@@ -391,12 +394,6 @@ export default {
{{ tag.shortName }} {{ tag.shortName }}
</gl-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
<template #description>
<div>
{{ s__('Pipeline|Existing branch name or tag') }}
</div></template
>
</gl-form-group> </gl-form-group>
<gl-loading-icon v-if="isLoading" class="gl-mb-5" size="lg" /> <gl-loading-icon v-if="isLoading" class="gl-mb-5" size="lg" />
......
---
title: Update pipeline alert text to be more readable
merge_request: 49575
author:
type: other
...@@ -19,7 +19,7 @@ module Gitlab ...@@ -19,7 +19,7 @@ module Gitlab
end end
unless allowed_to_write_ref? unless allowed_to_write_ref?
error("Insufficient permissions for protected ref '#{command.ref}'") error("You do not have sufficient permission to run a pipeline on '#{command.ref}'. Please select a different branch or contact your administrator for assistance. <a href=https://docs.gitlab.com/ee/ci/pipelines/#pipeline-security-on-protected-branches>Learn more</a>".html_safe)
end end
end end
......
...@@ -20634,6 +20634,9 @@ msgstr "" ...@@ -20634,6 +20634,9 @@ msgstr ""
msgid "Pipeline Schedules" msgid "Pipeline Schedules"
msgstr "" msgstr ""
msgid "Pipeline cannot be run."
msgstr ""
msgid "Pipeline minutes quota" msgid "Pipeline minutes quota"
msgstr "" msgstr ""
...@@ -20967,6 +20970,9 @@ msgstr "" ...@@ -20967,6 +20970,9 @@ msgstr ""
msgid "Pipeline|Run for" msgid "Pipeline|Run for"
msgstr "" msgstr ""
msgid "Pipeline|Run for branch name or tag"
msgstr ""
msgid "Pipeline|Running" msgid "Pipeline|Running"
msgstr "" msgstr ""
...@@ -28022,9 +28028,6 @@ msgstr[1] "" ...@@ -28022,9 +28028,6 @@ msgstr[1] ""
msgid "The fork relationship has been removed." msgid "The fork relationship has been removed."
msgstr "" msgstr ""
msgid "The form contains the following error:"
msgstr ""
msgid "The form contains the following errors:" msgid "The form contains the following errors:"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment