forked from github/dataease
fix: 数据源校验返回信息
This commit is contained in:
parent
fbe9f2821a
commit
539d407342
@ -136,6 +136,9 @@ public class DatasourceServer implements DatasourceApi {
|
||||
dataSourceManage.move(dataSourceDTO);
|
||||
}
|
||||
case "rename" -> {
|
||||
if(StringUtils.isEmpty(dataSourceDTO.getName())){
|
||||
DEException.throwException("名称不能为空!");
|
||||
}
|
||||
CoreDatasource datasource = datasourceMapper.selectById(dataSourceDTO.getId());
|
||||
datasource.setName(dataSourceDTO.getName());
|
||||
dataSourceManage.innerEdit(datasource);
|
||||
@ -464,8 +467,9 @@ public class DatasourceServer implements DatasourceApi {
|
||||
CoreDatasource coreDatasource = new CoreDatasource();
|
||||
BeanUtils.copyBean(coreDatasource, dataSourceDTO);
|
||||
checkDatasourceStatus(coreDatasource);
|
||||
dataSourceDTO.setStatus(coreDatasource.getStatus());
|
||||
return dataSourceDTO;
|
||||
DatasourceDTO result = new DatasourceDTO();
|
||||
result.setStatus(coreDatasource.getStatus());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -272,6 +272,7 @@ const saveDataset = () => {
|
||||
showClose: false,
|
||||
tip: ''
|
||||
}
|
||||
request.apiConfiguration = ''
|
||||
checkRepeat(request).then(res => {
|
||||
if (res) {
|
||||
ElMessageBox.confirm(t('datasource.has_same_ds'), options as ElMessageBoxOptions).then(
|
||||
|
@ -391,6 +391,7 @@ const saveDS = () => {
|
||||
request.configuration = Base64.encode(JSON.stringify(request.configuration))
|
||||
}
|
||||
const validate = detail.value.submitForm()
|
||||
request.apiConfiguration = ''
|
||||
validate(val => {
|
||||
if (val) {
|
||||
if (editDs.value && form.id) {
|
||||
@ -401,7 +402,6 @@ const saveDS = () => {
|
||||
showClose: false,
|
||||
tip: ''
|
||||
}
|
||||
|
||||
checkRepeat(request).then(res => {
|
||||
if (res) {
|
||||
ElMessageBox.confirm(t('datasource.has_same_ds'), options as ElMessageBoxOptions).then(
|
||||
|
Loading…
Reference in New Issue
Block a user