mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-13 20:00:25 +08:00
安装时如果数据库地址填写的是公网IP,则提示会影响系统运行性能
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user