Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
03c4c467
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,发现更多精彩内容 >>
提交
03c4c467
编写于
8月 03, 2018
作者:
M
Mike Greiling
提交者:
Fatih Acet
8月 03, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Port of protected environments frontend changes from EE to CE
上级
d40c5fa0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
19 deletion
+41
-19
app/assets/javascripts/environments/components/environment_item.vue
.../javascripts/environments/components/environment_item.vue
+34
-11
app/assets/javascripts/environments/components/environments_table.vue
...avascripts/environments/components/environments_table.vue
+5
-8
app/views/projects/settings/ci_cd/show.html.haml
app/views/projects/settings/ci_cd/show.html.haml
+2
-0
未找到文件。
app/assets/javascripts/environments/components/environment_item.vue
浏览文件 @
03c4c467
...
...
@@ -86,6 +86,28 @@ export default {
);
},
/**
* Checkes whether the user is allowed to deploy to this environment.
* (`can_deploy` currently only set in EE)
*
* @returns {Boolean}
*/
isDeployableByUser
()
{
return
this
.
model
&&
'
can_deploy
'
in
this
.
model
?
this
.
model
.
can_deploy
:
this
.
canCreateDeployment
;
},
/**
* Checkes whether the environment is protected.
* (`is_protected` currently only set in EE)
*
* @returns {Boolean}
*/
isProtected
()
{
return
this
.
model
&&
this
.
model
.
is_protected
;
},
/**
* Returns whether the environment can be stopped.
*
...
...
@@ -455,7 +477,7 @@ export default {
class="gl-responsive-table-row"
role="row">
<div
class=
"table-section section-
10
"
class=
"table-section section-
wrap section-15
"
role=
"gridcell"
>
<div
...
...
@@ -465,16 +487,17 @@ export default {
>
{{
s__
(
"
Environments|Environment
"
)
}}
</div>
<
a
<
span
v-if=
"!model.isFolder"
:href=
"environmentPath"
class=
"environment-name flex-truncate-parent table-mobile-content"
>
<span
class=
"environment-name table-mobile-content"
>
<a
v-tooltip
:href=
"environmentPath"
:title=
"model.name"
class=
"flex-truncate-child"
>
{{
model
.
name
}}
</span>
</a>
>
{{
model
.
name
}}
</a>
</span>
<span
v-else
class=
"folder-name"
...
...
@@ -548,7 +571,7 @@ export default {
<div
v-if=
"!model.isFolder"
class=
"table-section section-2
5
"
class=
"table-section section-2
0
"
role=
"gridcell"
>
<div
...
...
@@ -612,7 +635,7 @@ export default {
/>
<actions-component
v-if=
"hasManualActions &&
canCreateDeployment
"
v-if=
"hasManualActions &&
isDeployableByUser
"
:actions=
"manualActions"
/>
...
...
@@ -622,7 +645,7 @@ export default {
/>
<rollback-component
v-if=
"canRetry &&
canCreateDeployment
"
v-if=
"canRetry &&
isDeployableByUser
"
:is-last-deployment=
"isLastDeployment"
:retry-url=
"retryUrl"
/>
...
...
app/assets/javascripts/environments/components/environments_table.vue
浏览文件 @
03c4c467
...
...
@@ -15,7 +15,7 @@ export default {
environments
:
{
type
:
Array
,
required
:
true
,
default
:
()
=>
([])
,
default
:
()
=>
[]
,
},
canReadEnvironment
:
{
...
...
@@ -35,10 +35,7 @@ export default {
return
`
${
window
.
location
.
pathname
}
/folders/
${
model
.
folderName
}
`
;
},
shouldRenderFolderContent
(
env
)
{
return
env
.
isFolder
&&
env
.
isOpen
&&
env
.
children
&&
env
.
children
.
length
>
0
;
return
env
.
isFolder
&&
env
.
isOpen
&&
env
.
children
&&
env
.
children
.
length
>
0
;
},
},
};
...
...
@@ -53,7 +50,7 @@ export default {
role=
"row"
>
<div
class=
"table-section section-1
0
environments-name"
class=
"table-section section-1
5
environments-name"
role=
"columnheader"
>
{{
s__
(
"
Environments|Environment
"
)
}}
...
...
@@ -71,7 +68,7 @@ export default {
{{
s__
(
"
Environments|Job
"
)
}}
</div>
<div
class=
"table-section section-2
5
environments-commit"
class=
"table-section section-2
0
environments-commit"
role=
"columnheader"
>
{{
s__
(
"
Environments|Commit
"
)
}}
...
...
@@ -91,7 +88,7 @@ export default {
:model=
"model"
:can-create-deployment=
"canCreateDeployment"
:can-read-environment=
"canReadEnvironment"
:key=
"
i
"
:key=
"
`environment-item-$
{i}`
"
/>
<template
...
...
app/views/projects/settings/ci_cd/show.html.haml
浏览文件 @
03c4c467
...
...
@@ -28,6 +28,8 @@
.settings-content
=
render
'autodevops_form'
=
render_if_exists
'projects/settings/ci_cd/protected_environments'
,
expanded:
expanded
%section
.qa-runners-settings.settings.no-animate
#js-runners-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录