Scheduler: 50/50 split, taller log, auto-load most recent log on page load
This commit is contained in:
@@ -247,3 +247,18 @@ function vvClearRightLog() {
|
||||
.catch(() => {});
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
// Auto-open the most recently run script on page load
|
||||
$lastId = null; $lastMtime = 0;
|
||||
foreach ($tree as $orch) {
|
||||
$log = vv_job_log_path($orch['id']);
|
||||
if (file_exists($log) && ($m = filemtime($log)) > $lastMtime) { $lastMtime = $m; $lastId = $orch['id']; }
|
||||
foreach (($orch['children'] ?? []) as $child) {
|
||||
$log = vv_job_log_path($child['id']);
|
||||
if (file_exists($log) && ($m = filemtime($log)) > $lastMtime) { $lastMtime = $m; $lastId = $child['id']; }
|
||||
}
|
||||
}
|
||||
if ($lastId): ?>
|
||||
<script>vvOpenRight(<?= json_encode($lastId) ?>);</script>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user