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/06/22 06:27:34 UTC

[GitHub] [shardingsphere-ui] menghaoranss commented on a change in pull request #1: support etcd config center #5972

menghaoranss commented on a change in pull request #1:
URL: https://github.com/apache/shardingsphere-ui/pull/1#discussion_r443340179



##########
File path: shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/CenterRepositoryFactory.java
##########
@@ -91,7 +102,7 @@ private static CenterConfiguration convert(final CenterConfig config) {
         CenterConfiguration result = new CenterConfiguration(config.getInstanceType(), new Properties());
         result.setServerLists(config.getServerLists());
         result.setNamespace(config.getNamespace());
-        result.getProps().put("digest", config.getDigest());
+        result.getProperties().put("digest", config.getDigest());

Review comment:
       May be need `install` the local master branch first.

##########
File path: shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/CenterRepositoryFactory.java
##########
@@ -91,7 +102,7 @@ private static CenterConfiguration convert(final CenterConfig config) {
         CenterConfiguration result = new CenterConfiguration(config.getInstanceType(), new Properties());
         result.setServerLists(config.getServerLists());
         result.setNamespace(config.getNamespace());
-        result.getProps().put("digest", config.getDigest());
+        result.getProperties().put("digest", config.getDigest());

Review comment:
       The lastest code of master branch has been changed from `Properties` to `Props`, please check.

##########
File path: shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/ConfigurationYamlConverter.java
##########
@@ -88,7 +88,7 @@ public static MasterSlaveRuleConfiguration loadMasterSlaveRuleConfiguration(fina
      * @return authentication
      */
     public static Authentication loadAuthentication(final String data) {
-        return new AuthenticationYamlSwapper().swapToObject(YamlEngine.unmarshal(data, YamlAuthenticationConfiguration.class));
+        return new AuthenticationYamlSwapper().swap(YamlEngine.unmarshal(data, YamlAuthenticationConfiguration.class));

Review comment:
       Same as above.

##########
File path: shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/ConfigurationYamlConverter.java
##########
@@ -54,7 +54,7 @@
     public static Map<String, DataSourceConfiguration> loadDataSourceConfigurations(final String data) {
         Map<String, YamlDataSourceConfiguration> result = (Map) YamlEngine.unmarshal(data);
         Preconditions.checkState(null != result && !result.isEmpty(), "No available data sources to load for orchestration.");
-        return Maps.transformValues(result, new DataSourceConfigurationYamlSwapper()::swapToObject);
+        return Maps.transformValues(result, new DataSourceConfigurationYamlSwapper()::swap);

Review comment:
       The lastest code of master branch is `swapToObject`.




----------------------------------------------------------------
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