mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-08 14:37:29 +08:00
fix: Fix the failure to back up file names containing Spaces for scheduled jobs (#8263)
This commit is contained in:
parent
d4213daa58
commit
d09a3d82b9
12 changed files with 14 additions and 6 deletions
|
@ -83,8 +83,8 @@ func (u *CronjobService) handleWebsite(cronjob model.Cronjob, startTime time.Tim
|
|||
record.Name = web.Alias
|
||||
record.DetailName = web.Alias
|
||||
record.DownloadAccountID, record.SourceAccountIDs = cronjob.DownloadAccountID, cronjob.SourceAccountIDs
|
||||
backupDir := path.Join(global.Dir.TmpDir, fmt.Sprintf("website/%s", web.PrimaryDomain))
|
||||
record.FileName = fmt.Sprintf("website_%s_%s.tar.gz", web.PrimaryDomain, startTime.Format(constant.DateTimeSlimLayout)+common.RandStrAndNum(5))
|
||||
backupDir := path.Join(global.Dir.TmpDir, fmt.Sprintf("website/%s", web.Alias))
|
||||
record.FileName = fmt.Sprintf("website_%s_%s.tar.gz", web.Alias, startTime.Format(constant.DateTimeSlimLayout)+common.RandStrAndNum(5))
|
||||
if err := handleWebsiteBackup(&web, backupDir, record.FileName, cronjob.ExclusionRules, cronjob.Secret, taskID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -768,7 +768,7 @@ func (f FileOp) TarGzFilesWithCompressPro(list []string, dst, secret string) err
|
|||
|
||||
var filelist []string
|
||||
for _, item := range list {
|
||||
filelist = append(filelist, "-C "+path.Dir(item)+" "+path.Base(item))
|
||||
filelist = append(filelist, "-C '"+path.Dir(item)+"' '"+path.Base(item)+"' ")
|
||||
}
|
||||
commands := ""
|
||||
if len(secret) != 0 {
|
||||
|
|
|
@ -1291,6 +1291,7 @@ const message = {
|
|||
settings: 'Setting',
|
||||
cronjobs: 'Cronjob',
|
||||
databases: 'Database',
|
||||
waf: 'WAF',
|
||||
licenses: 'License',
|
||||
nodes: 'Node',
|
||||
commands: 'Quick Commands',
|
||||
|
|
|
@ -1228,6 +1228,7 @@ const message = {
|
|||
settings: 'パネル設定',
|
||||
cronjobs: 'スケジュールされたタスク',
|
||||
databases: 'データベース',
|
||||
waf: 'WAF',
|
||||
licenses: 'ライセンス',
|
||||
nodes: 'ノード',
|
||||
commands: 'クイックコマンド',
|
||||
|
|
|
@ -1215,6 +1215,7 @@ const message = {
|
|||
logs: '로그 감사',
|
||||
settings: '패널 설정',
|
||||
cronjobs: '예약 작업',
|
||||
waf: 'WAF',
|
||||
databases: '데이터베이스',
|
||||
licenses: '라이선스',
|
||||
nodes: '노드',
|
||||
|
|
|
@ -1270,6 +1270,7 @@ const message = {
|
|||
logs: 'Audit Log',
|
||||
settings: 'Tetapan Panel',
|
||||
cronjobs: 'Tugas Terjadual',
|
||||
waf: 'WAF',
|
||||
databases: 'Pangkalan',
|
||||
licenses: 'lesen',
|
||||
nodes: 'nod',
|
||||
|
|
|
@ -1253,6 +1253,7 @@ const message = {
|
|||
logs: 'Auditoria de Logs',
|
||||
settings: 'Configurações do Painel',
|
||||
cronjobs: 'Tarefas Agendadas',
|
||||
waf: 'WAF',
|
||||
databases: 'Bancos de Dados',
|
||||
licenses: 'licenças',
|
||||
nodes: 'nós',
|
||||
|
|
|
@ -1261,6 +1261,7 @@ const message = {
|
|||
logs: 'Аудит журналов',
|
||||
settings: 'Настройки панели',
|
||||
cronjobs: 'Запланированные задачи',
|
||||
waf: 'WAF',
|
||||
databases: 'Базы данных',
|
||||
licenses: 'лицензии',
|
||||
nodes: 'ноды',
|
||||
|
|
|
@ -1220,6 +1220,7 @@ const message = {
|
|||
logs: '日誌審計',
|
||||
settings: '面板設定',
|
||||
cronjobs: '計畫任務',
|
||||
waf: 'WAF',
|
||||
databases: '資料庫',
|
||||
licenses: '許可證',
|
||||
nodes: '節點',
|
||||
|
|
|
@ -1219,6 +1219,7 @@ const message = {
|
|||
settings: '面板设置',
|
||||
cronjobs: '计划任务',
|
||||
databases: '数据库',
|
||||
waf: 'WAF',
|
||||
licenses: '许可证',
|
||||
nodes: '节点',
|
||||
commands: '快速命令',
|
||||
|
|
|
@ -43,8 +43,8 @@ import { onMounted, ref } from 'vue';
|
|||
|
||||
defineOptions({ name: 'OpDialog' });
|
||||
|
||||
const checkAll = ref(false);
|
||||
const isIndeterminate = ref(true);
|
||||
const checkAll = ref();
|
||||
const isIndeterminate = ref(false);
|
||||
const checkedItems = ref([]);
|
||||
const list = ref([]);
|
||||
|
||||
|
@ -58,7 +58,6 @@ const acceptParams = (props: DialogProps): void => {
|
|||
checkAll.value = false;
|
||||
checkedItems.value = [];
|
||||
list.value = props.list;
|
||||
checkAll.value = true;
|
||||
open.value = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<el-option :label="$t('logs.detail.cronjobs')" value="cronjobs" />
|
||||
<el-option :label="$t('logs.detail.toolbox')" value="toolbox" />
|
||||
<el-option :label="$t('logs.detail.process')" value="process" />
|
||||
<el-option label="WAF" value="waf" />
|
||||
<el-option :label="$t('logs.detail.nodes')" value="nodes" />
|
||||
<el-option :label="$t('logs.detail.tampers')" value="tampers" />
|
||||
<el-option :label="$t('logs.detail.xsetting')" value="xsetting" />
|
||||
|
|
Loading…
Add table
Reference in a new issue