fix(数据源): 校验数据源配置的有效性
This commit is contained in:
parent
ad233b2881
commit
e74c3883f0
@ -91,6 +91,10 @@ public class DatasourceService {
|
||||
if (!types().stream().map(DataSourceType::getType).collect(Collectors.toList()).contains(datasource.getType())) {
|
||||
throw new Exception("Datasource type not supported.");
|
||||
}
|
||||
|
||||
Provider datasourceProvider = ProviderFactory.getProvider(datasource.getType());
|
||||
datasourceProvider.checkConfiguration(datasource);
|
||||
|
||||
checkName(datasource.getName(), datasource.getType(), datasource.getId());
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
datasource.setId(UUID.randomUUID().toString());
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row style="float: right">
|
||||
<el-button type="text" size="mini" @click="variableMgm">
|
||||
<el-button v-if="mode === '0'" type="text" size="mini" @click="variableMgm">
|
||||
{{ $t('sql_variable.variable_mgm') }}
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user