You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2020/09/08 07:44:24 UTC
[shardingsphere-ui] branch master updated: Update datasource
configuration
This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-ui.git
The following commit(s) were added to refs/heads/master by this push:
new f5a1d29 Update datasource configuration
new 5e4d9c2 Merge pull request #13 from menghaoranss/0908
f5a1d29 is described below
commit f5a1d29917368af05516d3f4f8c635c64ce96180
Author: menghaoranss <lo...@163.com>
AuthorDate: Tue Sep 8 15:35:26 2020 +0800
Update datasource configuration
---
.../ui/servcie/impl/ShardingSchemaServiceImpl.java | 2 +-
.../ui/util/ConfigurationYamlConverter.java | 6 +++---
.../src/views/data-scaling/module/index.vue | 22 ++--------------------
.../src/views/rule-config/module/schema.vue | 11 +----------
4 files changed, 7 insertions(+), 34 deletions(-)
diff --git a/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/ShardingSchemaServiceImpl.java b/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/ShardingSchemaServiceImpl.java
index 626d276..3aa2421 100644
--- a/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/ShardingSchemaServiceImpl.java
+++ b/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/ShardingSchemaServiceImpl.java
@@ -22,7 +22,7 @@ import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import org.apache.shardingsphere.governance.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.infra.config.DataSourceConfiguration;
+import org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration;
import org.apache.shardingsphere.ui.servcie.ConfigCenterService;
import org.apache.shardingsphere.ui.servcie.MetadataCenterService;
import org.apache.shardingsphere.ui.servcie.ShardingSchemaService;
diff --git a/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/ConfigurationYamlConverter.java b/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/ConfigurationYamlConverter.java
index 1a03c86..1dd5d59 100644
--- a/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/ConfigurationYamlConverter.java
+++ b/shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/util/ConfigurationYamlConverter.java
@@ -21,13 +21,13 @@ import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSourceConfiguration;
-import org.apache.shardingsphere.governance.core.common.yaml.swapper.DataSourceConfigurationYamlSwapper;
+import org.apache.shardingsphere.governance.core.yaml.config.YamlDataSourceConfiguration;
+import org.apache.shardingsphere.governance.core.yaml.swapper.DataSourceConfigurationYamlSwapper;
import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.auth.yaml.config.YamlAuthenticationConfiguration;
import org.apache.shardingsphere.infra.auth.yaml.swapper.AuthenticationYamlSwapper;
-import org.apache.shardingsphere.infra.config.DataSourceConfiguration;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
+import org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration;
import org.apache.shardingsphere.infra.yaml.config.YamlRootRuleConfigurations;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine;
diff --git a/shardingsphere-ui-frontend/src/views/data-scaling/module/index.vue b/shardingsphere-ui-frontend/src/views/data-scaling/module/index.vue
index a52482b..1f7e077 100644
--- a/shardingsphere-ui-frontend/src/views/data-scaling/module/index.vue
+++ b/shardingsphere-ui-frontend/src/views/data-scaling/module/index.vue
@@ -492,16 +492,7 @@ export default {
},
computed: {
textareaDatasourceCom() {
- const dsYamlType = new yaml.Type(
- 'tag:yaml.org,2002:org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSourceConfiguration',
- {
- kind: 'mapping',
- construct(data) {
- return data !== null ? data : {}
- }
- }
- )
- const DS_SCHEMA = yaml.Schema.create(dsYamlType)
+ const DS_SCHEMA = yaml.Schema.create()
return JSON.stringify(
yaml.load(this.textareaDatasource, { schema: DS_SCHEMA }),
null,
@@ -509,15 +500,6 @@ export default {
)
},
textareaRuleCom() {
- const dsYamlType = new yaml.Type(
- 'tag:yaml.org,2002:org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSourceConfiguration',
- {
- kind: 'mapping',
- construct(data) {
- return data !== null ? data : {}
- }
- }
- )
const shardingYamlType = new yaml.Type(
'!SHARDING',
{
@@ -554,7 +536,7 @@ export default {
}
}
)
- const DS_SCHEMA = yaml.Schema.create([dsYamlType, shardingYamlType, encryptYamlType, masterSlaveYamlType, shadowYamlType])
+ const DS_SCHEMA = yaml.Schema.create([shardingYamlType, encryptYamlType, masterSlaveYamlType, shadowYamlType])
return JSON.stringify(
yaml.load(this.textareaRule, { schema: DS_SCHEMA }),
null,
diff --git a/shardingsphere-ui-frontend/src/views/rule-config/module/schema.vue b/shardingsphere-ui-frontend/src/views/rule-config/module/schema.vue
index b17bd54..9a24377 100644
--- a/shardingsphere-ui-frontend/src/views/rule-config/module/schema.vue
+++ b/shardingsphere-ui-frontend/src/views/rule-config/module/schema.vue
@@ -213,15 +213,6 @@ export default {
},
computed: {
textarea2() {
- const dsYamlType = new yaml.Type(
- 'tag:yaml.org,2002:org.apache.shardingsphere.governance.core.common.yaml.config.YamlDataSourceConfiguration',
- {
- kind: 'mapping',
- construct(data) {
- return data !== null ? data : {}
- }
- }
- )
const shardingYamlType = new yaml.Type(
'!SHARDING',
{
@@ -258,7 +249,7 @@ export default {
}
}
)
- const DS_SCHEMA = yaml.Schema.create([dsYamlType, shardingYamlType, encryptYamlType, masterSlaveYamlType, shadowYamlType])
+ const DS_SCHEMA = yaml.Schema.create([shardingYamlType, encryptYamlType, masterSlaveYamlType, shadowYamlType])
return JSON.stringify(
yaml.load(this.textarea, { schema: DS_SCHEMA }),
null,