mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 20:49:03 +08:00
fix: 数据库权限去掉 localhost
This commit is contained in:
parent
daefd650a5
commit
94fbb265fa
@ -278,9 +278,8 @@ export default {
|
||||
source: 'Source',
|
||||
backup: 'Backup',
|
||||
permission: 'Permission',
|
||||
permissionLocal: 'Local server',
|
||||
permissionForIP: 'IP',
|
||||
permissionAll: 'All of them (unsafe)',
|
||||
permissionAll: 'All of them(%)',
|
||||
rootPassword: 'Root password',
|
||||
backupList: 'Backup',
|
||||
backList: 'Return',
|
||||
|
@ -285,9 +285,8 @@ export default {
|
||||
source: '来源',
|
||||
backup: '备份',
|
||||
permission: '权限',
|
||||
permissionLocal: '本地服务器',
|
||||
permissionForIP: '指定 IP',
|
||||
permissionAll: '所有人(不安全)',
|
||||
permissionAll: '所有人(%)',
|
||||
rootPassword: 'root 密码',
|
||||
backupList: '备份列表',
|
||||
backList: '返回列表',
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-drawer v-model="createVisiable" :destroy-on-close="true" :close-on-click-modal="false" size="50%">
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('database.create')" :back="handleClose" />
|
||||
</template>
|
||||
<el-drawer v-model="createVisiable" :destroy-on-close="true" :close-on-click-modal="false" size="50%">
|
||||
<template #header>
|
||||
<DrawerHeader :header="$t('database.create')" :back="handleClose" />
|
||||
</template>
|
||||
<div v-loading="loading">
|
||||
<el-form ref="formRef" label-position="top" :model="form" :rules="rules">
|
||||
<el-row type="flex" justify="center">
|
||||
<el-col :span="22">
|
||||
@ -28,7 +28,6 @@
|
||||
|
||||
<el-form-item :label="$t('database.permission')" prop="permission">
|
||||
<el-select v-model="form.permission">
|
||||
<el-option value="localhost" :label="$t('database.permissionLocal')" />
|
||||
<el-option value="%" :label="$t('database.permissionAll')" />
|
||||
<el-option value="ip" :label="$t('database.permissionForIP')" />
|
||||
</el-select>
|
||||
@ -42,16 +41,19 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="createVisiable = false">{{ $t('commons.button.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="onSubmit(formRef)">
|
||||
{{ $t('commons.button.confirm') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button :disabled="loading" @click="createVisiable = false">
|
||||
{{ $t('commons.button.cancel') }}
|
||||
</el-button>
|
||||
<el-button :disabled="loading" type="primary" @click="onSubmit(formRef)">
|
||||
{{ $t('commons.button.confirm') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@ -94,7 +96,7 @@ const acceptParams = (params: DialogProps): void => {
|
||||
form.format = 'utf8mb4';
|
||||
form.username = '';
|
||||
form.password = '';
|
||||
form.permission = 'localhost';
|
||||
form.permission = '%';
|
||||
form.permissionIPs = '';
|
||||
form.description = '';
|
||||
createVisiable.value = true;
|
||||
|
@ -331,7 +331,7 @@ const buttons = [
|
||||
privilegeIPs: '',
|
||||
password: '',
|
||||
};
|
||||
if (row.permission === '%' || row.permission === 'localhost') {
|
||||
if (row.permission === '%') {
|
||||
param.privilege = row.permission;
|
||||
} else {
|
||||
param.privilegeIPs = row.permission;
|
||||
|
@ -28,7 +28,6 @@
|
||||
<div v-if="changeForm.operation === 'privilege'">
|
||||
<el-form-item :label="$t('database.permission')" prop="privilege">
|
||||
<el-select style="width: 100%" v-model="changeForm.privilege">
|
||||
<el-option value="localhost" :label="$t('database.permissionLocal')" />
|
||||
<el-option value="%" :label="$t('database.permissionAll')" />
|
||||
<el-option value="ip" :label="$t('database.permissionForIP')" />
|
||||
</el-select>
|
||||
|
Loading…
Reference in New Issue
Block a user