add show crontab next 5 execution times
This commit is contained in:
parent
bc94bfacbb
commit
4276a2c203
@ -116,8 +116,8 @@ const cronString = computed(() => {
|
|||||||
const executionTimesString = computed(() => {
|
const executionTimesString = computed(() => {
|
||||||
if (isCronValid(cron.value)) {
|
if (isCronValid(cron.value)) {
|
||||||
const lastExecutionTimes = getLastExecutionTimes(cron.value);
|
const lastExecutionTimes = getLastExecutionTimes(cron.value);
|
||||||
const executionTimesString = lastExecutionTimes.join('<br>'); // 使用 <br> 标签
|
const executionTimesString = lastExecutionTimes.join('\n');
|
||||||
return `Next 5 execution times:<br>${executionTimesString}`; // 在这里也添加 <br> 标签
|
return `Next 5 execution times:\n${executionTimesString}`;
|
||||||
}
|
}
|
||||||
return ' ';
|
return ' ';
|
||||||
});
|
});
|
||||||
@ -146,7 +146,7 @@ const cronValidationRules = [
|
|||||||
{{ cronString }}
|
{{ cronString }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-html="executionTimesString" class="cron-execution-string"></div>
|
<div class="cron-execution-string">{{ executionTimesString }}</div>
|
||||||
|
|
||||||
<n-divider />
|
<n-divider />
|
||||||
|
|
||||||
@ -217,6 +217,7 @@ const cronValidationRules = [
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
margin: 5px 0 15px;
|
margin: 5px 0 15px;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user