mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
fix: Add remote database connection timeout record (#9868)
This commit is contained in:
parent
e3a9f2dfb7
commit
d3e2c8e9d3
18 changed files with 15 additions and 15 deletions
|
@ -260,6 +260,7 @@ type DatabaseInfo struct {
|
||||||
ClientCert string `json:"clientCert"`
|
ClientCert string `json:"clientCert"`
|
||||||
SkipVerify bool `json:"skipVerify"`
|
SkipVerify bool `json:"skipVerify"`
|
||||||
|
|
||||||
|
Timeout uint `json:"timeout"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,5 +18,6 @@ type Database struct {
|
||||||
ClientCert string `json:"clientCert"`
|
ClientCert string `json:"clientCert"`
|
||||||
SkipVerify bool `json:"skipVerify"`
|
SkipVerify bool `json:"skipVerify"`
|
||||||
|
|
||||||
|
Timeout uint `json:"timeout"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,6 +325,7 @@ func (u *DatabaseService) Update(req dto.DatabaseUpdate) error {
|
||||||
upMap["port"] = req.Port
|
upMap["port"] = req.Port
|
||||||
upMap["username"] = req.Username
|
upMap["username"] = req.Username
|
||||||
upMap["password"] = pass
|
upMap["password"] = pass
|
||||||
|
upMap["timeout"] = req.Timeout
|
||||||
upMap["description"] = req.Description
|
upMap["description"] = req.Description
|
||||||
upMap["ssl"] = req.SSL
|
upMap["ssl"] = req.SSL
|
||||||
upMap["client_key"] = req.ClientKey
|
upMap["client_key"] = req.ClientKey
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var AddTable = &gormigrate.Migration{
|
var AddTable = &gormigrate.Migration{
|
||||||
ID: "20250729-add-table",
|
ID: "20250805-add-table",
|
||||||
Migrate: func(tx *gorm.DB) error {
|
Migrate: func(tx *gorm.DB) error {
|
||||||
return tx.AutoMigrate(
|
return tx.AutoMigrate(
|
||||||
&model.AppDetail{},
|
&model.AppDetail{},
|
||||||
|
|
|
@ -572,7 +572,7 @@ const message = {
|
||||||
longQueryTime: 'threshold(s)',
|
longQueryTime: 'threshold(s)',
|
||||||
thresholdRangeHelper: 'Please enter the correct threshold (1 - 600).',
|
thresholdRangeHelper: 'Please enter the correct threshold (1 - 600).',
|
||||||
|
|
||||||
timeout: 'Timeout',
|
timeout: 'Timeout(s)',
|
||||||
timeoutHelper: 'Idle connection timeout period. 0 indicates that the connection is on continuously.',
|
timeoutHelper: 'Idle connection timeout period. 0 indicates that the connection is on continuously.',
|
||||||
maxclients: 'Max clients',
|
maxclients: 'Max clients',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -559,7 +559,7 @@ const message = {
|
||||||
longQueryTime: 'しきい値',
|
longQueryTime: 'しきい値',
|
||||||
thresholdRangeHelper: '正しいしきい値(1-600)を入力してください。',
|
thresholdRangeHelper: '正しいしきい値(1-600)を入力してください。',
|
||||||
|
|
||||||
timeout: 'タイムアウト',
|
timeout: 'タイムアウト(s)',
|
||||||
timeoutHelper: 'アイドル接続タイムアウト期間。0は、接続が継続的にオンになっていることを示します。',
|
timeoutHelper: 'アイドル接続タイムアウト期間。0は、接続が継続的にオンになっていることを示します。',
|
||||||
maxclients: 'マックスクライアント',
|
maxclients: 'マックスクライアント',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -556,7 +556,7 @@ const message = {
|
||||||
longQueryTime: '임계값(s)',
|
longQueryTime: '임계값(s)',
|
||||||
thresholdRangeHelper: '올바른 임계값을 입력하십시오 (1 - 600).',
|
thresholdRangeHelper: '올바른 임계값을 입력하십시오 (1 - 600).',
|
||||||
|
|
||||||
timeout: '타임아웃',
|
timeout: '타임아웃(s)',
|
||||||
timeoutHelper: '유휴 연결의 타임아웃 기간. 0은 연결이 지속적으로 유지됨을 의미합니다.',
|
timeoutHelper: '유휴 연결의 타임아웃 기간. 0은 연결이 지속적으로 유지됨을 의미합니다.',
|
||||||
maxclients: '최대 클라이언트',
|
maxclients: '최대 클라이언트',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -571,7 +571,7 @@ const message = {
|
||||||
longQueryTime: 'Ambang (saat)',
|
longQueryTime: 'Ambang (saat)',
|
||||||
thresholdRangeHelper: 'Sila masukkan ambang yang betul (1 - 600).',
|
thresholdRangeHelper: 'Sila masukkan ambang yang betul (1 - 600).',
|
||||||
|
|
||||||
timeout: 'Tamat masa',
|
timeout: 'Tamat masa(saat)',
|
||||||
timeoutHelper: 'Tempoh tamat masa sambungan tidak aktif. 0 menunjukkan sambungan sentiasa aktif.',
|
timeoutHelper: 'Tempoh tamat masa sambungan tidak aktif. 0 menunjukkan sambungan sentiasa aktif.',
|
||||||
maxclients: 'Klien maksimum',
|
maxclients: 'Klien maksimum',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -568,7 +568,7 @@ const message = {
|
||||||
longQueryTime: 'limite (segundos)',
|
longQueryTime: 'limite (segundos)',
|
||||||
thresholdRangeHelper: 'Por favor, insira o limite correto (1 - 600).',
|
thresholdRangeHelper: 'Por favor, insira o limite correto (1 - 600).',
|
||||||
|
|
||||||
timeout: 'Tempo limite',
|
timeout: 'Tempo limite(segundos)',
|
||||||
timeoutHelper: 'Período de timeout de conexão ociosa. 0 indica que a conexão permanece ativa continuamente.',
|
timeoutHelper: 'Período de timeout de conexão ociosa. 0 indica que a conexão permanece ativa continuamente.',
|
||||||
maxclients: 'Máximo de clientes',
|
maxclients: 'Máximo de clientes',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -563,7 +563,7 @@ const message = {
|
||||||
longQueryTime: 'порог (сек)',
|
longQueryTime: 'порог (сек)',
|
||||||
thresholdRangeHelper: 'Пожалуйста, введите корректный порог (1 - 600).',
|
thresholdRangeHelper: 'Пожалуйста, введите корректный порог (1 - 600).',
|
||||||
|
|
||||||
timeout: 'Таймаут',
|
timeout: 'Таймаут(сек)',
|
||||||
timeoutHelper: 'Период таймаута неактивного подключения. 0 означает, что подключение постоянно активно.',
|
timeoutHelper: 'Период таймаута неактивного подключения. 0 означает, что подключение постоянно активно.',
|
||||||
maxclients: 'Макс. клиентов',
|
maxclients: 'Макс. клиентов',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -579,7 +579,7 @@ const message = {
|
||||||
longQueryTime: 'eşik(saniye)',
|
longQueryTime: 'eşik(saniye)',
|
||||||
thresholdRangeHelper: 'Lütfen doğru eşik değerini girin (1 - 600).',
|
thresholdRangeHelper: 'Lütfen doğru eşik değerini girin (1 - 600).',
|
||||||
|
|
||||||
timeout: 'Zaman aşımı',
|
timeout: 'Zaman aşımı(saniye)',
|
||||||
timeoutHelper: 'Boştaki bağlantı zaman aşımı süresi. 0, bağlantının sürekli açık olduğunu gösterir.',
|
timeoutHelper: 'Boştaki bağlantı zaman aşımı süresi. 0, bağlantının sürekli açık olduğunu gösterir.',
|
||||||
maxclients: 'Maksimum istemci',
|
maxclients: 'Maksimum istemci',
|
||||||
requirepassHelper:
|
requirepassHelper:
|
||||||
|
|
|
@ -554,7 +554,7 @@ const message = {
|
||||||
longQueryTime: '閾值(秒)',
|
longQueryTime: '閾值(秒)',
|
||||||
thresholdRangeHelper: '請輸入正確的閾值(1 - 600)',
|
thresholdRangeHelper: '請輸入正確的閾值(1 - 600)',
|
||||||
|
|
||||||
timeout: '超時時間',
|
timeout: '超時時間(秒)',
|
||||||
timeoutHelper: '空閑連接超時時間,0表示不斷開',
|
timeoutHelper: '空閑連接超時時間,0表示不斷開',
|
||||||
maxclients: '最大連接數',
|
maxclients: '最大連接數',
|
||||||
requirepassHelper: '留空代表沒有設置密碼,修改需要單獨保存並且重啟容器!',
|
requirepassHelper: '留空代表沒有設置密碼,修改需要單獨保存並且重啟容器!',
|
||||||
|
|
|
@ -552,7 +552,7 @@ const message = {
|
||||||
longQueryTime: '阈值(秒)',
|
longQueryTime: '阈值(秒)',
|
||||||
thresholdRangeHelper: '请输入正确的阈值(1 - 600)',
|
thresholdRangeHelper: '请输入正确的阈值(1 - 600)',
|
||||||
|
|
||||||
timeout: '超时时间',
|
timeout: '超时时间(秒)',
|
||||||
timeoutHelper: '空闲连接超时时间,0表示不断开',
|
timeoutHelper: '空闲连接超时时间,0表示不断开',
|
||||||
maxclients: '最大连接数',
|
maxclients: '最大连接数',
|
||||||
requirepassHelper: '留空代表没有设置密码,修改需要单独保存并且重启容器!',
|
requirepassHelper: '留空代表没有设置密码,修改需要单独保存并且重启容器!',
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
:current-page="searchInfo.page"
|
:current-page="searchInfo.page"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
:pager-count="3"
|
:pager-count="5"
|
||||||
:page-sizes="[6, 8, 10, 12, 14]"
|
:page-sizes="[6, 8, 10, 12, 14]"
|
||||||
small
|
small
|
||||||
layout="total, sizes, prev, pager, next"
|
layout="total, sizes, prev, pager, next"
|
||||||
|
|
|
@ -134,7 +134,6 @@ const onOpenDialog = async (
|
||||||
title,
|
title,
|
||||||
rowData: { ...rowData },
|
rowData: { ...rowData },
|
||||||
};
|
};
|
||||||
params.rowData.timeout = 30;
|
|
||||||
dialogRef.value!.acceptParams(params);
|
dialogRef.value!.acceptParams(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,6 @@ const onOpenDialog = async (
|
||||||
title,
|
title,
|
||||||
rowData: { ...rowData },
|
rowData: { ...rowData },
|
||||||
};
|
};
|
||||||
params.rowData.timeout = 30;
|
|
||||||
dialogRef.value!.acceptParams(params);
|
dialogRef.value!.acceptParams(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,6 @@ const onOpenDialog = async (
|
||||||
title,
|
title,
|
||||||
rowData: { ...rowData },
|
rowData: { ...rowData },
|
||||||
};
|
};
|
||||||
params.rowData.timeout = 30;
|
|
||||||
dialogRef.value!.acceptParams(params);
|
dialogRef.value!.acceptParams(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</DrawerPro>
|
</DrawerPro>
|
||||||
<SnapRecover ref="recoverRef" @close="handleClose" />
|
<SnapRecover ref="recoverRef" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
Loading…
Add table
Reference in a new issue