13
0
forked from github/dataease

fix: [数据源]数据源创建、编辑时,进行数据源的校验,出现两个loading,需去掉一个。

This commit is contained in:
taojinlong 2024-10-30 17:21:37 +08:00
parent 7ecebf5ff4
commit eef2bb8773
3 changed files with 8 additions and 5 deletions
core
core-backend/src/main/java/io/dataease
config
datasource/provider
core-frontend/src/views/visualized/data/datasource/form

View File

@ -14,7 +14,7 @@ public class CommonConfig {
@Bean(destroyMethod = "shutdown")
public CommonThreadPool resourcePoolThreadPool() {
CommonThreadPool commonThreadPool = new CommonThreadPool();
commonThreadPool.setCorePoolSize(20);
commonThreadPool.setCorePoolSize(50);
commonThreadPool.setMaxQueueSize(100);
commonThreadPool.setKeepAliveSeconds(3600);
return commonThreadPool;

View File

@ -1391,11 +1391,14 @@ public class CalciteProvider extends Provider {
Connection connection = take();
CalciteConnection calciteConnection = connection.unwrap(CalciteConnection.class);
SchemaPlus rootSchema = calciteConnection.getRootSchema();
if (rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)) == null) {
DEException.throwException("请检查数据源的有效性!");
}
JdbcSchema jdbcSchema = rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)).unwrap(JdbcSchema.class);
BasicDataSource basicDataSource = (BasicDataSource) jdbcSchema.getDataSource();
return basicDataSource.getConnection();
} catch (Exception e) {
DEException.throwException("连接无效");
DEException.throwException("连接无效, " + e.getMessage());
}
return null;
}

View File

@ -710,7 +710,7 @@ defineExpose({
<Icon name="icon_close_outlined"><icon_close_outlined class="svg-icon" /></Icon>
</el-icon>
</template>
<div class="datasource">
<div class="datasource" v-loading="dsLoading">
<div class="ds-type-select" v-if="!editDs">
<div class="title">
<el-input
@ -778,7 +778,7 @@ defineExpose({
</template>
</el-tree>
</div>
<div class="ds-editor" :class="editDs && 'edit-ds'" v-loading="dsLoading">
<div class="ds-editor" :class="editDs && 'edit-ds'">
<div v-show="activeStep !== 0 && !editDs" class="ds-type-title">
{{ typeTitle }}
</div>
@ -816,7 +816,7 @@ defineExpose({
</template>
</div>
</div>
<div class="editor-footer" v-loading="dsLoading">
<div class="editor-footer">
<el-button secondary @click="beforeClose"> {{ t('common.cancel') }}</el-button>
<el-button
v-show="!(activeStep === 0 || (editDs && activeApiStep <= 1))"