Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
84cb89ea
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,发现更多精彩内容 >>
提交
84cb89ea
编写于
5月 05, 2016
作者:
L
lepdou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
隐藏没有完成的功能的入口 & 样式优化
上级
1cbe8611
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
66 addition
and
58 deletion
+66
-58
apollo-portal/src/main/resources/static/img/close.png
apollo-portal/src/main/resources/static/img/close.png
+0
-0
apollo-portal/src/main/resources/static/img/dolphin.jpg
apollo-portal/src/main/resources/static/img/dolphin.jpg
+0
-0
apollo-portal/src/main/resources/static/img/open.png
apollo-portal/src/main/resources/static/img/open.png
+0
-0
apollo-portal/src/main/resources/static/scripts/controller/app/AppConfigController.js
...rces/static/scripts/controller/app/AppConfigController.js
+1
-3
apollo-portal/src/main/resources/static/scripts/controller/app/SyncConfigController.js
...ces/static/scripts/controller/app/SyncConfigController.js
+7
-0
apollo-portal/src/main/resources/static/styles/common-style.css
...-portal/src/main/resources/static/styles/common-style.css
+0
-1
apollo-portal/src/main/resources/static/views/app.html
apollo-portal/src/main/resources/static/views/app.html
+45
-41
apollo-portal/src/main/resources/static/views/sync.html
apollo-portal/src/main/resources/static/views/sync.html
+13
-13
未找到文件。
apollo-portal/src/main/resources/static/img/close.png
已删除
100644 → 0
浏览文件 @
1cbe8611
2.9 KB
apollo-portal/src/main/resources/static/img/dolphin.jpg
已删除
100644 → 0
浏览文件 @
1cbe8611
56.4 KB
apollo-portal/src/main/resources/static/img/open.png
已删除
100644 → 0
浏览文件 @
1cbe8611
2.2 KB
apollo-portal/src/main/resources/static/scripts/controller/app/AppConfigController.js
浏览文件 @
84cb89ea
...
...
@@ -4,7 +4,6 @@ application_module.controller("AppConfigController",
var
appId
=
AppUtil
.
parseParams
(
$location
.
$$url
).
appid
;
var
currentUser
=
'
test_user
'
;
var
pageContext
=
{
appId
:
appId
,
env
:
''
,
...
...
@@ -140,8 +139,7 @@ application_module.controller("AppConfigController",
itemCnt
++
;
});
itemCnt
>
30
?
30
:
itemCnt
;
itemCnt
<
9
?
8
:
itemCnt
;
itemCnt
=
itemCnt
>
30
?
30
:
itemCnt
;
namespace
.
itemCnt
=
itemCnt
+
3
;
return
result
;
}
...
...
apollo-portal/src/main/resources/static/scripts/controller/app/SyncConfigController.js
浏览文件 @
84cb89ea
...
...
@@ -61,8 +61,15 @@ sync_item_module.controller("SyncItemController",
};
$scope
.
diff
=
function
()
{
$scope
.
hasDiff
=
false
;
ConfigService
.
diff
(
$scope
.
pageContext
.
namespaceName
,
parseSyncSourceData
()).
then
(
function
(
result
)
{
$scope
.
diffs
=
result
;
result
.
forEach
(
function
(
diff
)
{
if
(
!
$scope
.
hasDiff
)
{
$scope
.
hasDiff
=
diff
.
diffs
.
createItems
.
length
+
diff
.
diffs
.
updateItems
.
length
>
0
;
}
});
$scope
.
syncItemNextStep
(
1
);
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
));
...
...
apollo-portal/src/main/resources/static/styles/common-style.css
浏览文件 @
84cb89ea
...
...
@@ -43,7 +43,6 @@ a {
.footer
{
width
:
100%
;
height
:
75px
;
margin-top
:
-75px
;
padding-top
:
25px
;
}
...
...
apollo-portal/src/main/resources/static/views/app.html
浏览文件 @
84cb89ea
...
...
@@ -75,24 +75,24 @@
</div>
</a>
<
a
class=
"list-group-item"
target=
"_blank"
href=
"/views/app.html?#/appid={{app.appId}}"
>
<
div
class=
"row"
>
<
div
class=
"col-md-2"
><img
src=
"../img/plus.png"
class=
"i-20"
></div
>
<
div
class=
"col-md-7 hidden-xs"
>
<
p
class=
"apps-description"
>
添加集群
</p
>
<
/div
>
<
/div
>
<
/a
>
<
a
class=
"list-group-item"
target=
"_blank"
href=
"/views/app.html?#/appid={{app.appId}}"
>
<
div
class=
"row"
>
<
div
class=
"col-md-2"
><img
src=
"../img/plus.png"
class=
"i-20"
></div
>
<
div
class=
"col-md-7 hidden-xs"
>
<
p
class=
"apps-description"
>
添加Namespace
</p
>
<
/div
>
<
/div
>
<
/a
>
<
!--<a class="list-group-item" target="_blank" href="/views/app.html?#/appid={{app.appId}}">--
>
<
!--<div class="row">--
>
<
!--<div class="col-md-2"><img src="../img/plus.png" class="i-20"></div>--
>
<
!--<div class="col-md-7 hidden-xs">--
>
<
!--<p class="apps-description">添加集群</p>--
>
<
!--</div>--
>
<
!--</div>--
>
<
!--</a>--
>
<
!--<a class="list-group-item" target="_blank" href="/views/app.html?#/appid={{app.appId}}">--
>
<
!--<div class="row">--
>
<
!--<div class="col-md-2"><img src="../img/plus.png" class="i-20"></div>--
>
<
!--<div class="col-md-7 hidden-xs">--
>
<
!--<p class="apps-description">添加Namespace</p>--
>
<
!--</div>--
>
<
!--</div>--
>
<
!--</a>--
>
</section>
</div>
...
...
@@ -114,19 +114,19 @@
ng-disabled=
"namespace.isTextEditing"
ng-click=
"prepareReleaseNamespace(namespace)"
>
发布
</button>
<
button
type=
"button"
class=
"btn btn-default btn-sm J_tableview_btn"
>
回滚
<
/button
>
<
button
type=
"button"
class=
"btn btn-default btn-sm J_historyview_btn"
>
查看历史版本
<
/button
>
<
!--<button type="button"-->
<!--class="btn btn-default btn-sm J_tableview_btn">回滚-->
<
!--</button>--
>
<
!--<button type="button"-->
<!--class="btn btn-default btn-sm J_historyview_btn">--
>
<!--查看历史版本-->
<
!--</button>--
>
</div>
<div
class=
"btn-group"
role=
"group"
aria-label=
"..."
>
<div
class=
"btn-group"
role=
"group"
>
<
button
type=
"button"
class=
"btn btn-default btn-sm J_tableview_btn"
>
授权
<
/button
>
<
!--<button type="button"-->
<!--class="btn btn-default btn-sm J_tableview_btn">授权-->
<
!--</button>--
>
<a
type=
"button"
target=
"_blank"
href=
"sync.html?#/appid={{pageContext.appId}}&env={{pageContext.env}}&clusterName={{pageContext.clusterName}}&namespaceName={{namespace.namespace.namespaceName}}"
class=
"btn btn-default btn-sm J_tableview_btn"
>
同步
...
...
@@ -142,11 +142,11 @@
class=
"btn btn-default btn-sm J_tableview_btn"
ng-click=
"switchView(namespace, 'table')"
>
表格
</button>
<
button
type=
"button"
class=
"btn btn-default btn-sm J_historyview_btn"
ng-click=
"switchView(namespace, 'history')"
>
更改日志
<
/button
>
<
!--<button type="button"-->
<!--class="btn btn-default btn-sm J_historyview_btn"-->
<!--ng-click="switchView(namespace, 'history')">--
>
<!--更改日志-->
<
!--</button>--
>
</div>
</div>
</div>
...
...
@@ -202,16 +202,21 @@
</thead>
<tbody>
<tr
title=
"点击查看"
data-toggle=
"modal"
data-target=
"#oldValueModal"
ng-repeat=
"config in namespace.items"
ng-class=
"{warning:config.modified}"
ng-if=
"config.item.key"
ng-click=
"watchItem(config.item.key, config.item.value, config.oldValue)"
>
<tr
title=
"点击查看"
data-toggle=
"modal"
data-target=
"#oldValueModal"
ng-repeat=
"config in namespace.items"
ng-class=
"{warning:config.modified}"
ng-if=
"config.item.key"
ng-click=
"watchItem(config.item.key, config.item.value, config.oldValue)"
>
<td
width=
"25%"
>
{{config.item.key | limitTo: 20}} {{config.item.key.length > 20 ? '...' : ''}}
{{config.item.key | limitTo: 20}} {{config.item.key.length > 20 ? '...' :
''}}
</td>
<td
width=
"30%"
>
{{config.item.value | limitTo: 20}} {{config.item.value.length > 20 ? '...' : ''}}
{{config.item.value | limitTo: 20}} {{config.item.value.length > 20 ? '...'
: ''}}
</td>
<td
width=
"20%"
>
{{config.item.comment | limitTo: 20}} {{config.item.comment.length > 20 ? '...' : ''}}
{{config.item.comment | limitTo: 20}} {{config.item.comment.length > 20 ?
'...' : ''}}
</td>
<td
width=
"10%"
>
{{config.item.lastModifiedBy}}
...
...
@@ -334,7 +339,8 @@
<h4
class=
"modal-title"
>
发布
</h4>
</div>
<div
class=
"modal-body"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"input release title"
ng-model=
"releaseTitle"
required=
"required"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"input release title"
ng-model=
"releaseTitle"
required=
"required"
>
<textarea
rows=
"4"
class=
"form-control"
style=
"margin-top: 15px;"
ng-model=
"releaseComment"
placeholder=
"input release log...."
></textarea>
</div>
...
...
@@ -377,9 +383,7 @@
</div>
</div>
</div>
</div>
</div>
...
...
apollo-portal/src/main/resources/static/views/sync.html
浏览文件 @
84cb89ea
...
...
@@ -10,28 +10,28 @@
<title>
同步配置
</title>
</head>
<body
ng-controller=
"SyncItemController"
>
<body>
<div
ng-include=
"'common/nav.html'"
></div>
<div
class=
"container-fluid apollo-container"
>
<div
class=
"container-fluid apollo-container"
ng-controller=
"SyncItemController"
>
<section
class=
"panel col-md-offset-1 col-md-10"
>
<header
class=
"panel-heading"
>
<div
class=
"row"
>
<div
class=
"col-md-
3
"
>
<div
class=
"col-md-
7
"
>
<h4
class=
"modal-title"
>
同步配置
<small
ng-show=
"syncItemStep == 1"
>
(第一步:选择同步信息)
</small>
<small
ng-show=
"syncItemStep == 2"
>
(第二步:检查Diff)
</small>
</h4>
</div>
<div
class=
"col-md-
9
text-right"
>
<div
class=
"col-md-
5
text-right"
>
<button
type=
"button"
class=
"btn btn-primary"
ng-show=
"syncItemStep > 1 && syncItemStep < 3"
ng-click=
"syncItemNextStep(-1)"
>
上一步
</button>
<button
type=
"button"
class=
"btn btn-primary"
ng-show=
"syncItemStep < 2"
ng-click=
"diff()"
>
下一步
</button>
<button
type=
"button"
class=
"btn btn-success"
ng-show=
"syncItemStep == 2"
ng-click=
"syncItems()"
>
同步
<button
type=
"button"
class=
"btn btn-success"
ng-show=
"syncItemStep == 2
&& hasDiff
"
ng-click=
"syncItems()"
>
同步
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
ng-show=
"syncItemStep == 3"
ng-click=
"backToAppHomePage()"
>
返回
...
...
@@ -88,8 +88,8 @@
<tr
ng-repeat=
"item in sourceItems"
>
<td
width=
"10%"
><input
type=
"checkbox"
ng-checked=
"item.checked"
ng-click=
"switchSelect(item)"
></td>
<td
width=
"20%"
>
{{item.key}}
</td>
<td
width=
"50%"
>
{{item.value | limitTo:
36}} {{item.value.length > 36
? '...' : ''}}
<td
width=
"20%"
>
{{item.key
| limitTo: 30}} {{item.key.length > 30 ? '...' : ''
}}
</td>
<td
width=
"50%"
>
{{item.value | limitTo:
45}} {{item.value.length > 45
? '...' : ''}}
</td>
<td
width=
"20%"
>
{{item.comment | limitTo: 15}}{{item.comment.length > 15 ? '...' :
''}}
...
...
@@ -105,11 +105,11 @@
<!--step 2-->
<div
class=
"row"
ng-show=
"syncItemStep == 2"
ng-repeat=
"diff in diffs"
>
<h4
class=
"text-center"
>
环境:{{diff.namespace.env}} 集群:{{diff.namespace.clusterName}}
</h4>
<h4
class=
"text-center"
>
环境:{{diff.namespace.env}} 集群:{{diff.namespace.clusterName}}
<em
ng-show=
"diff.diffs.createItems.length == 0 && diff.diffs.updateItems.length == 0"
>
没有更新的配置
</em>
</h4>
<hr>
<div
class=
"row text-center"
style=
"margin-top: 10px;"
ng-show=
"diff.diffs.createItems.length == 0 && diff.diffs.updateItems.length == 0"
>
<h5>
无更新的配置
</h5>
</div>
<div
class=
"row"
style=
"margin-top: 10px;"
ng-show=
"diff.diffs.createItems.length > 0"
>
<div
class=
"form-horizontal"
>
<label
class=
"col-sm-2 control-label"
>
新增的配置
</label>
...
...
@@ -164,11 +164,11 @@
<!--step 3-->
<div
class=
"row text-center"
ng-show=
"syncItemStep == 3 && syncSuccess"
>
<img
src=
"../img/sync-succ.png"
style=
"height: 100px; width: 100px"
>
<h3
>
同步成功!
</h3>
<h3>
同步成功!
</h3>
</div>
<div
class=
"row text-center"
ng-show=
"syncItemStep == 3 && !syncSuccess"
>
<img
src=
"../img/sync-error.png"
style=
"height: 100px; width: 100px"
>
<h3
>
同步失败!
</h3>
<h3>
同步失败!
</h3>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录