Browse Source

fix: 服务器代理修改默认值 (#5242)

pull/5255/head
ssongliu 6 months ago committed by GitHub
parent
commit
869d0c73bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      frontend/src/views/database/mysql/index.vue
  2. 3
      frontend/src/views/database/redis/index.vue
  3. 8
      frontend/src/views/database/redis/setting/index.vue
  4. 5
      frontend/src/views/setting/panel/proxy/index.vue

4
frontend/src/views/database/mysql/index.vue

@ -215,7 +215,9 @@
v-if="mysqlStatus != 'Running' && currentDB && !loading && maskShow && currentDB?.from === 'local'"
class="mask-prompt"
>
<span>{{ $t('commons.service.serviceNotStarted', ['MySQL']) }}</span>
<span>
{{ $t('commons.service.serviceNotStarted', [currentDB.type === 'mysql' ? 'MySQL' : 'Mariadb']) }}
</span>
</el-card>
<div v-if="dbOptionsLocal.length === 0 && dbOptionsRemote.length === 0">

3
frontend/src/views/database/redis/index.vue

@ -363,7 +363,8 @@ const loadQuickCmd = async () => {
const quickInput = (val: any) => {
if (val) {
terminalRef.value?.sendMsg(val + '\n');
terminalRef.value?.sendMsg(val);
quickCmd.value = '';
}
};

8
frontend/src/views/database/redis/setting/index.vue

@ -1,6 +1,6 @@
<template>
<div v-show="settingShow" v-loading="loading">
<LayoutContent :title="'Redis ' + $t('commons.button.set')" :reload="true">
<LayoutContent :title="database + ' ' + $t('commons.button.set')" :reload="true">
<template #buttons>
<el-button type="primary" :plain="activeName !== 'conf'" @click="changeTab('conf')">
{{ $t('database.confChange') }}
@ -201,7 +201,7 @@ const changeTab = (val: string) => {
break;
case 'tuning':
case 'port':
loadform();
loadForm();
break;
case 'status':
statusRef.value!.acceptParams({ status: redisStatus.value, database: database.value });
@ -288,7 +288,7 @@ const submitForm = async () => {
loading.value = true;
await updateRedisConf(param)
.then(() => {
loadform();
loadForm();
loading.value = false;
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
})
@ -336,7 +336,7 @@ const submitFile = async () => {
});
};
const loadform = async () => {
const loadForm = async () => {
const res = await loadRedisConf(database.value);
form.name = res.data?.name;
form.timeout = Number(res.data?.timeout);

5
frontend/src/views/setting/panel/proxy/index.vue

@ -25,6 +25,7 @@
</el-alert>
<el-form-item :label="$t('setting.proxyType')" prop="proxyType">
<el-select v-model="form.proxyType" clearable>
<el-option value="" :label="$t('commons.button.close')" />
<el-option value="socks5" label="SOCKS5" />
<el-option value="http" label="HTTP" />
<el-option value="https" label="HTTPS" />
@ -105,8 +106,8 @@ interface DialogProps {
passwdKeep: string;
}
const acceptParams = (params: DialogProps): void => {
form.proxyUrl = params.url || '127.0.0.1';
form.proxyType = params.type || 'socks5';
form.proxyUrl = params.url;
form.proxyType = params.type;
form.proxyPortItem = params.port ? Number(params.port) : 7890;
form.proxyUser = params.user;
form.proxyPasswd = params.passwd;

Loading…
Cancel
Save