Allow remote-to-remote sync pairs
This commit is contained in:
@@ -111,6 +111,14 @@ export default function SyncPairs() {
|
||||
toast.error('Source and destination paths are required');
|
||||
return;
|
||||
}
|
||||
if (
|
||||
form.source_machine_id !== null &&
|
||||
form.dest_machine_id !== null &&
|
||||
form.source_machine_id === form.dest_machine_id
|
||||
) {
|
||||
toast.error('Source and destination cannot be the same machine');
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
try {
|
||||
await api(form.id ? `/api/sync-pairs/${form.id}` : '/api/sync-pairs', {
|
||||
@@ -325,6 +333,9 @@ export default function SyncPairs() {
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<p className="text-xs text-fg-subtle">
|
||||
Where the data lives. Pick <span className="font-medium">Local server</span> if it's on this machine, otherwise the remote machine holding the data.
|
||||
</p>
|
||||
</div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="sp-dest-machine">Dest Machine</Label>
|
||||
@@ -346,6 +357,9 @@ export default function SyncPairs() {
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<p className="text-xs text-fg-subtle">
|
||||
Where to copy the data. Can be the same machine (no-op) or any remote. Remote-to-remote is supported.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
|
||||
Reference in New Issue
Block a user