Skip to content

Commit

Permalink
Merge branch '2.x' into backport/backport-1213-to-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
RamakrishnaChilaka authored Dec 16, 2024
2 parents 33df3d1 + 03230b5 commit b567868
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,24 @@ export class RestoreSnapshotFlyout extends MDSEnabledComponent<RestoreSnapshotPr
};

onToggle = (e: ChangeEvent<HTMLInputElement>) => {
const { restore_specific_indices, restore_all_indices, customize_index_settings, ignore_index_settings } = RESTORE_OPTIONS;
const {
restore_specific_indices,
restore_all_indices,
customize_index_settings,
ignore_index_settings,
restore_aliases,
} = RESTORE_OPTIONS;

if (e.target.id === restore_specific_indices) {
this.setState({ restoreSpecific: true, snapshot: _.set(this.state.snapshot!, e.target.id, e.target.checked) });
return;
}

if (e.target.id === restore_aliases) {
this.setState({ snapshot: _.set(this.state.snapshot!, e.target.id, e.target.checked) });
return;
}

if (e.target.id === restore_all_indices) {
this.setState({
restoreSpecific: false,
Expand Down Expand Up @@ -482,7 +493,7 @@ export class RestoreSnapshotFlyout extends MDSEnabledComponent<RestoreSnapshotPr

<SnapshotRestoreAdvancedOptions
getIndexSettings={this.getIndexSettings}
restoreAliases={String(_.get(snapshot, restore_aliases, true)) == "true"}
restoreAliases={String(_.get(snapshot, restore_aliases, false)) == "true"}
onRestoreAliasesToggle={this.onToggle}
restoreClusterState={String(_.get(snapshot, include_global_state, false)) == "true"}
onRestoreClusterStateToggle={this.onToggle}
Expand Down

0 comments on commit b567868

Please sign in to comment.