mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-15 20:56:35 +08:00
安装时自动检查服务器上安装的MySQL
This commit is contained in:
@@ -149,13 +149,14 @@
|
||||
<tr>
|
||||
<td class="title">MySQL主机地址 *</td>
|
||||
<td>
|
||||
<input type="text" name="host" maxlength="100" placeholder="比如 192.168.1.100" style="width:16em" ref="dbHost"/>
|
||||
<input type="text" name="host" maxlength="100" placeholder="比如 192.168.1.100" style="width:16em" ref="dbHost" v-model="localDB.host"/>
|
||||
<p class="comment" v-if="localDBHost.length > 0 && localDBHost == localDB.host"><span class="blue">已经自动填入从当前服务器发现的MySQL数据库信息。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据库连接端口 *</td>
|
||||
<td>
|
||||
<input type="text" name="port" maxlength="5" placeholder="比如 3306" style="width:7em"/>
|
||||
<input type="text" name="port" maxlength="5" placeholder="比如 3306" style="width:7em" v-model="localDB.port"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -168,14 +169,14 @@
|
||||
<tr>
|
||||
<td>连接用户名 *</td>
|
||||
<td>
|
||||
<input type="text" name="username" style="width:16em" maxlength="100"/>
|
||||
<input type="text" name="username" style="width:16em" maxlength="100" v-model="localDB.username"/>
|
||||
<p class="comment">此用户需要可以在数据库中有操作数据和创建数据表的权限。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>连接密码</td>
|
||||
<td>
|
||||
<input type="password" name="password" style="width:16em" maxlength="100"/>
|
||||
<input type="password" name="password" style="width:16em" maxlength="100" v-model="localDB.password"/>
|
||||
<p class="comment">连接数据库所需密码,没有密码的话就不需要填写。</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -34,6 +34,7 @@ Tea.context(function () {
|
||||
|
||||
this.apiSuccess = function (resp) {
|
||||
this.step = this.STEP_DB
|
||||
this.detectDB()
|
||||
this.apiNodeInfo = resp.data.apiNode
|
||||
|
||||
if (this.apiNodeMode == "new") {
|
||||
@@ -56,7 +57,18 @@ Tea.context(function () {
|
||||
|
||||
// 数据库
|
||||
this.dbInfo = {}
|
||||
this.localDB = {"host": "", "port": "", "username": "", "port": ""}
|
||||
this.localDBHost = ""
|
||||
this.dbRequesting = false
|
||||
|
||||
this.detectDB = function () {
|
||||
this.$post(".detectDB")
|
||||
.success(function (resp) {
|
||||
this.localDB = resp.data.localDB
|
||||
this.localDBHost = this.localDB.host
|
||||
})
|
||||
}
|
||||
|
||||
this.dbSubmit = function () {
|
||||
this.dbRequesting = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user