mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-25 15:24:17 +08:00
feat: 失败状态应用允许恢复 (#4732)
This commit is contained in:
parent
9851b31013
commit
29fd941d55
3 changed files with 10 additions and 12 deletions
|
@ -31,7 +31,7 @@
|
||||||
:data="data"
|
:data="data"
|
||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<el-button type="primary" @click="onBackup()">
|
<el-button type="primary" :disabled="status && status != 'Running'" @click="onBackup()">
|
||||||
{{ $t('commons.button.backup') }}
|
{{ $t('commons.button.backup') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" plain :disabled="selects.length === 0" @click="onBatchDelete(null)">
|
<el-button type="primary" plain :disabled="selects.length === 0" @click="onBatchDelete(null)">
|
||||||
|
@ -98,11 +98,13 @@ const type = ref();
|
||||||
const name = ref();
|
const name = ref();
|
||||||
const detailName = ref();
|
const detailName = ref();
|
||||||
const backupPath = ref();
|
const backupPath = ref();
|
||||||
|
const status = ref();
|
||||||
|
|
||||||
interface DialogProps {
|
interface DialogProps {
|
||||||
type: string;
|
type: string;
|
||||||
name: string;
|
name: string;
|
||||||
detailName: string;
|
detailName: string;
|
||||||
|
status: string;
|
||||||
}
|
}
|
||||||
const acceptParams = (params: DialogProps): void => {
|
const acceptParams = (params: DialogProps): void => {
|
||||||
type.value = params.type;
|
type.value = params.type;
|
||||||
|
@ -112,6 +114,7 @@ const acceptParams = (params: DialogProps): void => {
|
||||||
name.value = params.name;
|
name.value = params.name;
|
||||||
detailName.value = params.detailName;
|
detailName.value = params.detailName;
|
||||||
backupVisible.value = true;
|
backupVisible.value = true;
|
||||||
|
status.value = params.status;
|
||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
|
|
|
@ -1195,8 +1195,8 @@ const message = {
|
||||||
noSpace: '輸入信息不能包括空格符號',
|
noSpace: '輸入信息不能包括空格符號',
|
||||||
duplicatePassword: '新密碼不能與原始密碼一致,請重新輸入!',
|
duplicatePassword: '新密碼不能與原始密碼一致,請重新輸入!',
|
||||||
diskClean: '缓存清理',
|
diskClean: '缓存清理',
|
||||||
開發者模式: '預覽體驗計劃',
|
developerMode: '預覽體驗計劃',
|
||||||
開發者模式幫助程序: '獲取 1Panel 的預覽版本,以分享有關新功能和更新的反饋',
|
developerModeHelper: '獲取 1Panel 的預覽版本,以分享有關新功能和更新的反饋',
|
||||||
|
|
||||||
thirdParty: '第三方賬號',
|
thirdParty: '第三方賬號',
|
||||||
createBackupAccount: '添加 {0}',
|
createBackupAccount: '添加 {0}',
|
||||||
|
|
|
@ -168,10 +168,6 @@
|
||||||
plain
|
plain
|
||||||
round
|
round
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="
|
|
||||||
installed.status !== 'Running' ||
|
|
||||||
installed.app.status === 'TakeDown'
|
|
||||||
"
|
|
||||||
@click="openUploads(installed.app.key, installed.name)"
|
@click="openUploads(installed.app.key, installed.name)"
|
||||||
v-if="mode === 'installed'"
|
v-if="mode === 'installed'"
|
||||||
>
|
>
|
||||||
|
@ -182,11 +178,9 @@
|
||||||
plain
|
plain
|
||||||
round
|
round
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="
|
@click="
|
||||||
installed.status !== 'Running' ||
|
openBackups(installed.app.key, installed.name, installed.status)
|
||||||
installed.app.status === 'TakeDown'
|
|
||||||
"
|
"
|
||||||
@click="openBackups(installed.app.key, installed.name)"
|
|
||||||
v-if="mode === 'installed'"
|
v-if="mode === 'installed'"
|
||||||
>
|
>
|
||||||
{{ $t('commons.button.backup') }}
|
{{ $t('commons.button.backup') }}
|
||||||
|
@ -575,11 +569,12 @@ const buttons = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const openBackups = (key: string, name: string) => {
|
const openBackups = (key: string, name: string, status: string) => {
|
||||||
let params = {
|
let params = {
|
||||||
type: 'app',
|
type: 'app',
|
||||||
name: key,
|
name: key,
|
||||||
detailName: name,
|
detailName: name,
|
||||||
|
status: status,
|
||||||
};
|
};
|
||||||
backupRef.value.acceptParams(params);
|
backupRef.value.acceptParams(params);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue