forked from github/dataease
fix: [数据源]数据源创建、编辑时,进行数据源的校验,出现两个loading,需去掉一个。
This commit is contained in:
parent
7ecebf5ff4
commit
eef2bb8773
@ -14,7 +14,7 @@ public class CommonConfig {
|
|||||||
@Bean(destroyMethod = "shutdown")
|
@Bean(destroyMethod = "shutdown")
|
||||||
public CommonThreadPool resourcePoolThreadPool() {
|
public CommonThreadPool resourcePoolThreadPool() {
|
||||||
CommonThreadPool commonThreadPool = new CommonThreadPool();
|
CommonThreadPool commonThreadPool = new CommonThreadPool();
|
||||||
commonThreadPool.setCorePoolSize(20);
|
commonThreadPool.setCorePoolSize(50);
|
||||||
commonThreadPool.setMaxQueueSize(100);
|
commonThreadPool.setMaxQueueSize(100);
|
||||||
commonThreadPool.setKeepAliveSeconds(3600);
|
commonThreadPool.setKeepAliveSeconds(3600);
|
||||||
return commonThreadPool;
|
return commonThreadPool;
|
||||||
|
@ -1391,11 +1391,14 @@ public class CalciteProvider extends Provider {
|
|||||||
Connection connection = take();
|
Connection connection = take();
|
||||||
CalciteConnection calciteConnection = connection.unwrap(CalciteConnection.class);
|
CalciteConnection calciteConnection = connection.unwrap(CalciteConnection.class);
|
||||||
SchemaPlus rootSchema = calciteConnection.getRootSchema();
|
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);
|
JdbcSchema jdbcSchema = rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)).unwrap(JdbcSchema.class);
|
||||||
BasicDataSource basicDataSource = (BasicDataSource) jdbcSchema.getDataSource();
|
BasicDataSource basicDataSource = (BasicDataSource) jdbcSchema.getDataSource();
|
||||||
return basicDataSource.getConnection();
|
return basicDataSource.getConnection();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
DEException.throwException("连接无效");
|
DEException.throwException("连接无效, " + e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -710,7 +710,7 @@ defineExpose({
|
|||||||
<Icon name="icon_close_outlined"><icon_close_outlined class="svg-icon" /></Icon>
|
<Icon name="icon_close_outlined"><icon_close_outlined class="svg-icon" /></Icon>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
<div class="datasource">
|
<div class="datasource" v-loading="dsLoading">
|
||||||
<div class="ds-type-select" v-if="!editDs">
|
<div class="ds-type-select" v-if="!editDs">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<el-input
|
<el-input
|
||||||
@ -778,7 +778,7 @@ defineExpose({
|
|||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</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">
|
<div v-show="activeStep !== 0 && !editDs" class="ds-type-title">
|
||||||
{{ typeTitle }}
|
{{ typeTitle }}
|
||||||
</div>
|
</div>
|
||||||
@ -816,7 +816,7 @@ defineExpose({
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</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 secondary @click="beforeClose"> {{ t('common.cancel') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-show="!(activeStep === 0 || (editDs && activeApiStep <= 1))"
|
v-show="!(activeStep === 0 || (editDs && activeApiStep <= 1))"
|
||||||
|
Loading…
Reference in New Issue
Block a user