Scheduler UI: - Arrange mode: drag scripts between orchs and reorder within arrays; right panel shows unassigned script pool; Save Arrangement commits to master.conf - + Folder: named collapsible subfolders for Custom Scripts stored in schedule.json - Rsync children: hide Run/Dry Run/Log/location when orch is ON; show standalone location + cron controls when orch is OFF; cron only fires when both filled - Non-conf-managed children (transcode): toggles now show enabled when orch is on - Right panel height sync: fix ResizeObserver feedback loop via align-self:flex-start on left panel and left.offsetHeight in vvFitRight - How do I use this: updated to cover arrange, folders, rsync standalone, transcode New API endpoints: - board.php, clearlock.php, movescript.php, rawconf.php, readscript.php - reorderarray.php, rsync_standalone.php, savefolders.php run.php / dryrun.php: accept optional --location= arg for standalone rsync calls
30 lines
1.0 KiB
PHP
30 lines
1.0 KiB
PHP
<?php
|
|
// Raw conf read/write — respects per-host file visibility from vv_get_conf_files().
|
|
header('Content-Type: application/json');
|
|
require_once dirname(__DIR__) . '/include/config.php';
|
|
|
|
$allowed = vv_get_conf_files();
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
|
$file = trim($_GET['file'] ?? 'master.conf');
|
|
if (!in_array($file, $allowed, true) || str_contains($file, '..')) {
|
|
echo json_encode(['ok' => false, 'error' => 'Not allowed']);
|
|
exit;
|
|
}
|
|
echo json_encode(['ok' => true, 'content' => vv_read_conf_raw($file), 'file' => $file, 'allowed' => $allowed]);
|
|
exit;
|
|
}
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
$file = trim($_POST['file'] ?? '');
|
|
$content = $_POST['content'] ?? '';
|
|
if (!in_array($file, $allowed, true) || str_contains($file, '..')) {
|
|
echo json_encode(['ok' => false, 'error' => 'Not allowed']);
|
|
exit;
|
|
}
|
|
echo json_encode(['ok' => vv_write_conf_raw($file, $content)]);
|
|
exit;
|
|
}
|
|
|
|
echo json_encode(['ok' => false, 'error' => 'Method not allowed']);
|