Skip to content

Commit

Permalink
Merge feature branch with 2.x (#493)
Browse files Browse the repository at this point in the history
* Restore activities panel, monitoring restore progress, styling (#294) (#296)

* Bumping 2.x branch from version 2.1 to 2.2. (#218)

* Bumping 2.x branch from version 2.1 to 2.2. Bumped terser version to 4.8.1 to address CVE.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Drafted `2.2` release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Drafted `2.2` release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated rollup help text. (#220) (#221)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 4821889d37b5cd4884f4571d41960d9362d263a4)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>

* Amended 2.2 release notes. (#222)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored dependency used by test mock. Adjusted OSD version used by test workflows. (#229)

* Enabled unit and cypress test workflows on all branches. Adjusted OSD version used by unit and cypress test workflows to align with OSD branching strategy.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjusted path for a dependency used by unit tests to align with migration from EUI to OUI.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Bumped moment version to resolve dependabot alert. (#230) (#233)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 20374a49199c1f036f01ad0c78d4128339e0c361)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Version increment 2.2.1 (#235) (#239)

Signed-off-by: prudhvigodithi <pgodithi@amazon.com>

Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Co-authored-by: Prudhvi Godithi <pgodithi@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused code and comment cypress/integration/rollups_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix index list-snapshot restore, restrict restore to single selection

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Currently only visually functional. TODO - make it apply the options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add initial restore/rename options to ui. Only visual functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Move 'restore' button between 'delete' and 'take snapshot'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing Snapshots. Create repo and Create snapshot done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, unusted variables in SnapshotFlyout, SMservice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add full stop to help text/errors, add RESTORE_OPTIONS enum

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Removed the extra forward slash leading to a non-existing documentation (#231) (#244)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx (#236) (#241)

* Version increment 2.3.0 (#247)

* Add RestoreActivitiesPanel component folder, files (starter)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement tabs on Snapshots page: Snapshots, Restore activities...

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement skeleton Restore activities panel, panel switching in Snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on catIndexRecovery, TODO - debug

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix syntax bug - server/services/SnapshotManagementService.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolved some errors, getting a response but not correct response.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add back line 20 in rollups_spec, required by changes in 2.3 release.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement code to use Index Recovery api. successful.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress extracting data and displaying in Restore activities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement Restore Activities with self updating until restore done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add clickable indexes link and hello world click handler

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add toast if no snapshot selected upon restore activities click

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Add empty flyout where restoring indices will be listed

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change danger toast to warning when no snapshot selected

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add refresh button to restore activities page, remove auto refreshing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Added release notes for 2.3 (#250) (#254)

* Added release notes for 2.3

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove commit 221, move 229 to Maintenance, add 250 to Documentation

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Move 230 to Maintenance, 229 back to Bug fixes

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Move 229 back to Maintenance

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
(cherry picked from commit 248a2fe16d05a307837107419cbc4de8d765b6a7)
Signed-off-by: Angie Zhang <langelzh@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
Signed-off-by: Angie Zhang <langelzh@amazon.com>
Co-authored-by: phestecAMZN <111526961+phestecAMZN@users.noreply.github.com>

* Remove unused getRepos func, add repo prop, trim state in RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Changes to RestoreActivitesPanel to prep for listing indice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Snapshots testing in progress

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress, cypress testing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* 2.x _2.3 release notes, added 's' to 'Enhancement' header (#259)

* Version increament 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update OSD version in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add 2.3 release notes, added 's' to 'Enhancement' header

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit testing for AddPrefixInput, RenameInput components

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotRenameOptions component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotRestoreOption component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotIndicesInput component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 'Indices' to 'Index' if only 1 index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Auto populate prefix field initially with "restored_"

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change Restore button to color="primary" (blue)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add version bump 2.3.1 for OS in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Small mods to rollups_spec and snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Backport  #276 to 2.x, Snapshot restore - basic restore functionality (#279)

* Version increament 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update OSD version in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Snapshot Restore, basic restore functionality with basic options. Initial PR (#276)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused code and comment cypress/integration/rollups_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix index list-snapshot restore, restrict restore to single selection

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Currently only visually functional. TODO - make it apply the options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add initial restore/rename options to ui. Only visual functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Move 'restore' button between 'delete' and 'take snapshot'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing Snapshots. Create repo and Create snapshot done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, unusted variables in SnapshotFlyout, SMservice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add full stop to help text/errors, add RESTORE_OPTIONS enum

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add back line 20 in rollups_spec, required by changes in 2.3 release.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused getRepos func, add repo prop, trim state in RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.3 to 2.3.0, cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js causing error in PR E2E

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.2 to 2.3 unit-tests-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Uncomment line 19, rollups_spec.js to attempt E2E success on github

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix url, change "Sample" to "sample" rollups_spec lines 17, 21

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change "sample data" to "Add data" rollops_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

All of these variations pass seamlessly when run locally.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add 10s wait line19, rollups_spec to help find button next step

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
(cherry picked from commit f7db4af624d2a8665856ab7df6bee85299193777)

* Change 2.3 to 2.3.0, cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.3 to 2.3.0 in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Select indices individually to fix test, line62, snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove vertical space, snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Backport - 2.x => 2.4 (#286)

* Bump 2.x to 2.4

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.4 to 2.4.0 opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update 2.4, TODO rollups_spec, remove 'wait' when possible snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Small changes to AddPrefixInput.test, opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Changes in response to comments

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add comment to assist reader, RestoreActivitiesPanel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Replace '!' with '?', line 31 RestoreActivitiesPanel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add typing to RestoreActivitiesPanel FC

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Memoize actions, RestoreActivitiesPanel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: Chris Hesterman <phestech@amazon.com>
Signed-off-by: prudhvigodithi <pgodithi@amazon.com>
Signed-off-by: Angie Zhang <langelzh@amazon.com>
Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Prudhvi Godithi <pgodithi@amazon.com>
Co-authored-by: Angie Zhang <langelzh@amazon.com>
(cherry picked from commit 233e52c4df51af0d454ccd8198c8f341674beb6f)

Co-authored-by: phestecAMZN <111526961+phestecAMZN@users.noreply.github.com>

* Progress auto refreshing restore status, adding indexList (#297) (#318)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused code and comment cypress/integration/rollups_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix index list-snapshot restore, restrict restore to single selection

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Currently only visually functional. TODO - make it apply the options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add initial restore/rename options to ui. Only visual functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Move 'restore' button between 'delete' and 'take snapshot'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing Snapshots. Create repo and Create snapshot done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, unusted variables in SnapshotFlyout, SMservice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add full stop to help text/errors, add RESTORE_OPTIONS enum

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on IndexList component, using cat.index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* IndexList with pagination fully functional, todo: styling

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add RestoreActivitiesPanel component folder, files (starter)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Complete IndexList with pagination, sorting.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add maxWidth to RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com

* Implement tabs on Snapshots page: Snapshots, Restore activities...

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement skeleton Restore activities panel, panel switching in Snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on catIndexRecovery, TODO - debug

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix syntax bug - server/services/SnapshotManagementService.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolved some errors, getting a response but not correct response.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add back line 20 in rollups_spec, required by changes in 2.3 release.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement code to use Index Recovery api. successful.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress extracting data and displaying in Restore activities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement Restore Activities with self updating until restore done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add clickable indexes link and hello world click handler

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add toast if no snapshot selected upon restore activities click

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Add empty flyout where restoring indices will be listed

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change danger toast to warning when no snapshot selected

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add refresh button to restore activities page, remove auto refreshing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused getRepos func, add repo prop, trim state in RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create CatSnapshotIndex in server/models/interfaces, apply in IndexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Changes to RestoreActivitesPanel to prep for listing indice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Re do merge commit - forgot to save file.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Snapshots testing in progress

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 'Indices' to 'Index' if only 1 index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Auto populate prefix field initially with "restored_"

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change Restore button to color="primary" (blue)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make flyout close on restore, direct user to activities tab

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Title case flyout 'status', use EuiHealth for status color dot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add auto status check until 'DONE', RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add auto status update until 'SUCCESS', Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change tab implementation to be consistent with other plugins

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Minor text and styling fixes, Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix styling to match main Snapshot page, RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update text to match mocks in Snapshots, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change to title case for status in Restore activities panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix behavior of IndexList, include size when active, else unknown

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Functioning start/stop times in RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Accurate listing of indices being restored from snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Restore start/stop working. Auto updating working.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add version bump 2.3.1 for OS in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.3 to 2.3.0 cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Select indices individually to fix test, line62 snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change "Sample" to "sample", rollups_spec line20

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add 5s wait line 19 rollups_spec to wait for page load

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.4 to 2.4.0 opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve 1 leftover merge conflict, snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix one test which is newer than code at this point.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update AddPrefixInput.test for pre populated text field

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove comment from AddPrefixInput.test

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unneeded new lines, AddPrefixInput.test

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unneeded cy.wait(), snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add React.FC to RestoreActivitiesPanel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove commented code Snapshots.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console log from Snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change let to const - RestoreSnapshotFlyout/getSnapshotIndices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Simplify conditional rendering, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
Signed-off-by: Chris Hesterman <phestech@amazon.com
(cherry picked from commit fa09afb6ddf577382ef1f8508ec521003be5ba72)

Co-authored-by: phestecAMZN <phestech@amazon.com>

* Complete snapshot restore, mvp for 2.4 (#315) (#326)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused code and comment cypress/integration/rollups_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix index list-snapshot restore, restrict restore to single selection

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Currently only visually functional. TODO - make it apply the options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add initial restore/rename options to ui. Only visual functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Move 'restore' button between 'delete' and 'take snapshot'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing Snapshots. Create repo and Create snapshot done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, unusted variables in SnapshotFlyout, SMservice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add full stop to help text/errors, add RESTORE_OPTIONS enum

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder examples to rename options, add line breaks to help text

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on custom index settings, ignore index settings

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement custom index settings functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Successfully implement/debug custom index settings/ignore index settings.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on IndexList component, using cat.index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* IndexList with pagination fully functional, todo: styling

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add RestoreActivitiesPanel component folder, files (starter)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Complete IndexList with pagination, sorting.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add maxWidth to RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com

* Implement tabs on Snapshots page: Snapshots, Restore activities...

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement skeleton Restore activities panel, panel switching in Snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on catIndexRecovery, TODO - debug

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix syntax bug - server/services/SnapshotManagementService.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolved some errors, getting a response but not correct response.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add back line 20 in rollups_spec, required by changes in 2.3 release.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement code to use Index Recovery api. successful.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress extracting data and displaying in Restore activities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement Restore Activities with self updating until restore done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add clickable indexes link and hello world click handler

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add toast if no snapshot selected upon restore activities click

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Add empty flyout where restoring indices will be listed

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change danger toast to warning when no snapshot selected

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix bug when both custom settings and ignore settings chosen

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add refresh button to restore activities page, remove auto refreshing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused getRepos func, add repo prop, trim state in RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove index settings from options if none entered, RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel="noopener noreferrer" to links in help text, use url from constants.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create CatSnapshotIndex in server/models/interfaces, apply in IndexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel="noopener noreferrer" to links in IndexList, add CatSnapshotIndex interface

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Changes to RestoreActivitesPanel to prep for listing indice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Re do merge commit - forgot to save file.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Snapshots testing in progress

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress, cypress testing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit testing for AddPrefixInput, RenameInput components

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotRenameOptions component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotRestoreOption component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotIndicesInput component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 'Indices' to 'Index' if only 1 index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Replace anchor tags with EuiLinks set to external, rename options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change anchor tags to EuiLinks, IndexSettings

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel attribute to EuiLink, IndexSettingsInput

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Auto populate prefix field initially with "restored_"

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change Restore button to color="primary" (blue)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make flyout close on restore, direct user to activities tab

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Title case flyout 'status', use EuiHealth for status color dot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add auto status check until 'DONE', RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add auto status update until 'SUCCESS', Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change tab implementation to be consistent with other plugins

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Minor text and styling fixes, Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix styling to match main Snapshot page, RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update text to match mocks in Snapshots, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Pre fill rename inputs, prefix input with default values from mock

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change to title case for status in Restore activities panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add warning banner if snapshot is partial, with checkbox to allow

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix behavior of IndexList, include size when active, else unknown

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Functioning start/stop times in RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Accurate listing of indices being restored from snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Restore start/stop working. Auto updating working.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add EuiHealth to RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress with restore monitoring, finally error free

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on restore/delete buttons correctly disabled edge cases

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add EuiOverlayMask when RestoreSnapshotFlyout active

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create user friendly error toasts with button to full error

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Direct user to browser console for full error from error toasts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress with restore success toast with button. Close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Custom restore success toast with button to activities panel done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Created custom error toast. Need to debug.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Custom error and success toasts fully functional and error free.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add and debug Index Settings portion of Advanced Options. Successful.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove stray console logs

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add, update jest and cypress testing for snapshots & restore snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Save small change snapshots_spec, forgot before prev commit

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add version bump 2.3.1 for OS in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.3 to 2.3.0 cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change OSDB version to 2.3.1, opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.4 to 2.4.0 opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update for 2.4

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update help text, Snapshots.jsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove Total size column from IndexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Disable restore if partial snapshot but not checked in banner

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Remove total size column in indexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add status code and code meaning to toasts, error modal

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress making Restore activities panel independent

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* RestoreActivitiesPanel no longer needs selected snapshot to access

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Clean up unused code,console logs

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Modify error toasts to be more user friendly

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Handle bad regex input, handle bad JSON input, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add check and toast for no indices selected, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused interface, server/models/interfaces

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused interface, console log.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Small style changes, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve one missed conflict from previous merge

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update snapshots_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unneeded cy.wait, snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix small bug with refresh button, Restore activities panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove conflicts in server/models/interfaces

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused prop"ignore", change ternary to if() in toast helper

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change label text styling for radios and checkboxes in flyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create checkBoxLabel component in helper.jsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots for unit tests.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove default close button from Restore activities/indiceslist

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
Signed-off-by: Chris Hesterman <phestech@amazon.com
(cherry picked from commit 58b88b5891532b5d8bf9c7ba1395edd6e72619bb)

Co-authored-by: Chris Hesterman <phestech@amazon.com>

* Add windows mac OS in CI (#325) (#327)

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
(cherry picked from commit 05873bae1def9f7f243ae792d9937cda6773dadd)

Co-authored-by: bowenlan-amzn <bowenlan23@gmail.com>

* Incorporate requested UX changes to Snapshot Restore (#333) (#337)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused code and comment cypress/integration/rollups_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix index list-snapshot restore, restrict restore to single selection

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Currently only visually functional. TODO - make it apply the options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add initial restore/rename options to ui. Only visual functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Move 'restore' button between 'delete' and 'take snapshot'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Begin cypress testing Snapshots. Create repo and Create snapshot done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove console.logs, unusted variables in SnapshotFlyout, SMservice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add full stop to help text/errors, add RESTORE_OPTIONS enum

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder examples to rename options, add line breaks to help text

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on custom index settings, ignore index settings

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement custom index settings functionality

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Successfully implement/debug custom index settings/ignore index settings.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on IndexList component, using cat.index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* IndexList with pagination fully functional, todo: styling

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add RestoreActivitiesPanel component folder, files (starter)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Complete IndexList with pagination, sorting.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add maxWidth to RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com

* Implement tabs on Snapshots page: Snapshots, Restore activities...

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Implement skeleton Restore activities panel, panel switching in Snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on catIndexRecovery, TODO - debug

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix syntax bug - server/services/SnapshotManagementService.ts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolved some errors, getting a response but not correct response.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add back line 20 in rollups_spec, required by changes in 2.3 release.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement code to use Index Recovery api. successful.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress extracting data and displaying in Restore activities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement Restore Activities with self updating until restore done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add clickable indexes link and hello world click handler

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add toast if no snapshot selected upon restore activities click

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Add empty flyout where restoring indices will be listed

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change danger toast to warning when no snapshot selected

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix bug when both custom settings and ignore settings chosen

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add refresh button to restore activities page, remove auto refreshing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused getRepos func, add repo prop, trim state in RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove index settings from options if none entered, RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel="noopener noreferrer" to links in help text, use url from constants.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create CatSnapshotIndex in server/models/interfaces, apply in IndexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel="noopener noreferrer" to links in IndexList, add CatSnapshotIndex interface

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Changes to RestoreActivitesPanel to prep for listing indice

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Re do merge commit - forgot to save file.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Snapshots testing in progress

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Current progress, cypress testing

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit testing for AddPrefixInput, RenameInput components

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotRenameOptions component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotRestoreOption component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add unit tests for SnapshotIndicesInput component

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 'Indices' to 'Index' if only 1 index.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Replace anchor tags with EuiLinks set to external, rename options

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change anchor tags to EuiLinks, IndexSettings

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add rel attribute to EuiLink, IndexSettingsInput

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Auto populate prefix field initially with "restored_"

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change Restore button to color="primary" (blue)

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Make flyout close on restore, direct user to activities tab

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Title case flyout 'status', use EuiHealth for status color dot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add auto status check until 'DONE', RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add auto status update until 'SUCCESS', Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change tab implementation to be consistent with other plugins

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Minor text and styling fixes, Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix styling to match main Snapshot page, RestoreFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update text to match mocks in Snapshots, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Pre fill rename inputs, prefix input with default values from mock

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change to title case for status in Restore activities panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add warning banner if snapshot is partial, with checkbox to allow

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix behavior of IndexList, include size when active, else unknown

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Functioning start/stop times in RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Accurate listing of indices being restored from snapshot

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Restore start/stop working. Auto updating working.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add EuiHealth to RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress with restore monitoring, finally error free

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress on restore/delete buttons correctly disabled edge cases

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add EuiOverlayMask when RestoreSnapshotFlyout active

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create user friendly error toasts with button to full error

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Direct user to browser console for full error from error toasts

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress with restore success toast with button. Close

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Custom restore success toast with button to activities panel done

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Created custom error toast. Need to debug.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Custom error and success toasts fully functional and error free.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add and debug Index Settings portion of Advanced Options. Successful.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove stray console logs

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add, update jest and cypress testing for snapshots & restore snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Save small change snapshots_spec, forgot before prev commit

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add version bump 2.3.1 for OS in cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.3 to 2.3.0 cypress-workflow.yml

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change OSDB version to 2.3.1, opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change 2.4 to 2.4.0 opensearch_dashboards.json

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update for 2.4

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update help text, Snapshots.jsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove Total size column from IndexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Disable restore if partial snapshot but not checked in banner

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Remove total size column in indexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add status code and code meaning to toasts, error modal

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress making Restore activities panel independent

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* RestoreActivitiesPanel no longer needs selected snapshot to access

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Clean up unused code,console logs

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Modify error toasts to be more user friendly

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Handle bad regex input, handle bad JSON input, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add check and toast for no indices selected, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused interface, server/models/interfaces

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused interface, console log.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Small style changes, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Resolve one missed conflict from previous merge

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update snapshots_spec.js

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unneeded cy.wait, snapshots_spec

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Fix small bug with refresh button, Restore activities panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove conflicts in server/models/interfaces

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove unused prop"ignore", change ternary to if() in toast helper

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Change label text styling for radios and checkboxes in flyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Create checkBoxLabel component in helper.jsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots for unit tests.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove default close button from Restore activities/indiceslist

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress with regex validation, testing restore fail in progressd

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Handle error case - bad connection - RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Implement status for every index being restored, add to Indexlist.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Sort indexList alphabetically in RestoreActivities

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Remove unneeded "getSnapshotIndices" method - RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Progress with form validation, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* All validations working on action click, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Refine validation ui on error, RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Refine some toasts/errors

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Simplify toasts, make restore status more descriptive.

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add interface "IndexItem", models/interfaces

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Remove missed console log, IndexList

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update unit test snapshots

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update snapshots_spec to account for recent changes

Signed-off-by: Chris Hesterman <phestech@amazon.com>

Signed-off-by: Chris Hesterman <phestech@amazon.com>
Signed-off-by: Chris Hesterman <phestech@amazon.com
(cherry picked from commit 4d16b12868ffbc1cebaca167d85318cdd54b38bd)

Co-authored-by: Chris Hesterman <phestech@amazon.com>

* Snapshot restore - various UI updates, input validation debugging (#338) (#341)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx
* Unify vertical button alignment across panels, ContentPanel.tsx
* Update jest snapshots, add ROUTE_STYLE variable
* Add placeholder restore button to Snapshots panel
* Comment out line 20 rollups_spec.js in cypress/integration/
* Remove unused code and comment cypress/integration/rollups_spec.js
* Starting adaptation/use of existing code for Restore functionality
* Adapt Snapshots.tsx to include RestoreSnapshotFlyout
* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int
* Implement RestoreSnapshotFlyout open/close
* Make Snapshot name appear on RestoreSnapshotFlyout
* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <phestech@amazon.com>
Co-authored-by: Chris Hesterman <phestech@amazon.com>

* Minor bugfix to Restore Activities panel (#343) (#344)

* Change alignment of Snapshot Management panels in pages/Main/Main.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <phestech@amazon.com>

* Comment out line 20 rollups_spec.js in cypress/integration/

Signed-off-by: Chris Hesterman <phestech@amazon.com>
…
  • Loading branch information
5 people authored Dec 22, 2022
1 parent 0de5894 commit 3868fdf
Show file tree
Hide file tree
Showing 50 changed files with 1,624 additions and 580 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
OPENSEARCH_DASHBOARDS_VERSION: '2.4'
jobs:
tests:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, mac-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Index Management Dashboards plugin
uses: actions/checkout@v2
with:
path: index-management-dashboards-plugin
# Enable longer filenames for windows
- name: Enable longer filenames
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true
- name: Checkout OpenSearch-Dashboards
uses: actions/checkout@v2
with:
Expand All @@ -38,17 +41,18 @@ jobs:
npm uninstall -g yarn
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
npm i -g yarn@${{ steps.versions.outputs.yarn_version }}
- name: Checkout Index Management Dashboards plugin
uses: actions/checkout@v2
with:
path: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
- name: Bootstrap plugin/OpenSearch-Dashboards
run: |
mkdir -p OpenSearch-Dashboards/plugins
mv index-management-dashboards-plugin OpenSearch-Dashboards/plugins
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
yarn osd bootstrap
- name: Run tests
run: |
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
yarn run test:jest --coverage
- name: Uploads coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"viewportHeight": 900,
"viewportWidth": 1440,
"defaultCommandTimeout": 10000,
"nodeVersion": "system",
"env": {
"opensearch_url": "localhost:9200",
"opensearch_dashboards": "http://localhost:5601",
"security_enabled": false,
"username": "admin",
"password": "admin"
}
}
}
2 changes: 1 addition & 1 deletion cypress/integration/rollups_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Rollups", () => {

cy.wait(10000);

// TODO determine why line 25 and/or line 28 are needed occasionally for rollups_spec to pass.
// TODO determine why line 25 and/or line 28 are needed occasionally for rollups_spec to pass.
// When the source of the issue is determined they will be removed/uncommented.

//Click on "Sample data" tab
Expand Down
11 changes: 7 additions & 4 deletions cypress/integration/snapshots_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ describe("Snapshots", () => {
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_2{enter}");
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_3{enter}");



// Click 'Add' button to create snapshot
cy.get("button").contains("Add", { timeout: 3000 }).click({ force: true });

Expand All @@ -86,6 +84,12 @@ describe("Snapshots", () => {

describe("Snapshot can be restored", () => {
it("Successfully restores indices from snapshot", () => {
// Must wait here before refreshing so snapshot status becomes 'success'
cy.wait(5000);

// Wait for snapshot to be created successfully
cy.get("button").contains("Refresh").click({ force: true });

// Select test snapshot
cy.get(`[data-test-subj="checkboxSelectRow-test_repo:test_snapshot"]`).check({ force: true });

Expand All @@ -102,7 +106,7 @@ describe("Snapshots", () => {
cy.get("button").contains("Restore snapshot").click({ force: true });

// Check for success toast
cy.contains("Restored snapshot test_snapshot to repository test_repo");
cy.contains(`Restore from snapshot "test_snapshot" is in progress.`);
});
});

Expand All @@ -119,7 +123,6 @@ describe("Snapshots", () => {

cy.contains("Deleted snapshot");
cy.contains("No items found");

});
})
});
5 changes: 5 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

const { API, INDEX, ADMIN_AUTH } = require("./constants");
const { NODE_API } = require("../../server/utils/constants");

// ***********************************************
// This example commands.js shows you how to
Expand Down Expand Up @@ -121,6 +122,10 @@ Cypress.Commands.add("createIndex", (index, policyID = null, settings = {}) => {
}
});

Cypress.Commands.add("deleteSnapshot", (repository, snapshot) => {
cy.request("DELETE", `${Cypress.env("opensearch")}${NODE_API._SNAPSHOTS}/${repository}/${snapshot}`);
});

Cypress.Commands.add("createRollup", (rollupId, rollupJSON) => {
cy.request("PUT", `${Cypress.env("opensearch")}${API.ROLLUP_JOBS_BASE}/${rollupId}`, rollupJSON);
});
Expand Down
2 changes: 1 addition & 1 deletion opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "indexManagementDashboards",
"version": "2.4.0.0",
"version": "2.5.0",
"opensearchDashboardsVersion": "2.4.2",
"configPath": ["opensearch_index_management"],
"requiredPlugins": ["navigation", "opensearchDashboardsReact"],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"cypress:open": "cypress open",
"osd": "node ../../scripts/osd",
"opensearch": "node ../../scripts/opensearch",
"lint": "eslint .",
"lint": "node ../../scripts/eslint .",
"plugin-helpers": "node ../../scripts/plugin_helpers",
"test:jest": "NODE_PATH=../../node_modules ../../node_modules/.bin/jest --config ./test/jest.config.js",
"test:jest": "../../node_modules/.bin/jest --config ./test/jest.config.js",
"build": "yarn plugin-helpers build",
"postbuild": "echo Renaming build artifact to [$npm_package_config_zip_name-$npm_package_version.zip] && mv build/$npm_package_config_id*.zip build/$npm_package_config_zip_name-$npm_package_version.zip"
},
Expand All @@ -39,6 +39,7 @@
"glob-parent": "^5.1.2",
"ssri": "^6.0.2",
"lodash": "^4.17.21",
"loader-utils": "^1.4.1",
"hosted-git-info": "^2.8.9",
"json-schema": "^0.4.0",
"ansi-regex": "^5.0.1",
Expand Down
12 changes: 11 additions & 1 deletion public/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ $euiTextColor: $euiColorDarkestShade !default;
@function tintOrShade($color, $tint, $shade) {
@if (lightness($euiTextColor) > 50) {
@return shade($color, $shade);
} @else {
}

@else {
@return tint($color, $tint);
}
}
Expand All @@ -34,6 +36,7 @@ $euiTextColor: $euiColorDarkestShade !default;

.refresh-button {
min-width: 0;

.euiButtonContent {
.euiButton__text {
margin: 0;
Expand All @@ -44,3 +47,10 @@ $euiTextColor: $euiColorDarkestShade !default;
.state-accordion:hover {
text-decoration: none;
}

.euiFilterGroup__popoverPanel {
width: fit-content;
width: -moz-fit-content;
max-width: 90vw;
min-width: 300px;
}
37 changes: 37 additions & 0 deletions public/models/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,29 @@ interface ArgsWithError {
}
export type OnSearchChangeArgs = ArgsWithQuery | ArgsWithError;

export interface Toast {
id?: string;
title?: string;
iconType?: string;
color: string;
text?: JSX.Element;
}

export interface Column {
field: string;
name: string;
width: string;
truncateText?: boolean;
sortable: boolean;
}

export interface RestoreError {
reason?: string;
type?: string;
ok?: boolean;
error?: string;
}

export interface LatestActivities {
activityType: "Creation" | "Deletion";
status?: string;
Expand All @@ -73,6 +96,20 @@ export enum RESTORE_OPTIONS {
ignore_index_settings = "ignore_index_settings",
}

export interface ModifiedStages {
START: string;
INIT: string;
INDEX: string;
VERIFY_INDEX: string;
TRANSLOG: string;
FINALIZE: string;
DONE: string;
}

export interface IndexItem {
index: string;
restore_status?: string;
}
export interface ReindexJobMetaData extends IJobItemMetadata {
extras: {
toastId: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ HTMLCollection [
class="euiFormHelpText euiFormRow__text"
style="padding-top: 0px; padding-bottom: 4px;"
>
Specify one or more indexes to be a part of the alias.
Specify one or more indexes or index patterns to be part of the alias.
</div>
<div
aria-expanded="false"
Expand Down
2 changes: 1 addition & 1 deletion public/pages/Aliases/containers/CreateAlias/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function CreateAlias(props: ICreateAliasProps) {
component: IndexSelect,
rowProps: {
label: "Specify indexes",
helpText: "Specify one or more indexes to be a part of the alias.",
helpText: "Specify one or more indexes or index patterns to be part of the alias.",
},
options: {
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
IndicesUpdateMode,
INDEX_NAMING_MESSAGE,
REPLICA_NUMBER_MESSAGE,
INDEX_SETTINGS_URL,
} from "../../../../utils/constants";
import { Modal } from "../../../../components/Modal";
import FormGenerator, { IField, IFormGeneratorRef } from "../../../../components/FormGenerator";
Expand Down Expand Up @@ -452,11 +453,7 @@ const IndexDetail = (
<>
<p>
Specify a comma-delimited list of settings.
<EuiLink
external
href="https://opensearch.org/docs/latest/api-reference/index-apis/create-index#index-settings"
target="_blank"
>
<EuiLink external href={INDEX_SETTINGS_URL} target="_blank">
View index settings.
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface IndexMappingProps {
originalValue?: IndexMappingsAll;
onChange: (value: IndexMappingProps["value"]) => void;
isEdit?: boolean;
oldMappingsEditable?: boolean; // in template edit case, existing mappings is editable
readonly?: boolean;
}

Expand All @@ -83,7 +84,7 @@ export interface IIndexMappingsRef {
}

const IndexMapping = (
{ value: propsValue, onChange: propsOnChange, isEdit, oldValue, readonly }: IndexMappingProps,
{ value: propsValue, onChange: propsOnChange, isEdit, oldValue, readonly, oldMappingsEditable }: IndexMappingProps,
ref: Ref<IIndexMappingsRef>
) => {
const value = propsValue?.properties || [];
Expand Down Expand Up @@ -322,7 +323,13 @@ const IndexMapping = (
View mapping example.
</EuiLink>
</div>
<div>The existing mapping properties cannot be changed after the index is created.</div>
{oldMappingsEditable ? null : (
<div>
{isEdit
? "Mappings and field types cannot be changed once they have been added."
: "The existing mapping properties cannot be changed after the index is created."}
</div>
)}
</div>
}
fullWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import DescriptionListHoz from "../../../../components/DescriptionListHoz";
import { Modal } from "../../../../components/Modal";
import JSONEditor from "../../../../components/JSONEditor";
import { RouteComponentProps } from "react-router-dom";
import { ROUTES } from "../../../../utils/constants";
import { INDEX_SETTINGS_URL, ROUTES } from "../../../../utils/constants";
import DeleteTemplateModal from "../../../Templates/containers/DeleteTemplatesModal";
import TemplateType, { TemplateConvert } from "../../components/TemplateType";

Expand Down Expand Up @@ -254,8 +254,7 @@ const TemplateDetail = ({ templateName, onCancel, onSubmitSuccess, readonly, his
<CustomFormRow
{...getCommonFormRowProps("index_patterns")}
label="Index patterns"
helpText="Specify the index patterns or wildcards. Add a comma to separate each value.
Settings in this template will be applied to indexes with names matching index patterns or wildcards."
helpText="Specify the index patterns or wildcards. Add a comma to separate each value. Settings in this template will be applied to indexes with names matching index patterns or wildcards."
>
<RemoteSelect
{...field.registerField({
Expand Down Expand Up @@ -477,11 +476,7 @@ const TemplateDetail = ({ templateName, onCancel, onSubmitSuccess, readonly, his
<>
<p>
Specify a comma-delimited list of settings.{" "}
<EuiLink
href="https://opensearch.org/docs/latest/api-reference/index-apis/create-index#index-settings"
target="_blank"
external
>
<EuiLink href={INDEX_SETTINGS_URL} target="_blank" external>
View index settings
</EuiLink>
</p>
Expand Down Expand Up @@ -550,6 +545,7 @@ const TemplateDetail = ({ templateName, onCancel, onSubmitSuccess, readonly, his
readonly={readonly}
isEdit={isEdit}
ref={mappingsRef}
oldMappingsEditable
/>
</EuiFormRow>
</ContentPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ exports[`<TemplateDetail /> spec render component 1`] = `
class="euiFormHelpText euiFormRow__text"
style="padding-top: 0px; padding-bottom: 4px;"
>
Specify the index patterns or wildcards. Add a comma to separate each value. Settings in this template will be applied to indexes with names matching index patterns or wildcards.
Specify the index patterns or wildcards. Add a comma to separate each value. Settings in this template will be applied to indexes with names matching index patterns or wildcards.
</div>
<div
aria-expanded="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ export default class TransformIndices extends Component<TransformIndicesProps, T
label="Source index"
error={sourceIndexError}
isInvalid={sourceIndexError != ""}
helpText="The index where this transform job is performed on. Type in * as wildcard for index pattern.
Indices cannot be changed once the job is created. Please ensure that you select the right source index."
helpText="The index where this transform job is performed on. Type in * as wildcard for index pattern. Indices cannot be changed once the job is created. Please ensure that you select the right source index."
>
<EuiComboBox
placeholder="Select source index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ export default class ApplyPolicyModal extends Component<ApplyPolicyModalProps, A
getRolloverAliasError = (rolloverAlias: string): string => {
const { hasRolloverAction } = this.state;
const { indices } = this.props;
const isDataStream = indices[0].includes(".ds");
const hasSingleIndexSelected = indices.length === 1;
const requiresAlias = hasRolloverAction && hasSingleIndexSelected;
const requiresAlias = hasRolloverAction && hasSingleIndexSelected && !isDataStream;
const hasAliasError = requiresAlias && !rolloverAlias;
return hasAliasError ? "Required" : "";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("AddPrefixInput component", () => {
it("accepts user input", () => {
userEvent.type(screen.getByTestId("prefixInput"), "test_prefix_");

expect(screen.getByTestId("prefixInput")).toHaveValue("test_prefix_");
expect(screen.getByTestId("prefixInput")).toHaveValue("restored_test_prefix_");
});

it("sends user input to parent component via getPrefix", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface AddPrefixesInputProps {
}

const AddPrefixesInput = ({ getPrefix }: AddPrefixesInputProps) => {
const [prefix, setPrefix] = useState("");
const [prefix, setPrefix] = useState("restored_");

const onPrefixChange = (e: ChangeEvent<HTMLInputElement>) => {
setPrefix(e.target.value);
Expand Down
Loading

0 comments on commit 3868fdf

Please sign in to comment.