安装时如果数据库地址填写的是公网IP,则提示会影响系统运行性能

This commit is contained in:
GoEdgeLab
2022-06-08 11:00:03 +08:00
parent c9bfbcfc76
commit 441dd3b84a
6 changed files with 81 additions and 18 deletions

View File

@@ -57,7 +57,7 @@ Tea.context(function () {
// 数据库
this.dbInfo = {}
this.localDB = {"host": "", "port": "", "username": "", "port": ""}
this.localDB = {"host": "", "port": "", "username": "", "port": "", "isLocal": true}
this.localDBHost = ""
this.dbRequesting = false
@@ -65,10 +65,26 @@ Tea.context(function () {
this.$post(".detectDB")
.success(function (resp) {
this.localDB = resp.data.localDB
this.localDB["isLocal"] = true
this.localDBHost = this.localDB.host
})
}
this.checkDBIP = function () {
this.localDB["isLocal"] = true
if (this.localDB.host.length == 0) {
return
}
this.$post(".checkLocalIP")
.params({
host: this.localDB.host
})
.success(function (resp) {
this.localDB["isLocal"] = resp.data.isLocal
this.$forceUpdate()
})
}
this.dbSubmit = function () {
this.dbRequesting = true
}