mirror of
https://github.com/1Panel-dev/1Panel
synced 2024-11-23 00:18:21 +00:00
feat: 网站恢复增加提示
This commit is contained in:
parent
6354142a96
commit
3f4d8701e3
@ -1026,6 +1026,7 @@ export default {
|
|||||||
noDefaulServer: 'Not set',
|
noDefaulServer: 'Not set',
|
||||||
defaultServerHelper:
|
defaultServerHelper:
|
||||||
'After setting the default site, all unbound domain names and IPs are directed to the default site\n which can effectively prevent malicious analysis',
|
'After setting the default site, all unbound domain names and IPs are directed to the default site\n which can effectively prevent malicious analysis',
|
||||||
|
restoreHelper: 'Are you sure to restore using this backup?',
|
||||||
},
|
},
|
||||||
nginx: {
|
nginx: {
|
||||||
serverNamesHashBucketSizeHelper: 'The hash table size of the server name',
|
serverNamesHashBucketSizeHelper: 'The hash table size of the server name',
|
||||||
|
@ -1055,6 +1055,7 @@ export default {
|
|||||||
websiteStatictHelper: '在主机上创建网站目录',
|
websiteStatictHelper: '在主机上创建网站目录',
|
||||||
websiteProxyHelper:
|
websiteProxyHelper:
|
||||||
'代理已有服务,例如本机已安装使用 8080 端口的 halo 服务,那么代理地址为 http://127.0.0.1:8080',
|
'代理已有服务,例如本机已安装使用 8080 端口的 halo 服务,那么代理地址为 http://127.0.0.1:8080',
|
||||||
|
restoreHelper: '确认使用此备份恢复?',
|
||||||
},
|
},
|
||||||
nginx: {
|
nginx: {
|
||||||
serverNamesHashBucketSizeHelper: '服务器名字的hash表大小',
|
serverNamesHashBucketSizeHelper: '服务器名字的hash表大小',
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<el-button type="primary" @click="onBackup()">
|
<el-button type="primary" @click="onBackup()">
|
||||||
{{ $t('database.backup') }}
|
{{ $t('database.backup') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" plain :disabled="selects.length === 0" @click="onBatchDelete(null)">
|
<el-button plain :disabled="selects.length === 0" @click="onBatchDelete(null)">
|
||||||
{{ $t('commons.button.delete') }}
|
{{ $t('commons.button.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -43,6 +43,7 @@ import { deleteBackupRecord, downloadBackupRecord, searchBackupRecords } from '@
|
|||||||
import { Backup } from '@/api/interface/backup';
|
import { Backup } from '@/api/interface/backup';
|
||||||
import { BackupWebsite, RecoverWebsite } from '@/api/modules/website';
|
import { BackupWebsite, RecoverWebsite } from '@/api/modules/website';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
|
import { ElMessageBox } from 'element-plus';
|
||||||
|
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -90,6 +91,16 @@ const search = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onRecover = async (row: Backup.RecordInfo) => {
|
const onRecover = async (row: Backup.RecordInfo) => {
|
||||||
|
ElMessageBox.confirm(i18n.global.t('website.restoreHelper'), i18n.global.t('commons.button.recover'), {
|
||||||
|
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||||
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
|
type: 'info',
|
||||||
|
}).then(() => {
|
||||||
|
recover(row);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const recover = async (row: Backup.RecordInfo) => {
|
||||||
let params = {
|
let params = {
|
||||||
websiteName: websiteName.value,
|
websiteName: websiteName.value,
|
||||||
type: websiteType.value,
|
type: websiteType.value,
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<el-button
|
<el-button
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
type="danger"
|
|
||||||
plain
|
plain
|
||||||
:disabled="selects.length === 0"
|
:disabled="selects.length === 0"
|
||||||
@click="onBatchDelete(null)"
|
@click="onBatchDelete(null)"
|
||||||
|
Loading…
Reference in New Issue
Block a user