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

Commit 1fc5c4f

Browse files
committed
MySQL和PostgreSQL可以设置连接池尺寸、连接超时时间,并增大默认连接池尺寸
1 parent 8df48a8 commit 1fc5c4f

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

src/main/web/views/@default/settings/mysql/update.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ <h3>MySQL连接设置</h3>
4242
<p class="comment">选中后,如果数据库不存在,在检查数据库时会尝试自动创建数据库。</p>
4343
</td>
4444
</tr>
45+
<tr>
46+
<td colspan="2">
47+
<a href="" v-if="!advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">更多选项 <i class="icon down angle"></i> </a>
48+
<a href="" v-if="advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">收起选项 <i class="icon up angle"></i> </a>
49+
</td>
50+
</tr>
51+
<tbody v-show="advancedOptionsVisible">
52+
<tr>
53+
<td>连接池最大尺寸</td>
54+
<td>
55+
<input type="text" name="poolSize" style="width:5em" v-model="config.poolSize" maxlength="4"/>
56+
<p class="comment">0表示默认,根据MySQL所在服务器的性能可以适当增加连接池,从而提升写日志的速度。建议在10-100之间选择。</p>
57+
</td>
58+
</tr>
59+
</tbody>
4560
</table>
4661

4762
<div class="ui message error" v-if="!dbTestResult.ok && !dbTestResult.isRunning && dbTestResult.message.length > 0">{{dbTestResult.message}}</div>

src/main/web/views/@default/settings/mysql/update.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,13 @@ Tea.context(function () {
6565
this.saveFail = function (resp) {
6666
alert(resp.message);
6767
};
68+
69+
/**
70+
* 高级选项
71+
*/
72+
this.advancedOptionsVisible = false;
73+
74+
this.showAdvancedOptions = function () {
75+
this.advancedOptionsVisible = !this.advancedOptionsVisible;
76+
};
6877
});

src/main/web/views/@default/settings/postgres/update.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ <h3>PostgreSQL连接设置</h3>
4242
<p class="comment">选中后,如果数据库不存在,在检查数据库时会尝试自动创建数据库。</p>
4343
</td>
4444
</tr>
45+
<tr>
46+
<td colspan="2">
47+
<a href="" v-if="!advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">更多选项 <i class="icon down angle"></i> </a>
48+
<a href="" v-if="advancedOptionsVisible" @click.prevent="showAdvancedOptions()" style="font-weight:normal">收起选项 <i class="icon up angle"></i> </a>
49+
</td>
50+
</tr>
51+
<tbody v-show="advancedOptionsVisible">
52+
<tr>
53+
<td>连接池最大尺寸</td>
54+
<td>
55+
<input type="text" name="poolSize" style="width:5em" v-model="config.poolSize" maxlength="4"/>
56+
<p class="comment">0表示默认,根据PostgreSQL所在服务器的性能可以适当增加连接池,从而提升写日志的速度。建议在10-100之间选择。</p>
57+
</td>
58+
</tr>
59+
</tbody>
4560
</table>
4661

4762
<div class="ui message error" v-if="!dbTestResult.ok && !dbTestResult.isRunning && dbTestResult.message.length > 0">{{dbTestResult.message}}</div>

src/main/web/views/@default/settings/postgres/update.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,13 @@ Tea.context(function () {
6565
this.saveFail = function (resp) {
6666
alert(resp.message);
6767
};
68+
69+
/**
70+
* 高级选项
71+
*/
72+
this.advancedOptionsVisible = false;
73+
74+
this.showAdvancedOptions = function () {
75+
this.advancedOptionsVisible = !this.advancedOptionsVisible;
76+
};
6877
});

0 commit comments

Comments
 (0)