Commit c18edfac by lepdou

update

parent 81e7900d
package com.ctrip.framework.apollo.portal.enums; package com.ctrip.framework.apollo.portal.enums;
public enum ChangeType { public enum ChangeType {
ADD, MODIFY, DELETE ADDED, MODIFIED, DELETED
} }
...@@ -101,10 +101,10 @@ public class ReleaseService { ...@@ -101,10 +101,10 @@ public class ReleaseService {
String secondValue = secondItems.get(key); String secondValue = secondItems.get(key);
//added //added
if (secondValue == null) { if (secondValue == null) {
compareResult.addEntityPair(ChangeType.DELETE, new KVEntity(key, firstValue), compareResult.addEntityPair(ChangeType.DELETED, new KVEntity(key, firstValue),
new KVEntity(key, secondValue)); new KVEntity(key, secondValue));
} else if (!Objects.equal(firstValue, secondValue)) { } else if (!Objects.equal(firstValue, secondValue)) {
compareResult.addEntityPair(ChangeType.MODIFY, new KVEntity(key, firstValue), compareResult.addEntityPair(ChangeType.MODIFIED, new KVEntity(key, firstValue),
new KVEntity(key, secondValue)); new KVEntity(key, secondValue));
} }
...@@ -116,7 +116,7 @@ public class ReleaseService { ...@@ -116,7 +116,7 @@ public class ReleaseService {
String value = entry.getValue(); String value = entry.getValue();
if (firstItems.get(key) == null) { if (firstItems.get(key) == null) {
compareResult compareResult
.addEntityPair(ChangeType.ADD, new KVEntity(key, ""), new KVEntity(key, value)); .addEntityPair(ChangeType.ADDED, new KVEntity(key, ""), new KVEntity(key, value));
} }
} }
......
...@@ -370,9 +370,9 @@ ...@@ -370,9 +370,9 @@
<tr ng-repeat="change in releaseCompareResult"> <tr ng-repeat="change in releaseCompareResult">
<td width="10%"> <td width="10%">
<span ng-show="change.type == 'ADD'">新增</span> <span ng-show="change.type == 'ADDED'">新增</span>
<span ng-show="change.type == 'MODIFY'">更新</span> <span ng-show="change.type == 'MODIFIED'">更新</span>
<span ng-show="change.type == 'DELETE'">删除</span> <span ng-show="change.type == 'DELETED'">删除</span>
</td> </td>
<td width="20%" ng-bind="change.entity.firstEntity.key"> <td width="20%" ng-bind="change.entity.firstEntity.key">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment