1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: 调整 Redis 空状态样式 (#5315)

This commit is contained in:
ssongliu 2024-06-06 11:18:12 +08:00 committed by GitHub
parent f03051ce43
commit 37de6aae66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 25 deletions

View File

@ -22,7 +22,7 @@ func HandleGet(url, method string) (int, []byte, error) {
func HandleGetWithTransport(url, method string, transport *http.Transport) (int, []byte, error) {
defer func() {
if r := recover(); r != nil {
global.LOG.Errorf(" A panic occurred during handle request, error message: %v", r)
global.LOG.Errorf("handle request failed, error message: %v", r)
return
}
}()

View File

@ -69,6 +69,7 @@
/>
<el-empty
v-if="redisStatus !== 'Running' || (currentDB.from === 'remote' && !redisCliExist)"
:image-size="80"
:style="{ height: `calc(100vh - ${loadHeight()})`, 'background-color': '#000' }"
:description="loadErrMsg()"
>

View File

@ -31,30 +31,35 @@
<el-option value="https" label="HTTPS" />
</el-select>
</el-form-item>
<el-form-item :label="$t('setting.proxyUrl')" prop="proxyUrl">
<el-input
clearable
v-model.trim="form.proxyUrl"
v-if="form.proxyType == 'http' || form.proxyType === 'https'"
>
<template #prepend>
<span>{{ form.proxyType }}</span>
</template>
</el-input>
<el-input clearable v-model.trim="form.proxyUrl" v-else />
</el-form-item>
<el-form-item :label="$t('setting.proxyPort')" prop="proxyPortItem">
<el-input clearable type="number" v-model.number="form.proxyPortItem" />
</el-form-item>
<el-form-item :label="$t('commons.login.username')" prop="proxyUser">
<el-input clearable v-model.trim="form.proxyUser" />
</el-form-item>
<el-form-item :label="$t('commons.login.password')" prop="proxyPasswd">
<el-input type="password" show-password clearable v-model.trim="form.proxyPasswd" />
</el-form-item>
<el-form-item>
<el-checkbox v-model="form.proxyPasswdKeepItem" :label="$t('setting.proxyPasswdKeep')" />
</el-form-item>
<div v-if="form.proxyType !== 'close'">
<el-form-item :label="$t('setting.proxyUrl')" prop="proxyUrl">
<el-input
clearable
v-model.trim="form.proxyUrl"
v-if="form.proxyType == 'http' || form.proxyType === 'https'"
>
<template #prepend>
<span>{{ form.proxyType }}</span>
</template>
</el-input>
<el-input clearable v-model.trim="form.proxyUrl" v-else />
</el-form-item>
<el-form-item :label="$t('setting.proxyPort')" prop="proxyPortItem">
<el-input clearable type="number" v-model.number="form.proxyPortItem" />
</el-form-item>
<el-form-item :label="$t('commons.login.username')" prop="proxyUser">
<el-input clearable v-model.trim="form.proxyUser" />
</el-form-item>
<el-form-item :label="$t('commons.login.password')" prop="proxyPasswd">
<el-input type="password" show-password clearable v-model.trim="form.proxyPasswd" />
</el-form-item>
<el-form-item>
<el-checkbox
v-model="form.proxyPasswdKeepItem"
:label="$t('setting.proxyPasswdKeep')"
/>
</el-form-item>
</div>
</el-col>
</el-row>
</el-form>
@ -119,6 +124,8 @@ const acceptParams = (params: DialogProps): void => {
if (params.url) {
if (params.type === 'http' || params.type === 'https') {
form.proxyUrl = params.url.replaceAll(params.type + '://', '');
} else {
form.proxyUrl = params.url;
}
} else {
form.proxyUrl = '127.0.0.1';