Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
2f451b88
apollo
项目概览
wrr-cat
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2f451b88
编写于
6月 24, 2016
作者:
J
Jason Song
提交者:
GitHub
6月 24, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #293 from lepdou/0620_27
change history type
上级
5410b4e8
5737e4c1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
25 deletion
+28
-25
apollo-portal/src/main/resources/static/cluster.html
apollo-portal/src/main/resources/static/cluster.html
+8
-3
apollo-portal/src/main/resources/static/config.html
apollo-portal/src/main/resources/static/config.html
+6
-14
apollo-portal/src/main/resources/static/scripts/controller/ClusterController.js
.../resources/static/scripts/controller/ClusterController.js
+10
-2
apollo-portal/src/main/resources/static/scripts/directive.js
apollo-portal/src/main/resources/static/scripts/directive.js
+4
-6
未找到文件。
apollo-portal/src/main/resources/static/cluster.html
浏览文件 @
2f451b88
...
...
@@ -33,7 +33,7 @@
</header>
<div
class=
"panel-body"
>
<form
class=
"form-horizontal"
ng-submit=
"create()"
>
<form
class=
"form-horizontal"
ng-s
how=
"step == 1"
ng-s
ubmit=
"create()"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
<apollorequiredfiled></apollorequiredfiled>
...
...
@@ -57,8 +57,9 @@
<div
class=
"col-sm-5"
>
<table
class=
"table table-hover"
style=
"width: 100px"
>
<tbody>
<tr
style=
"cursor: pointer"
ng-repeat=
"env in envs"
>
<td
width=
"10%"
><input
type=
"checkbox"
ng-click=
"switchChecked(env)"
></td>
<tr
style=
"cursor: pointer"
ng-repeat=
"env in envs"
ng-click=
"toggleEnvCheckedStatus(env)"
>
<td
width=
"10%"
><input
type=
"checkbox"
ng-checked=
"env.checked"
ng-click=
"switchChecked(env, $event)"
></td>
<td
width=
"30%"
ng-bind=
"env.name"
></td>
</tr>
</tbody>
...
...
@@ -73,6 +74,10 @@
</div>
</div>
</form>
<div
class=
"row text-center"
ng-show=
"step == 2"
>
<img
src=
"img/sync-succ.png"
style=
"height: 100px; width: 100px"
>
<h3>
创建成功!
</h3>
</div>
</div>
</div>
</div>
...
...
apollo-portal/src/main/resources/static/config.html
浏览文件 @
2f451b88
...
...
@@ -269,14 +269,6 @@
<!--历史修改视图-->
<div
class=
"J_historyview history-view"
ng-show=
"namespace.viewType == 'history'"
>
<div
class=
"text-right"
>
<span
class=
"label label-primary change-type-mark"
>
</span>
<small>
新增
</small>
<span
class=
"label label-info change-type-mark"
>
</span>
<small>
更新
</small>
<span
class=
"label label-danger change-type-mark"
>
</span>
<small>
删除
</small>
</div>
<div
class=
"media"
ng-repeat=
"commits in namespace.commits"
>
<div
class=
"media-body"
>
...
...
@@ -311,8 +303,8 @@
<tr
ng-repeat=
"item in commits.changeSets.createItems"
ng-show=
"item.key || item.comment"
>
<td
width=
"2%"
title=
"新增的配置"
>
<span
class=
"label label-primary change-type-mark"
>
</span>
<td
width=
"2%"
>
新增
</td>
<td
width=
"20%"
title=
"{{item.key}}"
>
...
...
@@ -331,8 +323,8 @@
</td>
</tr>
<tr
ng-repeat=
"item in commits.changeSets.updateItems"
>
<td
width=
"2%"
title=
"更新的配置"
>
<span
class=
"label label-info change-type-mark"
>
</span>
<td
width=
"2%"
>
更新
</td>
<td
width=
"20%"
title=
"{{item.newItem.key}}"
>
<span
ng-bind=
"item.newItem.key | limitTo: 250"
></span>
...
...
@@ -353,8 +345,8 @@
</tr>
<tr
ng-repeat=
"item in commits.changeSets.deleteItems"
ng-show=
"item.key || item.comment"
>
<td
width=
"2%"
title=
"删除的配置"
>
<span
class=
"label label-danger change-type-mark"
>
</span>
<td
width=
"2%"
>
删除
</td>
<td
width=
"20%"
title=
"{{item.key}}"
>
<span
ng-bind=
"item.key | limitTo: 250"
></span>
...
...
apollo-portal/src/main/resources/static/scripts/controller/ClusterController.js
浏览文件 @
2f451b88
...
...
@@ -7,6 +7,8 @@ cluster_module.controller('ClusterController',
var
params
=
AppUtil
.
parseParams
(
$location
.
$$url
);
$scope
.
appId
=
params
.
appid
;
$scope
.
step
=
1
;
EnvService
.
find_all_envs
().
then
(
function
(
result
)
{
$scope
.
envs
=
[];
result
.
forEach
(
function
(
env
)
{
...
...
@@ -19,7 +21,12 @@ cluster_module.controller('ClusterController',
$scope
.
clusterName
=
''
;
$scope
.
switchChecked
=
function
(
env
)
{
$scope
.
switchChecked
=
function
(
env
,
$event
)
{
env
.
checked
=
!
env
.
checked
;
$event
.
stopPropagation
();
};
$scope
.
toggleEnvCheckedStatus
=
function
(
env
)
{
env
.
checked
=
!
env
.
checked
;
};
...
...
@@ -34,11 +41,12 @@ cluster_module.controller('ClusterController',
appId
:
$scope
.
appId
}).
then
(
function
(
result
)
{
toastr
.
success
(
env
.
name
,
"
集群创建成功
"
);
$scope
.
step
=
2
;
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"
集群创建失败
"
);
})
}
})
})
;
if
(
noEnvChecked
){
toastr
.
warning
(
"
请选择环境
"
);
...
...
apollo-portal/src/main/resources/static/scripts/directive.js
浏览文件 @
2f451b88
...
...
@@ -131,14 +131,13 @@ directive_module.directive('apolloclusterselector', function ($compile, $window,
defaultCheckedCluster
:
'
=apolloDefaultCheckedCluster
'
},
link
:
function
(
scope
,
element
,
attrs
)
{
////// load env //////
scope
.
$watch
(
"
defaultCheckedEnv
"
,
function
(
newValue
,
oldValue
)
{
refreshClusterList
();
});
scope
.
$watch
(
"
defaultCheckedEnv
"
,
refreshClusterList
);
scope
.
$watch
(
"
defaultCheckedCluster
"
,
refreshClusterList
);
refreshClusterList
();
////// load env //////
function
refreshClusterList
()
{
AppService
.
load_nav_tree
(
scope
.
appId
).
then
(
function
(
result
)
{
scope
.
clusters
=
[];
...
...
@@ -246,7 +245,6 @@ directive_module.directive('apolloentrance', function ($compile, $window) {
href
:
'
=apolloHref
'
},
link
:
function
(
scope
,
element
,
attrs
)
{
console
.
log
(
scope
.
title
);
}
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录