- <>
- {/* Section title group; containing min age */}
-
+
+
+ {showReplicasField && }
+
+ {/* Freeze section */}
+ {!isUsingSearchableSnapshotInHotPhase && (
+
-
-
-
{' '}
- {enabled && }
-
- }
- titleSize="s"
- description={
- <>
-
+
path="_meta.hot.customRollover.enabled">
+ {(field) => (
+ <>
+ field.setValue(e.target.checked)}
+ data-test-subj="rolloverSwitch"
+ />
+
+
+ }
+ />
+ >
+ )}
+
+ {isUsingRollover && (
+ <>
+
+ {showEmptyRolloverFieldsError && (
+ <>
+
+ {i18nTexts.editPolicy.errors.rollOverConfigurationCallout.body}
+
+
+ >
+ )}
+
+
+
+ {(field) => {
+ const showErrorCallout = field.errors.some(
+ (e) => e.code === ROLLOVER_EMPTY_VALIDATION
+ );
+ if (showErrorCallout !== showEmptyRolloverFieldsError) {
+ setShowEmptyRolloverFieldsError(showErrorCallout);
+ }
+ return (
+
+ );
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
+ ) : (
+