You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/03/31 02:49:18 UTC

[GitHub] [incubator-shardingsphere] menghaoranss commented on a change in pull request #5007: Fixes Issue3265

menghaoranss commented on a change in pull request #5007: Fixes Issue3265
URL: https://github.com/apache/incubator-shardingsphere/pull/5007#discussion_r400611088
 
 

 ##########
 File path: shardingsphere-ui/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/CenterConfigServiceImpl.java
 ##########
 @@ -102,6 +103,28 @@ public CenterConfigs loadAll(String orchestrationType) {
         return result;
     }
     
+    @Override
+    public void update(CenterConfigDTO config) {
+        CenterConfigs configs = loadAll();
+        if (!config.getPrimaryName().equals(config.getName())) {
+            CenterConfig existedConfig = find(config.getName(), config.getOrchestrationType(), configs);
+            if (null != existedConfig) {
+                throw new ShardingSphereUIException(ShardingSphereUIException.SERVER_ERROR, "Center already existed!");
 
 Review comment:
   fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services