From 625404ec65617ebaaaf0832fe659e5ddd5a1e45d Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Mon, 28 Oct 2024 02:02:04 +0530 Subject: [PATCH] bug-fix: Restore snapshot shouldn't restore index alias always Signed-off-by: Sandeep Kumawat --- .../RestoreSnapshotFlyout.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/public/pages/Snapshots/components/RestoreSnapshotFlyout/RestoreSnapshotFlyout.tsx b/public/pages/Snapshots/components/RestoreSnapshotFlyout/RestoreSnapshotFlyout.tsx index b29ae9cf1..95867c380 100644 --- a/public/pages/Snapshots/components/RestoreSnapshotFlyout/RestoreSnapshotFlyout.tsx +++ b/public/pages/Snapshots/components/RestoreSnapshotFlyout/RestoreSnapshotFlyout.tsx @@ -289,13 +289,24 @@ export class RestoreSnapshotFlyout extends MDSEnabledComponent) => { - 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, @@ -482,7 +493,7 @@ export class RestoreSnapshotFlyout extends MDSEnabledComponent