Skip to content

Commit 34fbc1f

Browse files
committed
style: Optimize cache cleaning interface styling
1 parent fd9c421 commit 34fbc1f

File tree

11 files changed

+22
-23
lines changed

11 files changed

+22
-23
lines changed

agent/app/service/device_clean.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func doSystemClean(taskItem *task.Task) func(t *task.Task) error {
274274
}
275275

276276
dropWithTask(path.Join(global.Dir.BaseDir, snapshotTmpPath), taskItem, &size, &fileCount)
277-
dropWithTask(path.Join(global.Dir.LocalBackupDir, "system"), taskItem, &size, &fileCount)
277+
dropWithTask(path.Join(global.Dir.LocalBackupDir, "tmp/system"), taskItem, &size, &fileCount)
278278

279279
dropWithTask(path.Join(global.Dir.BaseDir, rollbackPath, "app"), taskItem, &size, &fileCount)
280280
dropWithTask(path.Join(global.Dir.BaseDir, rollbackPath, "website"), taskItem, &size, &fileCount)
@@ -615,11 +615,11 @@ func dropWithTask(itemPath string, taskItem *task.Task, size *int64, count *int)
615615
*size += itemSize
616616
*count += itemCount
617617
if err := os.RemoveAll(itemPath); err != nil {
618-
taskItem.Log(i18n.GetMsgWithDetail("FileDropFailed", err.Error()))
618+
taskItem.Log(i18n.GetWithNameAndErr("FileDropFailed", itemPath, err))
619619
return
620620
}
621621
if itemCount != 0 {
622-
taskItem.Log(i18n.GetMsgWithMap("FileDropSuccess", map[string]interface{}{"count": itemCount, "size": common.LoadSizeUnit2F(float64(itemSize))}))
622+
taskItem.Log(i18n.GetMsgWithMap("FileDropSuccess", map[string]interface{}{"name": itemPath, "count": itemCount, "size": common.LoadSizeUnit2F(float64(itemSize))}))
623623
}
624624
}
625625

agent/i18n/lang/en.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ ErrFavoriteExist: 'This path has already been favorited'
108108
ErrInvalidChar: 'Illegal characters are not allowed'
109109
ErrPathNotDelete: 'The selected directory cannot be deleted'
110110
ErrLogFileToLarge: "The log file exceeds 500MB and cannot be opened"
111-
FileDropFailed: "File cleanup failed {{ .detail }}"
112-
FileDropSuccess: "File cleanup successful, cleaned {{ .count }} files, freed {{ .size }} disk space"
111+
FileDropFailed: "Failed to clean up file {{ .name }}: {{ .err }}"
112+
FileDropSuccess: "Successfully cleaned up file {{ .name }}, cleaned {{ .count }} files, freed {{ .size }} disk space"
113113
FileDropSum: "File cleanup completed successfully, total {{ .count }} files cleaned, total {{ .size }} disk space freed"
114114

115115
#website

agent/i18n/lang/ja.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ ErrFavoriteExist: 'このパスはすでにお気に入りに登録されてい
108108
ErrInvalidChar: '不正な文字は許可されません'
109109
ErrPathNotDelete: '選択されたディレクトリは削除できません'
110110
ErrLogFileToLarge: "ログファイルが500MBを超えており、開くことができません"
111-
FileDropFailed: "ファイルのクリーンアップに失敗しました {{ .detail }}"
112-
FileDropSuccess: "ファイルのクリーンアップ成功、{{ .count }} ファイルを削除、{{ .size }} のディスク領域を解放"
111+
FileDropFailed: "ファイル {{ .name }} のクリーンアップに失敗しました: {{ .err }}"
112+
FileDropSuccess: "ファイル {{ .name }} のクリーンアップに成功しました、{{ .count }} ファイルを削除、{{ .size }} のディスク領域を解放"
113113
FileDropSum: "ファイルのクリーンアップが完了しました、合計 {{ .count }} ファイルを削除、合計 {{ .size }} のディスク領域を解放"
114114

115115
#website

agent/i18n/lang/ko.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ ErrFavoriteExist: '이 경로는 이미 즐겨찾기되었습니다'
108108
ErrInvalidChar: '불법 문자는 허용되지 않습니다'
109109
ErrPathNotDelete: '선택한 디렉토리를 삭제할 수 없습니다'
110110
ErrLogFileToLarge: "로그 파일이 500MB를 초과하여 열 수 없습니다"
111-
FileDropFailed: "파일 정리 실패 {{ .detail }}"
112-
FileDropSuccess: "파일 정리 성공, {{ .count }}개 파일 삭제, {{ .size }} 디스크 공간 확보"
111+
FileDropFailed: "파일 {{ .name }} 정리 실패: {{ .err }}"
112+
FileDropSuccess: "파일 {{ .name }} 정리 성공, {{ .count }}개 파일 삭제, {{ .size }} 디스크 공간 확보"
113113
FileDropSum: "파일 정리 완료, 총 {{ .count }}개 파일 삭제, 총 {{ .size }} 디스크 공간 확보"
114114

115115
#웹사이트

agent/i18n/lang/ms.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ ErrFavoriteExist: 'Laluan ini telah digemari'
111111
ErrInvalidChar: 'Aksara haram tidak dibenarkan'
112112
ErrPathNotDelete: 'Direktori yang dipilih tidak boleh dipadamkan'
113113
ErrLogFileTooLarge: "Fail log melebihi 500MB dan tidak boleh dibuka"
114-
FileDropFailed: "Pembersihan fail gagal {{ .detail }}"
115-
FileDropSuccess: "Pembersihan fail berjaya, {{ .count }} fail dibersihkan, {{ .size }} ruang cakera dibebaskan"
114+
FileDropFailed: "Gagal membersihkan fail {{ .name }}: {{ .err }}"
115+
FileDropSuccess: "Berjaya membersihkan fail {{ .name }}, {{ .count }} fail dibersihkan, {{ .size }} ruang cakera dibebaskan"
116116
FileDropSum: "Pembersihan fail selesai, sejumlah {{ .count }} fail dibersihkan, sejumlah {{ .size }} ruang cakera dibebaskan"
117117

118118
#laman web

agent/i18n/lang/pt-BR.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ ErrFavoriteExist: 'Este caminho já foi favorito'
111111
ErrInvalidChar: 'Caracteres ilegais não são permitidos'
112112
ErrPathNotDelete: 'O diretório selecionado não pode ser excluído'
113113
ErrLogFileToLarge: "Fail log melebihi 500MB, tidak boleh dibuka"
114-
FileDropFailed: "Falha na limpeza de arquivos {{ .detail }}"
115-
FileDropSuccess: "Limpeza de arquivos bem-sucedida, {{ .count }} arquivos removidos, {{ .size }} de espaço em disco liberado"
114+
FileDropFailed: "Falha ao limpar arquivo {{ .name }}: {{ .err }}"
115+
FileDropSuccess: "Arquivo {{ .name }} limpo com sucesso, {{ .count }} arquivos removidos, {{ .size }} de espaço em disco liberado"
116116
FileDropSum: "Limpeza de arquivos concluída com sucesso, total de {{ .count }} arquivos removidos, total de {{ .size }} de espaço em disco liberado"
117117

118118
#site

agent/i18n/lang/ru.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ ErrFavoriteExist: 'Этот путь уже добавлен в избранно
111111
ErrInvalidChar: 'Недопустимые символы не допускаются'
112112
ErrPathNotDelete: 'Выбранный каталог не может быть удален'
113113
ErrLogFileToLarge: "Файл журнала превышает 500MB и не может быть открыт"
114-
FileDropFailed: "Очистка файлов не удалась {{ .detail }}"
115-
FileDropSuccess: "Очистка файлов успешна, удалено {{ .count }} файлов, освобождено {{ .size }} дискового пространства"
114+
FileDropFailed: "Не удалось очистить файл {{ .name }}: {{ .err }}"
115+
FileDropSuccess: "Файл {{ .name }} успешно очищен, удалено {{ .count }} файлов, освобождено {{ .size }} дискового пространства"
116116
FileDropSum: "Очистка файлов завершена успешно, всего удалено {{ .count }} файлов, освобождено {{ .size }} дискового пространства"
117117

118118
#веб-сайт

agent/i18n/lang/tr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ ErrFavoriteExist: 'Bu yol zaten favorilere eklendi'
111111
ErrInvalidChar: 'Yasak karakterlere izin verilmiyor'
112112
ErrPathNotDelete: 'Seçilen dizin silinemez'
113113
ErrLogFileToLarge: "Günlük dosyası 500MB'ı aşıyor ve açılamıyor"
114-
FileDropFailed: "Dosya temizleme başarısız {{ .detail }}"
115-
FileDropSuccess: "Dosya temizleme başarılı, {{ .count }} dosya silindi, {{ .size }} disk alanı boşaltıldı"
114+
FileDropFailed: "{{ .name }} dosyası temizlenemedi: {{ .err }}"
115+
FileDropSuccess: "{{ .name }} dosyası başarıyla temizlendi, {{ .count }} dosya silindi, {{ .size }} disk alanı boşaltıldı"
116116
FileDropSum: "Dosya temizleme tamamlandı, toplam {{ .count }} dosya silindi, toplam {{ .size }} disk alanı boşaltıldı"
117117

118118

agent/i18n/lang/zh-Hant.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ ErrFavoriteExist: '已收藏此路徑'
107107
ErrInvalidChar: '禁止使用非法字元'
108108
ErrPathNotDelete: '所選目錄不可刪除'
109109
ErrLogFileToLarge: "日志文件超过 500M,無法打開"
110-
FileDropFailed: "文件清理失敗 {{ .detail }}"
111-
FileDropSuccess: "文件清理成功,清理 {{ .count }} 個文件,釋放 {{ .size }} 磁碟空間"
110+
FileDropFailed: "清理文件 {{ .name }} 失敗: {{ .err }}"
111+
FileDropSuccess: "清理文件 {{ .name }} 成功,清理 {{ .count }} 個文件,釋放 {{ .size }} 磁碟空間"
112112
FileDropSum: "文件清理完成,共清理 {{ .count }} 個文件,共釋放 {{ .size }} 磁碟空間"
113113

114114
#website

agent/i18n/lang/zh.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ ErrFavoriteExist: "已收藏此路径"
107107
ErrInvalidChar: "禁止使用非法字符"
108108
ErrPathNotDelete: "所选目录不可删除"
109109
ErrLogFileToLarge: "日志文件超过 500M,无法打开"
110-
FileDropFailed: "文件清理失败 {{ .detail }}"
111-
FileDropSuccess: "文件清理成功,清理文件 {{ .count }},释放磁盘空间 {{ .size }}"
110+
FileDropFailed: "清理文件 {{ .name }} 失败 {{ .err }}"
111+
FileDropSuccess: "清理文件 {{ .name }} 成功,清理文件 {{ .count }},释放磁盘空间 {{ .size }}"
112112
FileDropSum: "文件清理成功,清理文件共计 {{ .count }},释放磁盘空间共计 {{ .size }}"
113113

114114
#website

0 commit comments

Comments
 (0)