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
1cc09301
Commit
1cc09301
authored
Oct 26, 2018
by
Filipa Lacerda
Committed by
Phil Hughes
Oct 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stage dropdown rendering only in English
parent
9b36f523
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
14 deletions
+18
-14
app/assets/javascripts/jobs/components/sidebar.vue
app/assets/javascripts/jobs/components/sidebar.vue
+6
-5
app/assets/javascripts/jobs/components/stages_dropdown.vue
app/assets/javascripts/jobs/components/stages_dropdown.vue
+0
-1
app/assets/javascripts/jobs/store/mutations.js
app/assets/javascripts/jobs/store/mutations.js
+1
-1
app/assets/javascripts/jobs/store/state.js
app/assets/javascripts/jobs/store/state.js
+1
-3
changelogs/unreleased/53133-jobs-list.yml
changelogs/unreleased/53133-jobs-list.yml
+5
-0
spec/javascripts/jobs/components/sidebar_spec.js
spec/javascripts/jobs/components/sidebar_spec.js
+3
-2
spec/javascripts/jobs/store/mutations_spec.js
spec/javascripts/jobs/store/mutations_spec.js
+2
-2
No files found.
app/assets/javascripts/jobs/components/sidebar.vue
View file @
1cc09301
...
...
@@ -31,7 +31,7 @@ export default {
},
},
computed
:
{
...
mapState
([
'
job
'
,
'
stages
'
,
'
jobs
'
,
'
selectedStage
'
]),
...
mapState
([
'
job
'
,
'
stages
'
,
'
jobs
'
,
'
selectedStage
'
,
'
isLoadingStages
'
]),
coverage
()
{
return
`
${
this
.
job
.
coverage
}
%`
;
},
...
...
@@ -59,10 +59,10 @@ export default {
return
''
;
}
let
t
=
this
.
job
.
metadata
.
timeout_human_readable
;
if
(
this
.
job
.
metadata
.
timeout_source
!==
''
)
{
t
+=
` (from
${
this
.
job
.
metadata
.
timeout_source
}
)`
;
}
let
t
=
this
.
job
.
metadata
.
timeout_human_readable
;
if
(
this
.
job
.
metadata
.
timeout_source
!==
''
)
{
t
+=
` (from
${
this
.
job
.
metadata
.
timeout_source
}
)`
;
}
return
t
;
},
...
...
@@ -270,6 +270,7 @@ export default {
/>
<stages-dropdown
v-if=
"!isLoadingStages"
:stages=
"stages"
:pipeline=
"job.pipeline"
:selected-stage=
"selectedStage"
...
...
app/assets/javascripts/jobs/components/stages_dropdown.vue
View file @
1cc09301
...
...
@@ -22,7 +22,6 @@ export default {
required
:
true
,
},
},
computed
:
{
hasRef
()
{
return
!
_
.
isEmpty
(
this
.
pipeline
.
ref
);
...
...
app/assets/javascripts/jobs/store/mutations.js
View file @
1cc09301
...
...
@@ -71,7 +71,7 @@ export default {
* after the first request,
* and we do not want to hijack that
*/
if
(
state
.
selectedStage
===
'
More
'
&&
job
.
stage
)
{
if
(
state
.
selectedStage
===
''
&&
job
.
stage
)
{
state
.
selectedStage
=
job
.
stage
;
}
},
...
...
app/assets/javascripts/jobs/store/state.js
View file @
1cc09301
import
{
__
}
from
'
~/locale
'
;
export
default
()
=>
({
jobEndpoint
:
null
,
traceEndpoint
:
null
,
...
...
@@ -29,7 +27,7 @@ export default () => ({
// sidebar dropdown & list of jobs
isLoadingStages
:
false
,
isLoadingJobs
:
false
,
selectedStage
:
__
(
'
More
'
)
,
selectedStage
:
''
,
stages
:
[],
jobs
:
[],
});
changelogs/unreleased/53133-jobs-list.yml
0 → 100644
View file @
1cc09301
---
title
:
Fix stage dropdown not rendering in different languages
merge_request
:
22604
author
:
type
:
other
spec/javascripts/jobs/components/sidebar_spec.js
View file @
1cc09301
...
...
@@ -140,10 +140,11 @@ describe('Sidebar details block', () => {
});
describe
(
'
while fetching stages
'
,
()
=>
{
it
(
'
renders dropdown with More label
'
,
()
=>
{
it
(
'
it does not render dropdown
'
,
()
=>
{
store
.
dispatch
(
'
requestStages
'
);
vm
=
mountComponentWithStore
(
SidebarComponent
,
{
store
});
expect
(
vm
.
$el
.
querySelector
(
'
.js-selected-stage
'
)
.
textContent
.
trim
()).
toEqual
(
'
More
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-selected-stage
'
)
).
toBeNull
(
);
});
});
...
...
spec/javascripts/jobs/store/mutations_spec.js
View file @
1cc09301
...
...
@@ -124,8 +124,8 @@ describe('Jobs Store Mutations', () => {
expect
(
stateCopy
.
job
).
toEqual
({
id
:
1312321
});
});
it
(
'
sets selectedStage when the selectedStage is
More
'
,
()
=>
{
expect
(
stateCopy
.
selectedStage
).
toEqual
(
'
More
'
);
it
(
'
sets selectedStage when the selectedStage is
empty
'
,
()
=>
{
expect
(
stateCopy
.
selectedStage
).
toEqual
(
''
);
mutations
[
types
.
RECEIVE_JOB_SUCCESS
](
stateCopy
,
{
id
:
1312321
,
stage
:
'
deploy
'
});
expect
(
stateCopy
.
selectedStage
).
toEqual
(
'
deploy
'
);
...
...
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