Scheduler: 50/50 split, taller log, auto-load most recent log on page load
This commit is contained in:
@@ -63,17 +63,17 @@
|
||||
|
||||
/* Two-panel layout */
|
||||
#vv-sched-layout { display: flex; gap: 16px; align-items: flex-start; }
|
||||
#vv-sched-left { flex: 0 0 500px; min-width: 0; }
|
||||
#vv-sched-right { display: none; flex: 1; min-width: 0; position: sticky; top: 16px; }
|
||||
#vv-sched-left { flex: 1 1 0; min-width: 0; }
|
||||
#vv-sched-right { display: none; flex: 1 1 0; min-width: 0; position: sticky; top: 16px; }
|
||||
#vv-sched-right.vv-panel-visible { display: block; }
|
||||
.vv-log-right-pre { min-height: 360px; max-height: calc(100vh - 200px); }
|
||||
.vv-log-right-pre { min-height: calc(100vh - 220px); max-height: calc(100vh - 220px); }
|
||||
|
||||
/* Mobile: stack vertically, right panel full-width below cards */
|
||||
@media (max-width: 880px) {
|
||||
#vv-sched-layout { flex-direction: column; }
|
||||
#vv-sched-left { flex: none; width: 100%; }
|
||||
#vv-sched-right { position: static; width: 100%; }
|
||||
.vv-log-right-pre { min-height: 200px; max-height: 340px; }
|
||||
.vv-log-right-pre { min-height: 260px; max-height: 340px; }
|
||||
}
|
||||
|
||||
/* Card footer */
|
||||
|
||||
@@ -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