diff --git a/apollo-portal/src/main/resources/static/config/diff.html b/apollo-portal/src/main/resources/static/config/diff.html
index bbfc3098ee5..0bd2adb8922 100644
--- a/apollo-portal/src/main/resources/static/config/diff.html
+++ b/apollo-portal/src/main/resources/static/config/diff.html
@@ -127,10 +127,11 @@
{{'Config.Diff.Title' | translate }}
-
-
+
+
+
- Key |
+ Key |
Value ( {{'Common.Environment' | translate }} : , {{'Common.Cluster' | translate }} : )
|
@@ -142,16 +143,24 @@ {{'Config.Diff.Title' | translate }}
|
-
+ | |
+
+
+
+
+
|
+ ng-bind="(itemsKeyedByCluster[cluster.compositedKey] || {}).comment">
|
+
+
diff --git a/apollo-portal/src/main/resources/static/config/history.html b/apollo-portal/src/main/resources/static/config/history.html
index 9c7d46e7727..cf6d0420e0e 100644
--- a/apollo-portal/src/main/resources/static/config/history.html
+++ b/apollo-portal/src/main/resources/static/config/history.html
@@ -157,11 +157,11 @@
{{'Config.History.ChangedItem' | translate }}
-
+
- {{'Config.History.ChangeType' | translate }} |
- {{'Config.History.ChangeKey' | translate }} |
+ {{'Config.History.ChangeType' | translate }} |
+ {{'Config.History.ChangeKey' | translate }} |
{{'Config.History.ChangeOldValue' | translate }} |
{{'Config.History.ChangeNewValue' | translate }} |
@@ -188,11 +188,14 @@ {{'Config.History.ChangedItem' | translate }}
-
-
-
+
+
+
+
|
diff --git a/apollo-portal/src/main/resources/static/i18n/zh-CN.json b/apollo-portal/src/main/resources/static/i18n/zh-CN.json
index 8ae676eda59..f9f82e28dfe 100644
--- a/apollo-portal/src/main/resources/static/i18n/zh-CN.json
+++ b/apollo-portal/src/main/resources/static/i18n/zh-CN.json
@@ -291,10 +291,10 @@
"Component.Publish.ToSeeChange": "查看变更",
"Component.Publish.CompareWithMasterValue": "与主版本对比",
"Component.Publish.CompareWithPublishedValue": "与已发布对比",
- "Component.Publish.PublishedValue": "待发布的值",
- "Component.Publish.Changes": "Changes",
+ "Component.Publish.PublishedValue": "已发布的值",
+ "Component.Publish.Changes": "改动",
"Component.Publish.Key": "Key",
- "Component.Publish.NoPublishedValue": "未发布的值",
+ "Component.Publish.NoPublishedValue": "待发布的值",
"Component.Publish.ModifyUser": "修改人",
"Component.Publish.ModifyTime": "修改时间",
"Component.Publish.NewAdded": "新",
@@ -310,8 +310,8 @@
"Component.Publish.ItemNoChange": "配置没有变化",
"Component.Publish.GrayItemNoChange": "灰度配置没有变化",
"Component.Publish.NoGrayItems": "没有灰度的配置项",
- "Component.Publish.Release": "Release Name",
- "Component.Publish.ReleaseComment": "Comment",
+ "Component.Publish.Release": "版本名称",
+ "Component.Publish.ReleaseComment": "说明",
"Component.Publish.OpPublish": "发布",
"Component.Rollback.To": "回滚到",
"Component.Rollback.Tips": "此操作将会回滚到上一个发布版本,且当前版本作废,但不影响正在修改的配置。可在发布历史页面查看当前生效的版本",
@@ -731,11 +731,11 @@
"Config.History.ChangedItemTips": "查看此次发布与上次版本的变更",
"Config.History.AllItem": "全部配置",
"Config.History.AllItemTips": "查看此次发布的所有配置信息",
- "Config.History.ChangeType": "Type",
+ "Config.History.ChangeType": "类型",
"Config.History.ChangeKey": "Key",
- "Config.History.ChangeValue": "Value",
- "Config.History.ChangeOldValue": "Old Value",
- "Config.History.ChangeNewValue": "New Value",
+ "Config.History.ChangeValue": "值",
+ "Config.History.ChangeOldValue": "旧值",
+ "Config.History.ChangeNewValue": "新值",
"Config.History.ChangeTypeNew": "新增",
"Config.History.ChangeTypeModify": "修改",
"Config.History.ChangeTypeDelete": "删除",
diff --git a/apollo-portal/src/main/resources/static/scripts/controller/config/DiffConfigController.js b/apollo-portal/src/main/resources/static/scripts/controller/config/DiffConfigController.js
index 488169ac3c0..7354ac670cb 100644
--- a/apollo-portal/src/main/resources/static/scripts/controller/config/DiffConfigController.js
+++ b/apollo-portal/src/main/resources/static/scripts/controller/config/DiffConfigController.js
@@ -164,17 +164,19 @@ diff_item_module.controller("DiffItemController",
function parseSyncSourceData() {
var syncData = {
syncToNamespaces: [],
- syncItems: []
+ syncItems: [],
+ firstClusterKey: "",
};
var namespaceName = $scope.pageContext.namespaceName;
selectedClusters.forEach(function (cluster) {
if (cluster.checked) {
cluster.clusterName = cluster.name;
cluster.namespaceName = namespaceName;
+ cluster.compositedKey = cluster.env + ':' + cluster.clusterName + ':' + cluster.namespaceName;
syncData.syncToNamespaces.push(cluster);
}
});
-
+ syncData.firstClusterKey = selectedClusters[0].compositedKey;
return syncData;
}
diff --git a/apollo-portal/src/main/resources/static/scripts/directive/diff-directive.js b/apollo-portal/src/main/resources/static/scripts/directive/diff-directive.js
index b78525faf81..b9cdc7aaa2b 100644
--- a/apollo-portal/src/main/resources/static/scripts/directive/diff-directive.js
+++ b/apollo-portal/src/main/resources/static/scripts/directive/diff-directive.js
@@ -60,6 +60,7 @@ directive_module.directive('apollodiff',
part.removed ? 'red' : 'grey';
span = document.createElement('span');
span.style.color = color;
+ span.style.display = 'block';
pre = part.added ? '+' :
part.removed ? '-' : '';
span.appendChild(document.createTextNode(pre + part.value));
diff --git a/apollo-portal/src/main/resources/static/styles/common-style.css b/apollo-portal/src/main/resources/static/styles/common-style.css
index fe92365f48c..b396156c687 100644
--- a/apollo-portal/src/main/resources/static/styles/common-style.css
+++ b/apollo-portal/src/main/resources/static/styles/common-style.css
@@ -95,7 +95,7 @@ p, td, span {
color: #797979;
}
-pre, .pre {
+pre {
white-space: pre-wrap; /* Since CSS 2.1 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
@@ -103,6 +103,10 @@ pre, .pre {
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
+.pre {
+ white-space: pre;
+}
+
.hover:hover {
background: #f5f5f5;
cursor: pointer
@@ -1172,4 +1176,13 @@ table th {
#consumer-list .create-btn img {
width: 16px;
height: 16px;
+}
+
+.left-overflow {
+ overflow-x: auto;
+ text-align: left;
+}
+
+.table-fixed{
+ table-layout: fixed;
}
\ No newline at end of file
diff --git a/apollo-portal/src/main/resources/static/views/component/diff.html b/apollo-portal/src/main/resources/static/views/component/diff.html
index 3e36e174add..0caebc37bd7 100644
--- a/apollo-portal/src/main/resources/static/views/component/diff.html
+++ b/apollo-portal/src/main/resources/static/views/component/diff.html
@@ -1,4 +1,4 @@
-
+
-
+
@@ -78,7 +78,7 @@
{{'Component.Publish.NoPublishedValue' | translate }}
@@ -108,8 +108,8 @@
-
-
+ |
+
|
|
@@ -121,11 +121,12 @@
-
+ |
{{'Component.Publish.Key' | translate }}
|
@@ -137,10 +138,10 @@
{{'Component.Publish.ModifyUser' | translate }}
|
-
+ |
{{'Component.Publish.ModifyTime' | translate }}
|
@@ -159,8 +160,14 @@
-
-
+ |
+
+
+
+
+
+
+
|
|
@@ -172,7 +179,8 @@
@@ -182,7 +190,7 @@
{{'Component.Publish.MasterValue' | translate }}
-
+ |
{{'Component.Publish.GrayValue' | translate }}
|
@@ -207,8 +215,8 @@
-
-
+ |
+
|
|
| |