rsync window cards: expand to show orch scripts and sync shares, drop toggle
This commit is contained in:
@@ -30,6 +30,26 @@ if (file_exists($bwLog)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Per-window orch arrays (scripts + sync shares)
|
||||
$masterRaw = vv_read_conf_raw('master.conf');
|
||||
$myId = strtoupper(vv_detect_host());
|
||||
$hostRaw = vv_read_conf_raw(vv_detect_host() . '.conf');
|
||||
|
||||
$winArrayDefs = [
|
||||
'critical' => ['CRITICAL_MAINTENANCE_SCRIPTS', "{$myId}_CRITICAL_SYNC_SHARES"],
|
||||
'intermediate' => ['INTERMEDIATE_MAINTENANCE_SCRIPTS', "{$myId}_INTERMEDIATE_SYNC_SHARES"],
|
||||
'daily' => ['DAILY_MAINTENANCE_SCRIPTS', "{$myId}_DAILY_SYNC_SHARES"],
|
||||
'weekly' => ['WEEKLY_MAINTENANCE_SCRIPTS', "{$myId}_WEEKLY_SYNC_SHARES"],
|
||||
'fallback' => [null, null],
|
||||
];
|
||||
$winArrays = [];
|
||||
foreach ($winArrayDefs as $win => [$sv, $shv]) {
|
||||
$winArrays[$win] = [
|
||||
'scripts' => $sv ? vv_parse_bash_array($masterRaw, $sv) : [],
|
||||
'shares' => $shv ? vv_parse_bash_array($hostRaw, $shv) : [],
|
||||
];
|
||||
}
|
||||
|
||||
echo json_encode([
|
||||
'enabled' => $base['enabled'],
|
||||
'windows' => $base['windows'],
|
||||
@@ -37,6 +57,7 @@ echo json_encode([
|
||||
'last_sync' => $base['last_sync'],
|
||||
'bw_history' => $history,
|
||||
'bw_warn_gb' => $warnGb,
|
||||
'win_arrays' => $winArrays,
|
||||
'settings' => [
|
||||
'bw_limit' => (int)($vars['BW_LIMIT'] ?? 0),
|
||||
'retry_count' => (int)($vars['RETRY_COUNT'] ?? 3),
|
||||
|
||||
Reference in New Issue
Block a user