forked from github/dataease
fix: 查询数据时,先校验数据源有效性
This commit is contained in:
parent
832c244736
commit
9f98c73e08
@ -344,6 +344,9 @@ public class ChartViewService {
|
||||
if (ObjectUtils.isEmpty(ds)) {
|
||||
throw new RuntimeException(Translator.get("i18n_datasource_delete"));
|
||||
}
|
||||
if(ds.getStatus().equalsIgnoreCase("Error")){
|
||||
throw new Exception(Translator.get("i18n_invalid_ds"));
|
||||
}
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
datasourceRequest.setDatasource(ds);
|
||||
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(table.getInfo(), DataTableInfoDTO.class);
|
||||
|
@ -578,6 +578,9 @@ public class DataSetTableService {
|
||||
if (ObjectUtils.isEmpty(ds)) {
|
||||
throw new RuntimeException(Translator.get("i18n_datasource_delete"));
|
||||
}
|
||||
if(ds.getStatus().equalsIgnoreCase("Error")){
|
||||
throw new Exception(Translator.get("i18n_invalid_ds"));
|
||||
}
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
@ -643,6 +646,9 @@ public class DataSetTableService {
|
||||
if (ObjectUtils.isEmpty(ds)) {
|
||||
throw new RuntimeException(Translator.get("i18n_datasource_delete"));
|
||||
}
|
||||
if(ds.getStatus().equalsIgnoreCase("Error")){
|
||||
throw new Exception(Translator.get("i18n_invalid_ds"));
|
||||
}
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
|
@ -406,8 +406,6 @@ export default {
|
||||
this.$error(res.message)
|
||||
}
|
||||
this.refreshType(data)
|
||||
}).catch(res => {
|
||||
this.$error(res.message)
|
||||
})
|
||||
} else {
|
||||
validateDs(data).then(res => {
|
||||
|
Loading…
Reference in New Issue
Block a user