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
2f451b88
Commit
2f451b88
authored
Jun 24, 2016
by
Jason Song
Committed by
GitHub
Jun 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #293 from lepdou/0620_27
change history type
parents
5410b4e8
5737e4c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
25 deletions
+28
-25
cluster.html
apollo-portal/src/main/resources/static/cluster.html
+8
-3
config.html
apollo-portal/src/main/resources/static/config.html
+6
-14
ClusterController.js
.../resources/static/scripts/controller/ClusterController.js
+10
-2
directive.js
apollo-portal/src/main/resources/static/scripts/directive.js
+4
-6
No files found.
apollo-portal/src/main/resources/static/cluster.html
View file @
2f451b88
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</header>
</header>
<div
class=
"panel-body"
>
<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"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
<label
class=
"col-sm-2 control-label"
>
<apollorequiredfiled></apollorequiredfiled>
<apollorequiredfiled></apollorequiredfiled>
...
@@ -57,8 +57,9 @@
...
@@ -57,8 +57,9 @@
<div
class=
"col-sm-5"
>
<div
class=
"col-sm-5"
>
<table
class=
"table table-hover"
style=
"width: 100px"
>
<table
class=
"table table-hover"
style=
"width: 100px"
>
<tbody>
<tbody>
<tr
style=
"cursor: pointer"
ng-repeat=
"env in envs"
>
<tr
style=
"cursor: pointer"
ng-repeat=
"env in envs"
ng-click=
"toggleEnvCheckedStatus(env)"
>
<td
width=
"10%"
><input
type=
"checkbox"
ng-click=
"switchChecked(env)"
></td>
<td
width=
"10%"
><input
type=
"checkbox"
ng-checked=
"env.checked"
ng-click=
"switchChecked(env, $event)"
></td>
<td
width=
"30%"
ng-bind=
"env.name"
></td>
<td
width=
"30%"
ng-bind=
"env.name"
></td>
</tr>
</tr>
</tbody>
</tbody>
...
@@ -73,6 +74,10 @@
...
@@ -73,6 +74,10 @@
</div>
</div>
</div>
</div>
</form>
</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>
</div>
</div>
</div>
...
...
apollo-portal/src/main/resources/static/config.html
View file @
2f451b88
...
@@ -269,14 +269,6 @@
...
@@ -269,14 +269,6 @@
<!--历史修改视图-->
<!--历史修改视图-->
<div
class=
"J_historyview history-view"
ng-show=
"namespace.viewType == 'history'"
>
<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"
ng-repeat=
"commits in namespace.commits"
>
<div
class=
"media-body"
>
<div
class=
"media-body"
>
...
@@ -311,8 +303,8 @@
...
@@ -311,8 +303,8 @@
<tr
ng-repeat=
"item in commits.changeSets.createItems"
<tr
ng-repeat=
"item in commits.changeSets.createItems"
ng-show=
"item.key || item.comment"
>
ng-show=
"item.key || item.comment"
>
<td
width=
"2%"
title=
"新增的配置"
>
<td
width=
"2%"
>
<span
class=
"label label-primary change-type-mark"
>
</span>
新增
</td>
</td>
<td
width=
"20%"
title=
"{{item.key}}"
>
<td
width=
"20%"
title=
"{{item.key}}"
>
...
@@ -331,8 +323,8 @@
...
@@ -331,8 +323,8 @@
</td>
</td>
</tr>
</tr>
<tr
ng-repeat=
"item in commits.changeSets.updateItems"
>
<tr
ng-repeat=
"item in commits.changeSets.updateItems"
>
<td
width=
"2%"
title=
"更新的配置"
>
<td
width=
"2%"
>
<span
class=
"label label-info change-type-mark"
>
</span>
更新
</td>
</td>
<td
width=
"20%"
title=
"{{item.newItem.key}}"
>
<td
width=
"20%"
title=
"{{item.newItem.key}}"
>
<span
ng-bind=
"item.newItem.key | limitTo: 250"
></span>
<span
ng-bind=
"item.newItem.key | limitTo: 250"
></span>
...
@@ -353,8 +345,8 @@
...
@@ -353,8 +345,8 @@
</tr>
</tr>
<tr
ng-repeat=
"item in commits.changeSets.deleteItems"
<tr
ng-repeat=
"item in commits.changeSets.deleteItems"
ng-show=
"item.key || item.comment"
>
ng-show=
"item.key || item.comment"
>
<td
width=
"2%"
title=
"删除的配置"
>
<td
width=
"2%"
>
<span
class=
"label label-danger change-type-mark"
>
</span>
删除
</td>
</td>
<td
width=
"20%"
title=
"{{item.key}}"
>
<td
width=
"20%"
title=
"{{item.key}}"
>
<span
ng-bind=
"item.key | limitTo: 250"
></span>
<span
ng-bind=
"item.key | limitTo: 250"
></span>
...
...
apollo-portal/src/main/resources/static/scripts/controller/ClusterController.js
View file @
2f451b88
...
@@ -7,6 +7,8 @@ cluster_module.controller('ClusterController',
...
@@ -7,6 +7,8 @@ cluster_module.controller('ClusterController',
var
params
=
AppUtil
.
parseParams
(
$location
.
$$url
);
var
params
=
AppUtil
.
parseParams
(
$location
.
$$url
);
$scope
.
appId
=
params
.
appid
;
$scope
.
appId
=
params
.
appid
;
$scope
.
step
=
1
;
EnvService
.
find_all_envs
().
then
(
function
(
result
)
{
EnvService
.
find_all_envs
().
then
(
function
(
result
)
{
$scope
.
envs
=
[];
$scope
.
envs
=
[];
result
.
forEach
(
function
(
env
)
{
result
.
forEach
(
function
(
env
)
{
...
@@ -19,7 +21,12 @@ cluster_module.controller('ClusterController',
...
@@ -19,7 +21,12 @@ cluster_module.controller('ClusterController',
$scope
.
clusterName
=
''
;
$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
;
env
.
checked
=
!
env
.
checked
;
};
};
...
@@ -34,11 +41,12 @@ cluster_module.controller('ClusterController',
...
@@ -34,11 +41,12 @@ cluster_module.controller('ClusterController',
appId
:
$scope
.
appId
appId
:
$scope
.
appId
}).
then
(
function
(
result
)
{
}).
then
(
function
(
result
)
{
toastr
.
success
(
env
.
name
,
"集群创建成功"
);
toastr
.
success
(
env
.
name
,
"集群创建成功"
);
$scope
.
step
=
2
;
},
function
(
result
)
{
},
function
(
result
)
{
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"集群创建失败"
);
toastr
.
error
(
AppUtil
.
errorMsg
(
result
),
"集群创建失败"
);
})
})
}
}
})
})
;
if
(
noEnvChecked
){
if
(
noEnvChecked
){
toastr
.
warning
(
"请选择环境"
);
toastr
.
warning
(
"请选择环境"
);
...
...
apollo-portal/src/main/resources/static/scripts/directive.js
View file @
2f451b88
...
@@ -131,14 +131,13 @@ directive_module.directive('apolloclusterselector', function ($compile, $window,
...
@@ -131,14 +131,13 @@ directive_module.directive('apolloclusterselector', function ($compile, $window,
defaultCheckedCluster
:
'=apolloDefaultCheckedCluster'
defaultCheckedCluster
:
'=apolloDefaultCheckedCluster'
},
},
link
:
function
(
scope
,
element
,
attrs
)
{
link
:
function
(
scope
,
element
,
attrs
)
{
////// load env //////
scope
.
$watch
(
"defaultCheckedEnv"
,
refreshClusterList
);
scope
.
$watch
(
"defaultCheckedEnv"
,
function
(
newValue
,
oldValue
)
{
scope
.
$watch
(
"defaultCheckedCluster"
,
refreshClusterList
);
refreshClusterList
();
});
refreshClusterList
();
refreshClusterList
();
////// load env //////
function
refreshClusterList
()
{
function
refreshClusterList
()
{
AppService
.
load_nav_tree
(
scope
.
appId
).
then
(
function
(
result
)
{
AppService
.
load_nav_tree
(
scope
.
appId
).
then
(
function
(
result
)
{
scope
.
clusters
=
[];
scope
.
clusters
=
[];
...
@@ -246,7 +245,6 @@ directive_module.directive('apolloentrance', function ($compile, $window) {
...
@@ -246,7 +245,6 @@ directive_module.directive('apolloentrance', function ($compile, $window) {
href
:
'=apolloHref'
href
:
'=apolloHref'
},
},
link
:
function
(
scope
,
element
,
attrs
)
{
link
:
function
(
scope
,
element
,
attrs
)
{
console
.
log
(
scope
.
title
);
}
}
}
}
});
});
...
...
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