diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /app/assets/javascripts/pipelines/components | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'app/assets/javascripts/pipelines/components')
5 files changed, 39 insertions, 37 deletions
diff --git a/app/assets/javascripts/pipelines/components/graph/job_item.vue b/app/assets/javascripts/pipelines/components/graph/job_item.vue index fd40ca0b9c9..0216b2717ed 100644 --- a/app/assets/javascripts/pipelines/components/graph/job_item.vue +++ b/app/assets/javascripts/pipelines/components/graph/job_item.vue @@ -52,7 +52,7 @@ export default { required: true, }, cssClassJobName: { - type: [String, Array], + type: [String, Array, Object], required: false, default: '', }, @@ -167,9 +167,13 @@ export default { return this.job.name === this.pipelineExpanded.jobName && this.pipelineExpanded.expanded; }, jobClasses() { - return this.relatedDownstreamHovered || this.relatedDownstreamExpanded - ? `${this.$options.hoverClass} ${this.cssClassJobName}` - : this.cssClassJobName; + return [ + { + [this.$options.hoverClass]: + this.relatedDownstreamHovered || this.relatedDownstreamExpanded, + }, + this.cssClassJobName, + ]; }, }, errorCaptured(err, _vm, info) { diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_multi_actions.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_multi_actions.vue index 3470c963ade..b778fe28e59 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_multi_actions.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_multi_actions.vue @@ -5,7 +5,6 @@ import { GlDropdownItem, GlDropdownSectionHeader, GlLoadingIcon, - GlSprintf, GlTooltipDirective, } from '@gitlab/ui'; import axios from '~/lib/utils/axios_utils'; @@ -13,7 +12,6 @@ import { __, s__ } from '~/locale'; export const i18n = { artifacts: __('Artifacts'), - downloadArtifact: __('Download %{name} artifact'), artifactSectionHeader: __('Download artifacts'), artifactsFetchErrorMessage: s__('Pipelines|Could not load artifacts.'), emptyArtifactsMessage: __('No artifacts found'), @@ -30,7 +28,6 @@ export default { GlDropdownItem, GlDropdownSectionHeader, GlLoadingIcon, - GlSprintf, }, inject: { artifactsEndpoint: { @@ -113,9 +110,7 @@ export default { class="gl-word-break-word" data-testid="artifact-item" > - <gl-sprintf :message="$options.i18n.downloadArtifact"> - <template #name>{{ artifact.name }}</template> - </gl-sprintf> + {{ artifact.name }} </gl-dropdown-item> </gl-dropdown> </template> diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_stop_modal.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_stop_modal.vue index 3bd149fc782..ef21673115e 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_stop_modal.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_stop_modal.vue @@ -1,5 +1,5 @@ <script> -import { GlLink, GlModal } from '@gitlab/ui'; +import { GlLink, GlModal, GlSprintf } from '@gitlab/ui'; import { isEmpty } from 'lodash'; import { __, s__, sprintf } from '~/locale'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; @@ -13,6 +13,7 @@ export default { components: { GlModal, GlLink, + GlSprintf, CiIcon, }, props: { @@ -33,13 +34,7 @@ export default { ); }, modalText() { - return sprintf( - s__(`Pipeline|You’re about to stop pipeline %{pipelineId}.`), - { - pipelineId: `<strong>#${this.pipeline.id}</strong>`, - }, - false, - ); + return s__(`Pipeline|You’re about to stop pipeline #%{pipelineId}.`); }, hasRef() { return !isEmpty(this.pipeline.ref); @@ -71,7 +66,13 @@ export default { :action-cancel="cancelProps" @primary="emitSubmit($event)" > - <p v-html="modalText /* eslint-disable-line vue/no-v-html */"></p> + <p> + <gl-sprintf :message="modalText"> + <template #pipelineId> + <strong>{{ pipeline.id }}</strong> + </template> + </gl-sprintf> + </p> <p v-if="pipeline"> <ci-icon diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue index 36629d9f1f1..1c7c4d7c704 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue @@ -3,8 +3,8 @@ import { GlAlert, GlDropdown, GlDropdownItem, + GlDropdownSectionHeader, GlLoadingIcon, - GlSprintf, GlTooltipDirective, } from '@gitlab/ui'; import axios from '~/lib/utils/axios_utils'; @@ -12,7 +12,6 @@ import { __, s__ } from '~/locale'; export const i18n = { artifacts: __('Artifacts'), - downloadArtifact: __('Download %{name} artifact'), artifactSectionHeader: __('Download artifacts'), artifactsFetchErrorMessage: s__('Pipelines|Could not load artifacts.'), noArtifacts: s__('Pipelines|No artifacts available'), @@ -27,8 +26,8 @@ export default { GlAlert, GlDropdown, GlDropdownItem, + GlDropdownSectionHeader, GlLoadingIcon, - GlSprintf, }, inject: { artifactsEndpoint: { @@ -92,6 +91,10 @@ export default { text-sr-only @show.once="fetchArtifacts" > + <gl-dropdown-section-header>{{ + $options.i18n.artifactSectionHeader + }}</gl-dropdown-section-header> + <gl-alert v-if="hasError" variant="danger" :dismissible="false"> {{ $options.i18n.artifactsFetchErrorMessage }} </gl-alert> @@ -108,10 +111,9 @@ export default { :href="artifact.path" rel="nofollow" download + class="gl-word-break-word" > - <gl-sprintf :message="$options.i18n.downloadArtifact"> - <template #name>{{ artifact.name }}</template> - </gl-sprintf> + {{ artifact.name }} </gl-dropdown-item> </gl-dropdown> </template> diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/tokens/constants.js b/app/assets/javascripts/pipelines/components/pipelines_list/tokens/constants.js index 02baa76f627..d8f15cfde91 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/tokens/constants.js +++ b/app/assets/javascripts/pipelines/components/pipelines_list/tokens/constants.js @@ -2,51 +2,51 @@ import { s__ } from '~/locale'; export const PIPELINE_SOURCES = [ { - text: s__('Pipeline|Source|Push'), + text: s__('PipelineSource|Push'), value: 'push', }, { - text: s__('Pipeline|Source|Web'), + text: s__('PipelineSource|Web'), value: 'web', }, { - text: s__('Pipeline|Source|Trigger'), + text: s__('PipelineSource|Trigger'), value: 'trigger', }, { - text: s__('Pipeline|Source|Schedule'), + text: s__('PipelineSource|Schedule'), value: 'schedule', }, { - text: s__('Pipeline|Source|API'), + text: s__('PipelineSource|API'), value: 'api', }, { - text: s__('Pipeline|Source|External'), + text: s__('PipelineSource|External'), value: 'external', }, { - text: s__('Pipeline|Source|Pipeline'), + text: s__('PipelineSource|Pipeline'), value: 'pipeline', }, { - text: s__('Pipeline|Source|Chat'), + text: s__('PipelineSource|Chat'), value: 'chat', }, { - text: s__('Pipeline|Source|Web IDE'), + text: s__('PipelineSource|Web IDE'), value: 'webide', }, { - text: s__('Pipeline|Source|Merge Request'), + text: s__('PipelineSource|Merge Request'), value: 'merge_request_event', }, { - text: s__('Pipeline|Source|External Pull Request'), + text: s__('PipelineSource|External Pull Request'), value: 'external_pull_request_event', }, { - text: s__('Pipeline|Source|Parent Pipeline'), + text: s__('PipelineSource|Parent Pipeline'), value: 'parent_pipeline', }, ]; |