Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
84cb89ea
Commit
84cb89ea
authored
May 05, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐藏没有完成的功能的入口 & 样式优化
parent
1cbe8611
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
58 deletions
+66
-58
close.png
apollo-portal/src/main/resources/static/img/close.png
+0
-0
dolphin.jpg
apollo-portal/src/main/resources/static/img/dolphin.jpg
+0
-0
open.png
apollo-portal/src/main/resources/static/img/open.png
+0
-0
AppConfigController.js
...rces/static/scripts/controller/app/AppConfigController.js
+1
-3
SyncConfigController.js
...ces/static/scripts/controller/app/SyncConfigController.js
+7
-0
common-style.css
...-portal/src/main/resources/static/styles/common-style.css
+0
-1
app.html
apollo-portal/src/main/resources/static/views/app.html
+45
-41
sync.html
apollo-portal/src/main/resources/static/views/sync.html
+13
-13
No files found.
apollo-portal/src/main/resources/static/img/close.png
deleted
100644 → 0
View file @
1cbe8611
2.87 KB
apollo-portal/src/main/resources/static/img/dolphin.jpg
deleted
100644 → 0
View file @
1cbe8611
56.4 KB
apollo-portal/src/main/resources/static/img/open.png
deleted
100644 → 0
View file @
1cbe8611
2.17 KB
apollo-portal/src/main/resources/static/scripts/controller/app/AppConfigController.js
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment