mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-08 01:20:07 +08:00
fix: 优化缓存清理界面样式 (#3733)
![image](https://github.com/1Panel-dev/1Panel/assets/73214554/30426b21-0bf8-4e3f-b59b-2016ae4b55b9)
This commit is contained in:
parent
aa8429a836
commit
0ee942cbef
@ -87,6 +87,7 @@ func (u *SnapshotService) SnapshotImport(req dto.SnapshotImport) error {
|
|||||||
itemSnap := model.Snapshot{
|
itemSnap := model.Snapshot{
|
||||||
Name: snap,
|
Name: snap,
|
||||||
From: req.From,
|
From: req.From,
|
||||||
|
DefaultDownload: req.From,
|
||||||
Version: nameItems[1],
|
Version: nameItems[1],
|
||||||
Description: req.Description,
|
Description: req.Description,
|
||||||
Status: constant.StatusSuccess,
|
Status: constant.StatusSuccess,
|
||||||
|
@ -90,6 +90,7 @@ export namespace Setting {
|
|||||||
export interface SnapshotCreate {
|
export interface SnapshotCreate {
|
||||||
id: number;
|
id: number;
|
||||||
from: string;
|
from: string;
|
||||||
|
fromAccounts: Array<string>;
|
||||||
defaultDownload: string;
|
defaultDownload: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
@ -823,7 +823,7 @@ const message = {
|
|||||||
retainCopies: 'Retain copies',
|
retainCopies: 'Retain copies',
|
||||||
retainCopiesHelper: 'Number of copies to retain for execution records and logs',
|
retainCopiesHelper: 'Number of copies to retain for execution records and logs',
|
||||||
retainCopiesHelper1: 'Number of copies to retain for backup files',
|
retainCopiesHelper1: 'Number of copies to retain for backup files',
|
||||||
retainCopiesUnit: ' copies',
|
retainCopiesUnit: ' copies (View)',
|
||||||
cronSpecRule: 'Please enter a correct lifecycle',
|
cronSpecRule: 'Please enter a correct lifecycle',
|
||||||
perMonth: 'Every monthly',
|
perMonth: 'Every monthly',
|
||||||
perWeek: 'Every week',
|
perWeek: 'Every week',
|
||||||
@ -1441,6 +1441,7 @@ const message = {
|
|||||||
},
|
},
|
||||||
clean: {
|
clean: {
|
||||||
scan: 'Start Scanning',
|
scan: 'Start Scanning',
|
||||||
|
scanHelper: 'Easily tidy up junk files accumulated during 1Panel runtime',
|
||||||
clean: 'Clean Now',
|
clean: 'Clean Now',
|
||||||
reScan: 'Rescan',
|
reScan: 'Rescan',
|
||||||
cleanHelper:
|
cleanHelper:
|
||||||
|
@ -784,7 +784,7 @@ const message = {
|
|||||||
retainCopies: '保留份數',
|
retainCopies: '保留份數',
|
||||||
retainCopiesHelper: '執行記錄及日誌保留份数',
|
retainCopiesHelper: '執行記錄及日誌保留份数',
|
||||||
retainCopiesHelper1: '備份文件保留份数',
|
retainCopiesHelper1: '備份文件保留份数',
|
||||||
retainCopiesUnit: ' 份',
|
retainCopiesUnit: ' 份 (查看)',
|
||||||
cronSpecRule: '請輸入正確的執行周期',
|
cronSpecRule: '請輸入正確的執行周期',
|
||||||
perMonth: '每月',
|
perMonth: '每月',
|
||||||
perWeek: '每周',
|
perWeek: '每周',
|
||||||
@ -1348,6 +1348,7 @@ const message = {
|
|||||||
},
|
},
|
||||||
clean: {
|
clean: {
|
||||||
scan: '開始掃描',
|
scan: '開始掃描',
|
||||||
|
scanHelper: '輕鬆梳理 1Panel 運行期間積累的垃圾文件',
|
||||||
clean: '立即清理',
|
clean: '立即清理',
|
||||||
reScan: '重新掃描',
|
reScan: '重新掃描',
|
||||||
cleanHelper: '已勾選文件及目錄清理後無法回滾(系統緩存文件清理需要重啟服務),是否繼續?',
|
cleanHelper: '已勾選文件及目錄清理後無法回滾(系統緩存文件清理需要重啟服務),是否繼續?',
|
||||||
|
@ -785,7 +785,7 @@ const message = {
|
|||||||
retainCopies: '保留份数',
|
retainCopies: '保留份数',
|
||||||
retainCopiesHelper: '执行记录及日志保留份数',
|
retainCopiesHelper: '执行记录及日志保留份数',
|
||||||
retainCopiesHelper1: '备份文件保留份数',
|
retainCopiesHelper1: '备份文件保留份数',
|
||||||
retainCopiesUnit: ' 份',
|
retainCopiesUnit: ' 份 (查看)',
|
||||||
cronSpecRule: '请输入正确的执行周期',
|
cronSpecRule: '请输入正确的执行周期',
|
||||||
perMonth: '每月',
|
perMonth: '每月',
|
||||||
perWeek: '每周',
|
perWeek: '每周',
|
||||||
@ -1349,6 +1349,7 @@ const message = {
|
|||||||
},
|
},
|
||||||
clean: {
|
clean: {
|
||||||
scan: '开始扫描',
|
scan: '开始扫描',
|
||||||
|
scanHelper: '轻松梳理 1Panel 运行期间积累的垃圾文件',
|
||||||
clean: '立即清理',
|
clean: '立即清理',
|
||||||
reScan: '重新扫描',
|
reScan: '重新扫描',
|
||||||
cleanHelper: '已勾选文件及目录清理后无法回滚(系统缓存文件清理需要重启服务),是否继续?',
|
cleanHelper: '已勾选文件及目录清理后无法回滚(系统缓存文件清理需要重启服务),是否继续?',
|
||||||
|
@ -143,8 +143,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('cronjob.default_download_path')" prop="default_download">
|
<el-form-item :label="$t('cronjob.default_download_path')" prop="defaultDownload">
|
||||||
<el-select v-model="snapInfo.default_download" clearable>
|
<el-select v-model="snapInfo.defaultDownload" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in accountOptions"
|
v-for="item in accountOptions"
|
||||||
:key="item.label"
|
:key="item.label"
|
||||||
@ -217,13 +217,13 @@ type FormInstance = InstanceType<typeof ElForm>;
|
|||||||
const snapRef = ref<FormInstance>();
|
const snapRef = ref<FormInstance>();
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
fromAccounts: [Rules.requiredSelect],
|
fromAccounts: [Rules.requiredSelect],
|
||||||
default_download: [Rules.requiredSelect],
|
defaultDownload: [Rules.requiredSelect],
|
||||||
});
|
});
|
||||||
|
|
||||||
let snapInfo = reactive<Setting.SnapshotCreate>({
|
let snapInfo = reactive<Setting.SnapshotCreate>({
|
||||||
id: 0,
|
id: 0,
|
||||||
from: '',
|
from: '',
|
||||||
default_download: '',
|
defaultDownload: '',
|
||||||
fromAccounts: [],
|
fromAccounts: [],
|
||||||
description: '',
|
description: '',
|
||||||
});
|
});
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<el-col :xs="24" :sm="20" :md="20" :lg="10" :xl="10">
|
<el-col :xs="24" :sm="20" :md="20" :lg="10" :xl="10">
|
||||||
<div v-if="scanStatus !== 'scanned'">
|
<div v-if="scanStatus !== 'scanned'">
|
||||||
<div v-if="scanStatus === 'beforeScan'">
|
<div v-if="scanStatus === 'beforeScan'">
|
||||||
|
<div v-if="form.lastCleanTime">
|
||||||
<el-text class="clean_title">
|
<el-text class="clean_title">
|
||||||
{{ $t('clean.lastCleanTime', [form.lastCleanTime || '-']) }}
|
{{ $t('clean.lastCleanTime', [form.lastCleanTime || '-']) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
@ -29,6 +30,13 @@
|
|||||||
}}
|
}}
|
||||||
</el-text>
|
</el-text>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div else>
|
||||||
|
<el-text class="clean_title">
|
||||||
|
<el-icon><MagicStick /></el-icon>
|
||||||
|
{{ $t('clean.scanHelper') }}
|
||||||
|
</el-text>
|
||||||
|
</div>
|
||||||
<div class="app-card">
|
<div class="app-card">
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user