+
+ {t('recovery_merge_title', { defaultValue: 'Recover Offline Server' })}
+
+ {t('recovery_merge_description', {
+ defaultValue: 'Pick the online replacement agent to rebind and merge back into this offline server.'
+ })}
+
+
+
+ {currentJob && (
+
+
+ {currentJob.stage}
+
+ {t('recovery_merge_existing_job', { defaultValue: 'A recovery job is already in progress.' })}
+
+
+
+ )}
+
+ {candidatesQuery.isLoading && (
+
+
+ {t('recovery_merge_loading', { defaultValue: 'Loading recovery candidates…' })}
+
+ )}
+
+ {candidatesQuery.isError && (
+
+ {t('recovery_merge_candidates_failed', { defaultValue: 'Failed to load recovery candidates.' })}
+
+ )}
+
+ {!(candidatesQuery.isLoading || candidatesQuery.isError) && candidates.length === 0 && (
+
+ {t('recovery_merge_empty', { defaultValue: 'No online recovery candidates are available right now.' })}
+
+ )}
+
+ {readOnly ? (
+
+ {t('recovery_merge_read_only', {
+ defaultValue: 'This dialog is read-only while a recovery job is active.'
+ })}
+
+ ) : (
+ candidates.length > 0 && (
+
+
+ {candidates.map((candidate) => {
+ const selected = candidate.server_id === selectedSourceId
+ return (
+
+ )
+ })}
+
+
+ )
+ )}
+
+
+ {t('recovery_merge_warning', {
+ defaultValue:
+ 'This keeps the original server record, asks the replacement agent to rebind, and continues the recovery flow from there.'
+ })}
+
+
+
+
+
+
+
+