forked from github/dataease
fix(数据源): 超时时间无法修改
This commit is contained in:
parent
c100179997
commit
4474970b2d
@ -1,5 +1,7 @@
|
|||||||
package io.dataease.service.datasource;
|
package io.dataease.service.datasource;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
@ -140,6 +142,11 @@ public class DatasourceService {
|
|||||||
if (StringUtils.isNotEmpty(configuration.getCustomDriver()) && !configuration.getCustomDriver().equalsIgnoreCase("default")) {
|
if (StringUtils.isNotEmpty(configuration.getCustomDriver()) && !configuration.getCustomDriver().equalsIgnoreCase("default")) {
|
||||||
datasourceDTO.setCalculationMode(DatasourceCalculationMode.DIRECT);
|
datasourceDTO.setCalculationMode(DatasourceCalculationMode.DIRECT);
|
||||||
}
|
}
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(datasourceDTO.getConfiguration());
|
||||||
|
if(jsonObject.getString("queryTimeout") == null){
|
||||||
|
jsonObject.put("queryTimeout", 30);
|
||||||
|
datasourceDTO.setConfiguration(jsonObject.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(datasourceDTO.getType().equalsIgnoreCase(DatasourceTypes.mysql.toString())){
|
if(datasourceDTO.getType().equalsIgnoreCase(DatasourceTypes.mysql.toString())){
|
||||||
|
@ -319,9 +319,6 @@ export default {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.form.configuration = JSON.parse(this.form.configuration)
|
this.form.configuration = JSON.parse(this.form.configuration)
|
||||||
if(this.form.configuration.queryTimeout === undefined){
|
|
||||||
this.form.configuration.queryTimeout = 30
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.disabled = this.params && this.params.id && this.params.showModel && this.params.showModel === 'show' && !this.canEdit
|
this.disabled = this.params && this.params.id && this.params.showModel && this.params.showModel === 'show' && !this.canEdit
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user