perf: 优化时间选择器,自动填写分钟和秒钟

This commit is contained in:
xiaojunnuo
2024-11-01 10:23:27 +08:00
parent 9b4a31fa6a
commit 396dc34a84
7 changed files with 17 additions and 5 deletions

View File

@@ -306,8 +306,11 @@ export class PipelineService extends BaseService<PipelineEntity> {
return;
}
cron = cron.trim();
if (cron.startsWith('* *')) {
cron = cron.replace('* *', '0 0');
}
if (cron.startsWith('*')) {
cron = '0' + cron.substring(1, cron.length);
cron = cron.replace('*', '0');
}
const triggerId = trigger.id;
const name = this.buildCronKey(pipelineId, triggerId);