Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
eb337554
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,发现更多精彩内容 >>
提交
eb337554
编写于
4月 20, 2017
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'rollback-component-vue' into 'master'
Refactor into .vue files See merge request !10788
上级
9c59667f
d4021122
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
20 deletion
+58
-20
app/assets/javascripts/environments/components/environment_item.js
...s/javascripts/environments/components/environment_item.js
+2
-2
app/assets/javascripts/environments/components/environment_monitoring.vue
...cripts/environments/components/environment_monitoring.vue
+33
-0
app/assets/javascripts/environments/components/environment_rollback.vue
...ascripts/environments/components/environment_rollback.vue
+21
-16
spec/javascripts/environments/environment_monitoring_spec.js
spec/javascripts/environments/environment_monitoring_spec.js
+1
-1
spec/javascripts/environments/environment_rollback_spec.js
spec/javascripts/environments/environment_rollback_spec.js
+1
-1
未找到文件。
app/assets/javascripts/environments/components/environment_item.js
浏览文件 @
eb337554
...
...
@@ -3,9 +3,9 @@ import '../../lib/utils/text_utility';
import
ActionsComponent
from
'
./environment_actions
'
;
import
ExternalUrlComponent
from
'
./environment_external_url.vue
'
;
import
StopComponent
from
'
./environment_stop.vue
'
;
import
RollbackComponent
from
'
./environment_rollback
'
;
import
RollbackComponent
from
'
./environment_rollback
.vue
'
;
import
TerminalButtonComponent
from
'
./environment_terminal_button.vue
'
;
import
MonitoringButtonComponent
from
'
./environment_monitoring
'
;
import
MonitoringButtonComponent
from
'
./environment_monitoring
.vue
'
;
import
CommitComponent
from
'
../../vue_shared/components/commit
'
;
import
eventHub
from
'
../event_hub
'
;
...
...
app/assets/javascripts/environments/components/environment_monitoring.
js
→
app/assets/javascripts/environments/components/environment_monitoring.
vue
浏览文件 @
eb337554
<
script
>
/**
* Renders the Monitoring (Metrics) link in environments table.
*/
...
...
@@ -5,7 +6,6 @@ export default {
props
:
{
monitoringUrl
:
{
type
:
String
,
default
:
''
,
required
:
true
,
},
},
...
...
@@ -15,16 +15,19 @@ export default {
return
'
Monitoring
'
;
},
},
template
:
`
<a
class="btn monitoring-url has-tooltip"
data-container="body"
:href="monitoringUrl"
rel="noopener noreferrer nofollow"
:title="title"
:aria-label="title">
<i class="fa fa-area-chart" aria-hidden="true"></i>
</a>
`
,
};
</
script
>
<
template
>
<a
class=
"btn monitoring-url has-tooltip"
data-container=
"body"
target=
"_blank"
rel=
"noopener noreferrer nofollow"
:href=
"monitoringUrl"
:title=
"title"
:aria-label=
"title"
>
<i
class=
"fa fa-area-chart"
aria-hidden=
"true"
/>
</a>
</
template
>
app/assets/javascripts/environments/components/environment_rollback.
js
→
app/assets/javascripts/environments/components/environment_rollback.
vue
浏览文件 @
eb337554
<
script
>
/* global Flash */
/* eslint-disable no-new */
/**
...
...
@@ -49,21 +50,25 @@ export default {
});
},
},
};
</
script
>
<
template
>
<button
type=
"button"
class=
"btn"
@
click=
"onClick"
:disabled=
"isLoading"
>
template
:
`
<button type="button"
class="btn"
@click="onClick"
:disabled="isLoading">
<span v-if="isLastDeployment">
Re-deploy
</span>
<span v-else>
Rollback
</span>
<span
v-if=
"isLastDeployment"
>
Re-deploy
</span>
<span
v-else
>
Rollback
</span>
<i v-if="isLoading" class="fa fa-spinner fa-spin" aria-hidden="true"></i>
</button>
`
,
};
<i
v-if=
"isLoading"
class=
"fa fa-spinner fa-spin"
aria-hidden=
"true"
/>
</button>
</
template
>
spec/javascripts/environments/environment_monitoring_spec.js
浏览文件 @
eb337554
import
Vue
from
'
vue
'
;
import
monitoringComp
from
'
~/environments/components/environment_monitoring
'
;
import
monitoringComp
from
'
~/environments/components/environment_monitoring
.vue
'
;
describe
(
'
Monitoring Component
'
,
()
=>
{
let
MonitoringComponent
;
...
...
spec/javascripts/environments/environment_rollback_spec.js
浏览文件 @
eb337554
import
Vue
from
'
vue
'
;
import
rollbackComp
from
'
~/environments/components/environment_rollback
'
;
import
rollbackComp
from
'
~/environments/components/environment_rollback
.vue
'
;
describe
(
'
Rollback Component
'
,
()
=>
{
const
retryURL
=
'
https://gitlab.com/retry
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录