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
c18edfac
Commit
c18edfac
authored
Jul 28, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
81e7900d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
ChangeType.java
...a/com/ctrip/framework/apollo/portal/enums/ChangeType.java
+1
-1
ReleaseService.java
...ctrip/framework/apollo/portal/service/ReleaseService.java
+3
-3
config.html
apollo-portal/src/main/resources/static/config.html
+3
-3
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/enums/ChangeType.java
View file @
c18edfac
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
enums
;
public
enum
ChangeType
{
ADD
,
MODIFY
,
DELETE
ADD
ED
,
MODIFIED
,
DELETED
}
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ReleaseService.java
View file @
c18edfac
...
...
@@ -101,10 +101,10 @@ public class ReleaseService {
String
secondValue
=
secondItems
.
get
(
key
);
//added
if
(
secondValue
==
null
)
{
compareResult
.
addEntityPair
(
ChangeType
.
DELETE
,
new
KVEntity
(
key
,
firstValue
),
compareResult
.
addEntityPair
(
ChangeType
.
DELETE
D
,
new
KVEntity
(
key
,
firstValue
),
new
KVEntity
(
key
,
secondValue
));
}
else
if
(!
Objects
.
equal
(
firstValue
,
secondValue
))
{
compareResult
.
addEntityPair
(
ChangeType
.
MODIF
Y
,
new
KVEntity
(
key
,
firstValue
),
compareResult
.
addEntityPair
(
ChangeType
.
MODIF
IED
,
new
KVEntity
(
key
,
firstValue
),
new
KVEntity
(
key
,
secondValue
));
}
...
...
@@ -116,7 +116,7 @@ public class ReleaseService {
String
value
=
entry
.
getValue
();
if
(
firstItems
.
get
(
key
)
==
null
)
{
compareResult
.
addEntityPair
(
ChangeType
.
ADD
,
new
KVEntity
(
key
,
""
),
new
KVEntity
(
key
,
value
));
.
addEntityPair
(
ChangeType
.
ADD
ED
,
new
KVEntity
(
key
,
""
),
new
KVEntity
(
key
,
value
));
}
}
...
...
apollo-portal/src/main/resources/static/config.html
View file @
c18edfac
...
...
@@ -370,9 +370,9 @@
<tr
ng-repeat=
"change in releaseCompareResult"
>
<td
width=
"10%"
>
<span
ng-show=
"change.type == 'ADD'"
>
新增
</span>
<span
ng-show=
"change.type == 'MODIF
Y
'"
>
更新
</span>
<span
ng-show=
"change.type == 'DELETE'"
>
删除
</span>
<span
ng-show=
"change.type == 'ADD
ED
'"
>
新增
</span>
<span
ng-show=
"change.type == 'MODIF
IED
'"
>
更新
</span>
<span
ng-show=
"change.type == 'DELETE
D
'"
>
删除
</span>
</td>
<td
width=
"20%"
ng-bind=
"change.entity.firstEntity.key"
>
...
...
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