From 03230b536725ac3c98895aff3b0e6c0326d29fbb Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:11:23 +0530 Subject: [PATCH] bug-fix: Restore snapshot shouldn't restore index alias always (#1193) (#1206) (cherry picked from commit 2d7c80b296572a2b57fbfa20ba7f3b6a168dd7ac) Signed-off-by: Sandeep Kumawat Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Sandeep Kumawat Co-authored-by: Ramakrishna Chilaka <49393831+RamakrishnaChilaka@users.noreply.github.com> --- .../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