Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
466b1125
Commit
466b1125
authored
Sep 22, 2021
by
Fabian Schneider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove download text from pipeline artifact dropdown items
Changelog: changed
parent
544dbea8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
18 deletions
+11
-18
app/assets/javascripts/pipelines/components/pipelines_list/pipeline_multi_actions.vue
...ines/components/pipelines_list/pipeline_multi_actions.vue
+1
-6
app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue
...pelines/components/pipelines_list/pipelines_artifacts.vue
+8
-6
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/frontend/pipelines/pipeline_multi_actions_spec.js
spec/frontend/pipelines/pipeline_multi_actions_spec.js
+1
-1
spec/frontend/pipelines/pipelines_artifacts_spec.js
spec/frontend/pipelines/pipelines_artifacts_spec.js
+1
-2
No files found.
app/assets/javascripts/pipelines/components/pipelines_list/pipeline_multi_actions.vue
View file @
466b1125
...
@@ -5,7 +5,6 @@ import {
...
@@ -5,7 +5,6 @@ import {
GlDropdownItem
,
GlDropdownItem
,
GlDropdownSectionHeader
,
GlDropdownSectionHeader
,
GlLoadingIcon
,
GlLoadingIcon
,
GlSprintf
,
GlTooltipDirective
,
GlTooltipDirective
,
}
from
'
@gitlab/ui
'
;
}
from
'
@gitlab/ui
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
@@ -13,7 +12,6 @@ import { __, s__ } from '~/locale';
...
@@ -13,7 +12,6 @@ import { __, s__ } from '~/locale';
export
const
i18n
=
{
export
const
i18n
=
{
artifacts
:
__
(
'
Artifacts
'
),
artifacts
:
__
(
'
Artifacts
'
),
downloadArtifact
:
__
(
'
Download %{name} artifact
'
),
artifactSectionHeader
:
__
(
'
Download artifacts
'
),
artifactSectionHeader
:
__
(
'
Download artifacts
'
),
artifactsFetchErrorMessage
:
s__
(
'
Pipelines|Could not load artifacts.
'
),
artifactsFetchErrorMessage
:
s__
(
'
Pipelines|Could not load artifacts.
'
),
emptyArtifactsMessage
:
__
(
'
No artifacts found
'
),
emptyArtifactsMessage
:
__
(
'
No artifacts found
'
),
...
@@ -30,7 +28,6 @@ export default {
...
@@ -30,7 +28,6 @@ export default {
GlDropdownItem
,
GlDropdownItem
,
GlDropdownSectionHeader
,
GlDropdownSectionHeader
,
GlLoadingIcon
,
GlLoadingIcon
,
GlSprintf
,
},
},
inject
:
{
inject
:
{
artifactsEndpoint
:
{
artifactsEndpoint
:
{
...
@@ -113,9 +110,7 @@ export default {
...
@@ -113,9 +110,7 @@ export default {
class=
"gl-word-break-word"
class=
"gl-word-break-word"
data-testid=
"artifact-item"
data-testid=
"artifact-item"
>
>
<gl-sprintf
:message=
"$options.i18n.downloadArtifact"
>
{{
artifact
.
name
}}
<template
#name
>
{{
artifact
.
name
}}
</
template
>
</gl-sprintf>
</gl-dropdown-item>
</gl-dropdown-item>
</gl-dropdown>
</gl-dropdown>
</
template
>
</
template
>
app/assets/javascripts/pipelines/components/pipelines_list/pipelines_artifacts.vue
View file @
466b1125
...
@@ -3,8 +3,8 @@ import {
...
@@ -3,8 +3,8 @@ import {
GlAlert
,
GlAlert
,
GlDropdown
,
GlDropdown
,
GlDropdownItem
,
GlDropdownItem
,
GlDropdownSectionHeader
,
GlLoadingIcon
,
GlLoadingIcon
,
GlSprintf
,
GlTooltipDirective
,
GlTooltipDirective
,
}
from
'
@gitlab/ui
'
;
}
from
'
@gitlab/ui
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
@@ -12,7 +12,6 @@ import { __, s__ } from '~/locale';
...
@@ -12,7 +12,6 @@ import { __, s__ } from '~/locale';
export
const
i18n
=
{
export
const
i18n
=
{
artifacts
:
__
(
'
Artifacts
'
),
artifacts
:
__
(
'
Artifacts
'
),
downloadArtifact
:
__
(
'
Download %{name} artifact
'
),
artifactSectionHeader
:
__
(
'
Download artifacts
'
),
artifactSectionHeader
:
__
(
'
Download artifacts
'
),
artifactsFetchErrorMessage
:
s__
(
'
Pipelines|Could not load artifacts.
'
),
artifactsFetchErrorMessage
:
s__
(
'
Pipelines|Could not load artifacts.
'
),
noArtifacts
:
s__
(
'
Pipelines|No artifacts available
'
),
noArtifacts
:
s__
(
'
Pipelines|No artifacts available
'
),
...
@@ -27,8 +26,8 @@ export default {
...
@@ -27,8 +26,8 @@ export default {
GlAlert
,
GlAlert
,
GlDropdown
,
GlDropdown
,
GlDropdownItem
,
GlDropdownItem
,
GlDropdownSectionHeader
,
GlLoadingIcon
,
GlLoadingIcon
,
GlSprintf
,
},
},
inject
:
{
inject
:
{
artifactsEndpoint
:
{
artifactsEndpoint
:
{
...
@@ -92,6 +91,10 @@ export default {
...
@@ -92,6 +91,10 @@ export default {
text-sr-only
text-sr-only
@
show.once=
"fetchArtifacts"
@
show.once=
"fetchArtifacts"
>
>
<gl-dropdown-section-header>
{{
$options
.
i18n
.
artifactSectionHeader
}}
</gl-dropdown-section-header>
<gl-alert
v-if=
"hasError"
variant=
"danger"
:dismissible=
"false"
>
<gl-alert
v-if=
"hasError"
variant=
"danger"
:dismissible=
"false"
>
{{
$options
.
i18n
.
artifactsFetchErrorMessage
}}
{{
$options
.
i18n
.
artifactsFetchErrorMessage
}}
</gl-alert>
</gl-alert>
...
@@ -108,10 +111,9 @@ export default {
...
@@ -108,10 +111,9 @@ export default {
:href=
"artifact.path"
:href=
"artifact.path"
rel=
"nofollow"
rel=
"nofollow"
download
download
class=
"gl-word-break-word"
>
>
<gl-sprintf
:message=
"$options.i18n.downloadArtifact"
>
{{
artifact
.
name
}}
<template
#name
>
{{
artifact
.
name
}}
</
template
>
</gl-sprintf>
</gl-dropdown-item>
</gl-dropdown-item>
</gl-dropdown>
</gl-dropdown>
</
template
>
</
template
>
locale/gitlab.pot
View file @
466b1125
...
@@ -12061,9 +12061,6 @@ msgstr ""
...
@@ -12061,9 +12061,6 @@ msgstr ""
msgid "Download %{format}:"
msgid "Download %{format}:"
msgstr ""
msgstr ""
msgid "Download %{name} artifact"
msgstr ""
msgid "Download (%{fileSizeReadable})"
msgid "Download (%{fileSizeReadable})"
msgstr ""
msgstr ""
...
...
spec/frontend/pipelines/pipeline_multi_actions_spec.js
View file @
466b1125
...
@@ -95,7 +95,7 @@ describe('Pipeline Multi Actions Dropdown', () => {
...
@@ -95,7 +95,7 @@ describe('Pipeline Multi Actions Dropdown', () => {
createComponent
({
mockData
:
{
artifacts
}
});
createComponent
({
mockData
:
{
artifacts
}
});
expect
(
findFirstArtifactItem
().
attributes
(
'
href
'
)).
toBe
(
artifacts
[
0
].
path
);
expect
(
findFirstArtifactItem
().
attributes
(
'
href
'
)).
toBe
(
artifacts
[
0
].
path
);
expect
(
findFirstArtifactItem
().
text
()).
toBe
(
`Download
${
artifacts
[
0
].
name
}
artifact`
);
expect
(
findFirstArtifactItem
().
text
()).
toBe
(
artifacts
[
0
].
name
);
});
});
it
(
'
should render empty message when no artifacts are found
'
,
()
=>
{
it
(
'
should render empty message when no artifacts are found
'
,
()
=>
{
...
...
spec/frontend/pipelines/pipelines_artifacts_spec.js
View file @
466b1125
...
@@ -87,8 +87,7 @@ describe('Pipelines Artifacts dropdown', () => {
...
@@ -87,8 +87,7 @@ describe('Pipelines Artifacts dropdown', () => {
createComponent
({
mockData
:
{
artifacts
}
});
createComponent
({
mockData
:
{
artifacts
}
});
expect
(
findFirstGlDropdownItem
().
attributes
(
'
href
'
)).
toBe
(
artifacts
[
0
].
path
);
expect
(
findFirstGlDropdownItem
().
attributes
(
'
href
'
)).
toBe
(
artifacts
[
0
].
path
);
expect
(
findFirstGlDropdownItem
().
text
()).
toBe
(
artifacts
[
0
].
name
);
expect
(
findFirstGlDropdownItem
().
text
()).
toBe
(
`Download
${
artifacts
[
0
].
name
}
artifact`
);
});
});
describe
(
'
with a failing request
'
,
()
=>
{
describe
(
'
with a failing request
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment