Skip to content

Commit

Permalink
bugfix/fix console portal npe&add credis hetero type (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndi-trip authored Nov 9, 2023
1 parent 5bbda38 commit 3ae2216
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,12 @@ public com.ctrip.xpipe.cluster.ClusterType innerType() {
public com.ctrip.xpipe.cluster.ClusterType innerType() {
return com.ctrip.xpipe.cluster.ClusterType.CROSS_DC;
}
},
HETERO(6) {
@Override
public com.ctrip.xpipe.cluster.ClusterType innerType() {
return com.ctrip.xpipe.cluster.ClusterType.HETERO;
}
};

private Integer intVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ public DcClusterModel findDcClusterModelByClusterAndDc(String clusterName, Strin

result.setShards(shardModelService.getAllShardModel(dcName, clusterName));
ClusterType azGroupType = azGroupClusterRepository.selectAzGroupTypeById(dcClusterTbl.getAzGroupClusterId());
result.setAzGroupClusterType(azGroupType.name());
if (azGroupType != null) {
result.setAzGroupClusterType(azGroupType.name());
}
if (azGroupType == ClusterType.SINGLE_DC) {
result.setSources(sourceModelService.getAllSourceModels(dcName, clusterName));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8962,7 +8962,7 @@ eval("angular\n .module('utils')\n .service('AppUtil', AppUtil);\nAppUtil.
\********************************/
/***/ (() => {

eval("angular\n .module('cluster_type')\n .service('ClusterType', ClusterType);\nfunction ClusterType() {\n return {\n _values: {\n 'one_way': {\n name: '单向同步',\n value: 'one_way',\n multiActiveDcs: false,\n useKeeper: true,\n healthCheck: true,\n supportMigration: true,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'bi_direction': {\n name: '双向同步',\n value: 'bi_direction',\n multiActiveDcs: true,\n useKeeper: false,\n healthCheck: true,\n supportMigration: false,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'single_dc': {\n name: '单机房缓存',\n value: 'single_dc',\n multiActiveDcs: false,\n useKeeper: false,\n healthCheck: false,\n supportMigration: false,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'local_dc': {\n name: '本机房缓存',\n value: 'local_dc',\n multiActiveDcs: true,\n useKeeper: false,\n healthCheck: false,\n supportMigration: false,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'cross_dc': {\n name: '跨机房缓存',\n value: 'cross_dc',\n multiActiveDcs: true,\n useKeeper: false,\n healthCheck: false,\n supportMigration: false,\n isCrossDc: true,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'hetero': {\n name: '异构',\n value: 'hetero',\n multiActiveDcs: false,\n useKeeper: true,\n healthCheck: true,\n supportMigration: true,\n isCrossDc: true,\n supportApplier: false,\n useAzGroupType: true,\n }\n },\n lookup: function (typeName) {\n return (typeName && this._values[typeName.toLowerCase()]) || null;\n },\n values: function () {\n return Object.values(this._values);\n },\n selectData: function () {\n var data = [{ id: \"\", title: \"\" }];\n for (var key in this._values) {\n data.push({\n id: this._values[key].value,\n title: this._values[key].name\n });\n }\n return data;\n },\n default: function () {\n return this._values.one_way;\n }\n };\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/ClusterType.ts?");
eval("angular\n .module('cluster_type')\n .service('ClusterType', ClusterType);\nfunction ClusterType() {\n return {\n _values: {\n 'one_way': {\n name: '单向同步',\n value: 'one_way',\n multiActiveDcs: false,\n useKeeper: true,\n healthCheck: true,\n supportMigration: true,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'bi_direction': {\n name: '双向同步',\n value: 'bi_direction',\n multiActiveDcs: true,\n useKeeper: false,\n healthCheck: true,\n supportMigration: false,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'single_dc': {\n name: '单机房缓存',\n value: 'single_dc',\n multiActiveDcs: false,\n useKeeper: false,\n healthCheck: false,\n supportMigration: false,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'local_dc': {\n name: '本机房缓存',\n value: 'local_dc',\n multiActiveDcs: true,\n useKeeper: false,\n healthCheck: false,\n supportMigration: false,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'cross_dc': {\n name: '跨机房缓存',\n value: 'cross_dc',\n multiActiveDcs: true,\n useKeeper: false,\n healthCheck: false,\n supportMigration: false,\n isCrossDc: true,\n supportApplier: false,\n useAzGroupType: false,\n },\n 'hetero': {\n name: '异构',\n value: 'hetero',\n multiActiveDcs: false,\n useKeeper: true,\n healthCheck: true,\n supportMigration: true,\n isCrossDc: false,\n supportApplier: false,\n useAzGroupType: true,\n }\n },\n lookup: function (typeName) {\n return (typeName && this._values[typeName.toLowerCase()]) || null;\n },\n values: function () {\n return Object.values(this._values);\n },\n selectData: function () {\n var data = [{ id: \"\", title: \"\" }];\n for (var key in this._values) {\n data.push({\n id: this._values[key].value,\n title: this._values[key].name\n });\n }\n return data;\n },\n default: function () {\n return this._values.one_way;\n }\n };\n}\n\n\n//# sourceURL=webpack://XPipe-Console/./scripts/ClusterType.ts?");

/***/ }),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function ClusterType() {
useKeeper: true,
healthCheck: true,
supportMigration: true,
isCrossDc:true,
isCrossDc:false,
supportApplier:false,
useAzGroupType:true,
}
Expand Down

0 comments on commit 3ae2216

Please sign in to comment.