mirror of https://github.com/1Panel-dev/1Panel
feat: 完成网站备份前端样式
parent
319345731e
commit
b66108ab4a
|
@ -32,6 +32,7 @@ export default {
|
|||
init: 'Init',
|
||||
verify: 'Verify',
|
||||
saveAndEnable: 'Save and enable',
|
||||
import: 'import',
|
||||
},
|
||||
search: {
|
||||
timeStart: 'Time start',
|
||||
|
@ -199,7 +200,7 @@ export default {
|
|||
noMysql: 'No {0} database is detected, please go to App Store and click Install!',
|
||||
goInstall: 'Go to install',
|
||||
source: 'Source',
|
||||
backup: 'Database backup',
|
||||
backup: 'Backup',
|
||||
permission: 'Permission',
|
||||
permissionLocal: 'Local server',
|
||||
permissionForIP: 'IP',
|
||||
|
|
|
@ -33,6 +33,7 @@ export default {
|
|||
init: '初始化',
|
||||
verify: '验证',
|
||||
saveAndEnable: '保存并启用',
|
||||
import: '导入',
|
||||
},
|
||||
search: {
|
||||
timeStart: '开始时间',
|
||||
|
@ -200,7 +201,7 @@ export default {
|
|||
noMysql: '当前未检测到 {0} 数据库,请进入应用商店点击安装!',
|
||||
goInstall: '去安装',
|
||||
source: '来源',
|
||||
backup: '备份数据库',
|
||||
backup: '备份',
|
||||
permission: '权限',
|
||||
permissionLocal: '本地服务器',
|
||||
permissionForIP: '指定 IP',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-dialog v-model="upVisiable" :destroy-on-close="true" :close-on-click-modal="false" width="70%">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>{{ $t('database.backup') }}</span>
|
||||
<span>{{ $t('commons.button.import') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-upload
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<el-tab-pane :label="$t('website.security')" name="safety">
|
||||
<Safety :key="id" :id="id" v-if="index === 'safety'"></Safety>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('website.backup')">反代</el-tab-pane>
|
||||
<el-tab-pane :label="$t('website.source')" name="resource">
|
||||
<Resource :key="id" :id="id" v-if="index === 'resource'"></Resource>
|
||||
</el-tab-pane>
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<fu-table-operations
|
||||
:ellipsis="1"
|
||||
:ellipsis="10"
|
||||
width="260px"
|
||||
:buttons="buttons"
|
||||
:label="$t('commons.table.operate')"
|
||||
fixed="right"
|
||||
|
@ -48,12 +49,16 @@
|
|||
<CreateWebSite ref="createRef" @close="search"></CreateWebSite>
|
||||
<DeleteWebsite ref="deleteRef" @close="search"></DeleteWebsite>
|
||||
<WebSiteGroup ref="groupRef"></WebSiteGroup>
|
||||
<UploadDialog ref="uploadRef" />
|
||||
<BackupRecords ref="dialogBackupRef" />
|
||||
</LayoutContent>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import LayoutContent from '@/layout/layout-content.vue';
|
||||
import BackupRecords from '@/views/database/mysql/backup/index.vue';
|
||||
import UploadDialog from '@/views/database/mysql/upload/index.vue';
|
||||
import ComplexTable from '@/components/complex-table/index.vue';
|
||||
import { onMounted, reactive, ref } from '@vue/runtime-core';
|
||||
import CreateWebSite from './create/index.vue';
|
||||
|
@ -103,6 +108,15 @@ const openConfig = (id: number) => {
|
|||
router.push({ name: 'WebsiteConfig', params: { id: id, tab: 'basic' } });
|
||||
};
|
||||
|
||||
const uploadRef = ref();
|
||||
const dialogBackupRef = ref();
|
||||
const onOpenBackupDialog = async (dbName: string) => {
|
||||
let params = {
|
||||
mysqlName: 'test',
|
||||
dbName: dbName,
|
||||
};
|
||||
dialogBackupRef.value!.acceptParams(params);
|
||||
};
|
||||
const buttons = [
|
||||
{
|
||||
label: i18n.global.t('website.config'),
|
||||
|
@ -110,6 +124,22 @@ const buttons = [
|
|||
openConfig(row.id);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('database.backupList'),
|
||||
click: (row: WebSite.WebSite) => {
|
||||
onOpenBackupDialog(row.primaryDomain);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('database.loadBackup'),
|
||||
click: (row: WebSite.WebSite) => {
|
||||
let params = {
|
||||
mysqlName: 'test',
|
||||
dbName: row.primaryDomain,
|
||||
};
|
||||
uploadRef.value!.acceptParams(params);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('app.delete'),
|
||||
click: function (row: WebSite.WebSite) {
|
||||
|
|
Loading…
Reference in New Issue