From dc8b5b489931e5f9c1fdc4ebdc0b1fb8e9ab5aac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 Nov 2024 06:18:03 +0000 Subject: [PATCH] bug-fix: Restore snapshot shouldn't restore index alias always (#1193) Signed-off-by: Sandeep Kumawat Co-authored-by: Sandeep Kumawat (cherry picked from commit 2d7c80b296572a2b57fbfa20ba7f3b6a168dd7ac) Signed-off-by: github-actions[bot] --- .../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