Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,8 @@ const message = {
curl: 'Access URL',
taskName: 'Name',
cronSpec: 'Trigger cycle',
cronSpecDoc:
'Custom execution cycles only support the [minute hour day month week] format, e.g., 0 0 * * *. For details, please refer to the official documentation.',
cronSpecHelper: 'Enter the correct execution period',
cleanHelper:
'This operation records all job execution records, backup files, and log files. Do you want to continue?',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,8 @@ const message = {
curl: 'アクセスURL',
taskName: '名前',
cronSpec: 'トリガーサイクル',
cronSpecDoc:
'カスタム実行周期は【分 時 日 月 曜日】形式のみサポートしています(例: 0 0 * * *)。詳細は公式ドキュメントをご参照ください。',
cronSpecHelper: '正しい実行期間を入力します',
cleanHelper:
'この操作は、すべてのジョブ実行レコード、バックアップファイル、ログファイルを記録します。続けたいですか?',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,8 @@ const message = {
curl: '접속 URL',
taskName: '작업 이름',
cronSpec: '트리거 주기',
cronSpecDoc:
'사용자 정의 실행 주기는 [분 시 일 월 요일] 형식만 지원합니다 (예: 0 0 * * *). 자세한 내용은 공식 문서를 참조하세요.',
cronSpecHelper: '올바른 실행 주기를 입력해 주세요',
cleanHelper: '이 작업은 모든 작업 실행 레코드, 백업 파일, 로그 파일을 기록합니다. 계속하시겠습니까?',
directory: '백업 디렉토리',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,8 @@ const message = {
curl: 'Akses URL',
taskName: 'Nama',
cronSpec: 'Kitaran pencetus',
cronSpecDoc:
'Kitaran pelaksanaan tersuai hanya menyokong format [minit jam hari bulan minggu], contohnya 0 0 * * *. Untuk maklumat lanjut, sila rujuk dokumen rasmi.',
cronSpecHelper: 'Masukkan tempoh pelaksanaan yang betul',
cleanHelper:
'Operasi ini merekodkan semua rekod pelaksanaan tugas, fail sandaran, dan fail log. Adakah anda mahu meneruskan?',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,8 @@ const message = {
curl: 'URL de acesso',
taskName: 'Nome',
cronSpec: 'Ciclo de execução',
cronSpeDoc:
'Ciclos de execução personalizados suportam apenas o formato [minuto hora dia mês semana], por exemplo, 0 0 * * *. Consulte a documentação oficial para obter detalhes.',
cronSpecHelper: 'Digite o período correto de execução',
cleanHelper:
'Esta operação registra todos os registros de execução de tarefas, arquivos de backup e logs. Você deseja continuar?',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,8 @@ const message = {
curl: 'Доступ к URL',
taskName: 'Имя',
cronSpec: 'Цикл запуска',
cronSpecDoc:
'Пользовательское расписание поддерживает только формат [минута час день месяц неделя], например, 0 0 * * *. Подробности см. в официальной документации.',
cronSpecHelper: 'Введите правильный период выполнения',
cleanHelper:
'Эта операция записывает все записи выполнения задач, файлы резервных копий и файлы логов. Хотите продолжить?',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,8 @@ const message = {
curl: 'URLe erişim',
taskName: 'Ad',
cronSpec: 'Tetikleme döngüsü',
cronSpecDoc:
'Özel çalışma döngüleri yalnızca [dakika saat gün ay hafta] formatını destekler, örneğin, 0 0 * * *. Ayrıntılar için resmi belgelere bakın.',
cronSpecHelper: 'Doğru yürütme dönemini girin',
cleanHelper:
'Bu işlem tüm görev yürütme kayıtlarını, yedekleme dosyalarını ve log dosyalarını kaydeder. Devam etmek istiyor musunuz?',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ const message = {
curl: '訪問 URL',
taskName: '任務名稱',
cronSpec: '執行周期',
cronSpecDoc: '自定義執行週期僅支援【分 時 日 月 週】格式,例如 0 0 * * *,具體可參考官方文件。',
cronSpecHelper: '請輸入正確的執行周期',
cleanHelper: '該操作將所有任務執行記錄、備份文件和日誌文件,是否繼續?',
backupContent: '備份內容',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ const message = {
curl: '访问 URL',
taskName: '任务名称',
cronSpec: '执行周期',
cronSpecDoc: '自定义执行周期仅支持【分时日月周】格式,如 0 0 * * * ,具体可参考官方文档',
cronSpecHelper: '请输入正确的执行周期',
cleanHelper: '该操作将所有任务执行记录、备份文件和日志文件,是否继续?',
backupContent: '备份内容',
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/views/cronjob/cronjob/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@
</el-button>
<el-divider v-if="form.specs.length > 1" class="divider" />
</div>
<span class="input-help logText">
{{ $t('cronjob.cronSpecDoc') }}
<el-link class="link" icon="Position" @click="toDoc" type="primary">
{{ $t('firewall.quickJump') }}
</el-link>
</span>
</el-form-item>
<el-button class="mb-3" @click="handleSpecCustomAdd()">
{{ $t('commons.button.add') }}
Expand Down Expand Up @@ -793,7 +799,7 @@ const form = reactive<Cronjob.CronjobInfo>({
groupID: null,
specCustom: false,
spec: '',
specs: [],
specs: ['0 0 * * *'],
specObjs: [{ specType: 'perMonth', week: 1, day: 3, hour: 1, minute: 30, second: 30 }],

executor: '',
Expand Down Expand Up @@ -990,7 +996,7 @@ const verifySpec = (rule: any, value: any, callback: any) => {
return;
}
for (let i = 0; i < form.specs.length; i++) {
if (form.specs[i]) {
if (form.specs[i] && form.specs[i].split(' ').length === 5) {
continue;
}
callback(new Error(i18n.global.t('cronjob.cronSpecRule', [i + 1])));
Expand Down Expand Up @@ -1137,6 +1143,10 @@ const rules = reactive({
type FormInstance = InstanceType<typeof ElForm>;
const formRef = ref<FormInstance>();

const toDoc = () => {
window.open(globalStore.docsUrl + '/user_manual/cronjobs/', '_blank', 'noopener,noreferrer');
};

const loadDir = async (path: string) => {
form.sourceDir = path;
};
Expand Down
Loading