Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
1cc09301
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1cc09301
编写于
10月 26, 2018
作者:
F
Filipa Lacerda
提交者:
Phil Hughes
10月 26, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix stage dropdown rendering only in English
上级
9b36f523
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
18 addition
and
14 deletion
+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
未找到文件。
app/assets/javascripts/jobs/components/sidebar.vue
浏览文件 @
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
浏览文件 @
1cc09301
...
...
@@ -22,7 +22,6 @@ export default {
required
:
true
,
},
},
computed
:
{
hasRef
()
{
return
!
_
.
isEmpty
(
this
.
pipeline
.
ref
);
...
...
app/assets/javascripts/jobs/store/mutations.js
浏览文件 @
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
浏览文件 @
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
浏览文件 @
1cc09301
---
title
:
Fix stage dropdown not rendering in different languages
merge_request
:
22604
author
:
type
:
other
spec/javascripts/jobs/components/sidebar_spec.js
浏览文件 @
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
浏览文件 @
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
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录