Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
MySQL和PostgreSQL可以设置连接池尺寸、连接超时时间,并增大默认连接池尺寸
Browse files Browse the repository at this point in the history
  • Loading branch information
iwind committed Feb 17, 2020
1 parent 8df48a8 commit 1fc5c4f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/web/views/@default/settings/mysql/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ <h3>MySQL连接设置</h3>
<p class="comment">选中后,如果数据库不存在,在检查数据库时会尝试自动创建数据库。</p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="" v-if="!advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">更多选项 <i class="icon down angle"></i> </a>
<a href="" v-if="advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">收起选项 <i class="icon up angle"></i> </a>
</td>
</tr>
<tbody v-show="advancedOptionsVisible">
<tr>
<td>连接池最大尺寸</td>
<td>
<input type="text" name="poolSize" style="width:5em" v-model="config.poolSize" maxlength="4"/>
<p class="comment">0表示默认,根据MySQL所在服务器的性能可以适当增加连接池,从而提升写日志的速度。建议在10-100之间选择。</p>
</td>
</tr>
</tbody>
</table>

<div class="ui message error" v-if="!dbTestResult.ok && !dbTestResult.isRunning && dbTestResult.message.length > 0">{{dbTestResult.message}}</div>
Expand Down
9 changes: 9 additions & 0 deletions src/main/web/views/@default/settings/mysql/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,13 @@ Tea.context(function () {
this.saveFail = function (resp) {
alert(resp.message);
};

/**
* 高级选项
*/
this.advancedOptionsVisible = false;

this.showAdvancedOptions = function () {
this.advancedOptionsVisible = !this.advancedOptionsVisible;
};
});
15 changes: 15 additions & 0 deletions src/main/web/views/@default/settings/postgres/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ <h3>PostgreSQL连接设置</h3>
<p class="comment">选中后,如果数据库不存在,在检查数据库时会尝试自动创建数据库。</p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="" v-if="!advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">更多选项 <i class="icon down angle"></i> </a>
<a href="" v-if="advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">收起选项 <i class="icon up angle"></i> </a>
</td>
</tr>
<tbody v-show="advancedOptionsVisible">
<tr>
<td>连接池最大尺寸</td>
<td>
<input type="text" name="poolSize" style="width:5em" v-model="config.poolSize" maxlength="4"/>
<p class="comment">0表示默认,根据PostgreSQL所在服务器的性能可以适当增加连接池,从而提升写日志的速度。建议在10-100之间选择。</p>
</td>
</tr>
</tbody>
</table>

<div class="ui message error" v-if="!dbTestResult.ok && !dbTestResult.isRunning && dbTestResult.message.length > 0">{{dbTestResult.message}}</div>
Expand Down
9 changes: 9 additions & 0 deletions src/main/web/views/@default/settings/postgres/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,13 @@ Tea.context(function () {
this.saveFail = function (resp) {
alert(resp.message);
};

/**
* 高级选项
*/
this.advancedOptionsVisible = false;

this.showAdvancedOptions = function () {
this.advancedOptionsVisible = !this.advancedOptionsVisible;
};
});

0 comments on commit 1fc5c4f

Please sign in to comment.