Skip to content

Commit

Permalink
Backport 2.4 -> 2.x (#293)
Browse files Browse the repository at this point in the history
* Updated rollup help text. (#220)

Signed-off-by: AWSHurneyt <[email protected]>

* Bumping main to 2.2, address dependabot alert, enable test workflows on all PRs, fix snapshot tests. (#227)

* 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 <[email protected]>

* Drafted `2.2` release notes.

Signed-off-by: AWSHurneyt <[email protected]>

* Drafted `2.2` release notes.

Signed-off-by: AWSHurneyt <[email protected]>

* Amended 2.2 release notes. (#222)

Signed-off-by: AWSHurneyt <[email protected]>

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

Signed-off-by: AWSHurneyt <[email protected]>

* Updated link that was broken when ODFE was deprecated.

Signed-off-by: AWSHurneyt <[email protected]>

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

Signed-off-by: AWSHurneyt <[email protected]>

Signed-off-by: AWSHurneyt <[email protected]>

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

Signed-off-by: AWSHurneyt <[email protected]>

Signed-off-by: AWSHurneyt <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: prudhvigodithi <[email protected]>

Signed-off-by: prudhvigodithi <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>

Signed-off-by: prudhvigodithi <[email protected]>
Signed-off-by: AWSHurneyt <[email protected]>
Co-authored-by: Prudhvi Godithi <[email protected]>
(cherry picked from commit 2f96369)

Co-authored-by: AWSHurneyt <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

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

Signed-off-by: Chris Hesterman <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

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

page for snapshot management

Signed-off-by: Victor Nilsson <[email protected]>

Signed-off-by: Victor Nilsson <[email protected]>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <[email protected]>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <[email protected]>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <[email protected]>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <[email protected]>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <[email protected]>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <[email protected]>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <[email protected]>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <[email protected]>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <[email protected]>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <[email protected]>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <[email protected]>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Version increament 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Update OSD version in cypress-workflow.yml

Signed-off-by: Chris Hesterman <[email protected]>

* Added release notes for 2.3 (#250)

* Added release notes for 2.3

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Move 230 to Maintenance, 229 back to Bug fixes

Signed-off-by: Chris Hesterman <[email protected]>

* Move 229 back to Maintenance

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Add release notes 2.3, add 's' to 'Enhancement' header -> 'Enhancements' (#257)

* Added release notes for 2.3

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Move 230 to Maintenance, 229 back to Bug fixes

Signed-off-by: Chris Hesterman <[email protected]>

* Move 229 back to Maintenance

Signed-off-by: Chris Hesterman <[email protected]>

* Add 's' to 'Enhancement' header.

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Add rel to link for external links, IM dashboards plugin (#261)

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

Signed-off-by: Chris Hesterman <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Set window.opener to null via anchor tag 'rel' attribute-TransformIndices

Signed-off-by: Chris Hesterman <[email protected]>

* Add rel="noopener noreferrer" to external links, update snapshots

Signed-off-by: Chris Hesterman <[email protected]>

* Include version increment to 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Remove 2.3 version bump

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Backport main 2.3.0 fix sign off (#272)

* Added release notes for 2.3 (#250)

* Added release notes for 2.3

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Move 230 to Maintenance, 229 back to Bug fixes

Signed-off-by: Chris Hesterman <[email protected]>

* Move 229 back to Maintenance

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Add release notes 2.3, add 's' to 'Enhancement' header -> 'Enhancements' (#257)

* Added release notes for 2.3

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Move 230 to Maintenance, 229 back to Bug fixes

Signed-off-by: Chris Hesterman <[email protected]>

* Move 229 back to Maintenance

Signed-off-by: Chris Hesterman <[email protected]>

* Add 's' to 'Enhancement' header.

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Version increment 2.3.0 (#247)

Signed-off-by: Chris Hesterman <[email protected]>

(cherry picked from commit 2824645)

Signed-off-by: Chris Hesterman <[email protected]>

* Add rel to link for external links, IM dashboards plugin (#261)

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

Signed-off-by: Chris Hesterman <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Set window.opener to null via anchor tag 'rel' attribute-TransformIndices

Signed-off-by: Chris Hesterman <[email protected]>

* Add rel="noopener noreferrer" to external links, update snapshots

Signed-off-by: Chris Hesterman <[email protected]>

* Include version increment to 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Remove 2.3 version bump

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Update cypress-workflow.yml

Signed-off-by: Chris Hesterman <[email protected]>

* Update beforeEach hook, rollups_spec.js

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <[email protected]>

* 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 <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <[email protected]>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <[email protected]>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <[email protected]>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <[email protected]>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <[email protected]>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <[email protected]>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <[email protected]>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <[email protected]>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <[email protected]>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <[email protected]>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <[email protected]>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Change 2.3 to 2.3.0, cypress-workflow.yml

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

All of these variations pass seamlessly when run locally.

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Version increment 2.4 (#283)

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

Signed-off-by: Chris Hesterman <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <[email protected]>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <[email protected]>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <[email protected]>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <[email protected]>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <[email protected]>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <[email protected]>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <[email protected]>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <[email protected]>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <[email protected]>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <[email protected]>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <[email protected]>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <[email protected]>

* Version increment 2.4

Signed-off-by: Chris Hesterman <[email protected]>

* Remove commented code, rollups_spec

Signed-off-by: Chris Hesterman <[email protected]>

* Change 2.4 back to 2.3, unit-tests-workflow

Signed-off-by: Chris Hesterman <[email protected]>

* Change Opensearch Dashboards version to 2.x in 3 files

Signed-off-by: Chris Hesterman <[email protected]>

* Change OSD version from 2.x to 2.4 in response to PR error

Signed-off-by: Chris Hesterman <[email protected]>

* Update dashboards version 2.x -> 2.4, cypress, unit test workflows.

Signed-off-by: Chris Hesterman <[email protected]>

* Change 2.4 -> 2.x, cypress and unit test workflows.

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

* Change 2.4 to 2.4.0 opensearch_dashboards.json

Signed-off-by: Chris Hesterman <[email protected]>

* Add/update tests, update help text links and icons, add Restore activities panel (#277)

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

Signed-off-by: Chris Hesterman <[email protected]>

* Unify vertical button alignment across panels, ContentPanel.tsx

Signed-off-by: Chris Hesterman <[email protected]>

* Update jest snapshots, add ROUTE_STYLE variable

Signed-off-by: Chris Hesterman <[email protected]>

* Add placeholder restore button to Snapshots panel

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Starting adaptation/use of existing code for Restore functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Adapt Snapshots.tsx to include RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add restoreSnapshot method to SMservice,RestoreSnapshotResponse int

Signed-off-by: Chris Hesterman <[email protected]>

* Implement RestoreSnapshotFlyout open/close

Signed-off-by: Chris Hesterman <[email protected]>

* Make Snapshot name appear on RestoreSnapshotFlyout

Signed-off-by: Chris Hesterman <[email protected]>

* Add/adapt restoreSnapshot to server/SnapshotManagementService

Signed-off-by: Chris Hesterman <[email protected]>

* Add route for restoreSnapshot in server/routes.ts

Signed-off-by: Chris Hesterman <[email protected]>

* Rudimentary restore from snapshot functionality reached, buggy

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Remove console.logs, commented out code

Signed-off-by: Chris Hesterman <[email protected]>

* Create Advanced options accordion for Snapshot restore.

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Resolve radio button events not firing

Signed-off-by: Chris Hesterman <[email protected]>

Split radio buttons into SnapshotRestoreOption and SnapshotRenameOptions

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

Set default rename option to 'add prefix'

Signed-off-by: Chris Hesterman <[email protected]>

* Add AddPrefixInput, remove unused component RestoreSnapshotInitialOptions

Signed-off-by: Chris Hesterman <[email protected]>

* Fix issues with restore specific indices

Signed-off-by: Chris Hesterman <[email protected]>

Implement first 4 Advanced restore options functionality

Signed-off-by: Chris Hesterman <[email protected]>

* Begin cypress testing for snapshots

Signed-off-by: Chris Hesterman <[email protected]>

Passing tests for create repo and create snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Implement add_prefix functionality for snapshot restore

Signed-off-by: Chris Hesterman <[email protected]>

* Implement rename indices option for restore snapshot

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Progress on custom index settings, ignore index settings

Signed-off-by: Chris Hesterman <[email protected]>

* Implement custom index settings functionality

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Fix bug when both custom settings and ignore settings chosen

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Add increment to 2.3.0

Signed-off-by: Chris Hesterman <[email protected]>

* Remove index settings from options if none entered, RestoreFlyout

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Current progress, cypress testing

Signed-off-by: Chris Hesterman <[email protected]>

* Add unit testing for AddPrefixInput, RenameInput components

Signed-off-by: Chris Hesterman <[email protected]>

* Add unit tests for SnapshotRenameOptions component

Signed-off-by: Chris Hesterman <[email protected]>

* Add unit tests for SnapshotRestoreOption component

Signed-off-by: Chris Hesterman <[email protected]>

* Add unit tests for SnapshotIndicesInput component

Signed-off-by: Chris Hesterman <[email protected]>

* Change anchor tags to EuiLinks, IndexSettings

Signed-off-by: Chris Hesterman <[email protected]>

* Add rel attribute to EuiLink, IndexSettingsInput

Signed-off-by: Chris Hesterman <[email protected]>

* Version bump 2.3.0 to 2.3 1

Signed-off-by: Chris Hesterman <[email protected]>

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

Signed-off-by: Chris Hesterman <[email protected]>

* Remove 2.3.1 bump

Signed-off-by: Chris Hesterman <[email protected]>

* Small mods to rollups_spec and snapshots_spec

Signed-off-by: Chris Hesterman <[email protected]>

* Change snapshots_spec in effort to pass E2E. Passes locally

Signed-off-by: Chris Hesterman <[email protected]>

* Fix spelling of 'index' line67, snapshots_spec

Signed-off-by: Chris Hesterman <[email protected]>

* Version bump 2.4

Signed-off-by: Chris Hesterman <[email protected]>

* Make sure 2.4 applied, add TODO in rollups_spec

Signed-off-by: Chris Hesterman <[email protected]>

* Change 2.4 back to 2.x again cypress, unit_test workflows

Signed-off-by: Chris Hesterman <[email protected]>

Remove one more 'wait' from snapshots_spec

Signed-off-by: Chris Hesterman <[email protected]>

* Add "cy.wait" back line 56 snapshots_spec

Signed-off-by: Chris Hesterman <[email protected]>

* Add '0' to OSD version,  opensearch_dashboards.json.

Signed-off-by: Chris Hesterman <[email protected]>

Remove redundant 'cleanup()' from AddPrefixInput.jest.js

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: Chris Hesterman <[email protected]>

Signed-off-by: AWSHurneyt <[email protected]>
Signed-off-by: Chris Hesterman <[email protected]>
Signed-off-by: Victor Nilsson <[email protected]>
Co-authored-by: AWSHurneyt <[email protected]>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: Victor Nilsson <[email protected]>
  • Loading branch information
4 people authored Oct 19, 2022
1 parent b4cc013 commit 4732903
Show file tree
Hide file tree
Showing 39 changed files with 1,014 additions and 82 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Integration tests](https://github.com/opensearch-project/index-management-dashboards-plugin/workflows/E2E%20tests%20workflow/badge.svg)](https://github.com/opensearch-project/index-management-dashboards-plugin/actions?query=workflow%3A%22E2E+tests+workflow%22)
[![codecov](https://codecov.io/gh/opensearch-project/index-management-dashboards-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/opensearch-project/index-management-dashboards-plugin)
[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://opensearch.org/docs/im-plugin/index/)
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/Use-this-category-for-all-questions-around-machine-learning-plugins)
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://forum.opensearch.org/c/plugins/index-management)
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)

<img src="https://opensearch.org/assets/img/opensearch-logo-themed.svg" height="64px">
Expand Down
10 changes: 8 additions & 2 deletions cypress/integration/rollups_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ describe("Rollups", () => {

cy.wait(10000)

// Click on "Sample data" tab
cy.contains("Add data").click({ force: true });
// 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
cy.contains("Sample data").click({ force: true });

// Click on "Add data" tab
// cy.contains("Add data").click({ force: true });

// Load sample eCommerce data
cy.get(`button[data-test-subj="addSampleDataSetecommerce"]`).click({ force: true });
Expand Down
113 changes: 68 additions & 45 deletions cypress/integration/snapshots_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,6 @@ import { PLUGIN_NAME } from "../support/constants";

describe("Snapshots", () => {
before(() => {
// Delete any existing indices
cy.deleteAllIndices();

// Load ecommerce data
cy.request({
method: "POST",
url: `${Cypress.env("opensearch_dashboards")}/api/sample_data/ecommerce`,
headers: {
"osd-xsrf": true,
},
}).then((response) => {
expect(response.status).equal(200);
});

// Load flight data
cy.request({
method: "POST",
url: `${Cypress.env("opensearch_dashboards")}/api/sample_data/flights`,
headers: {
"osd-xsrf": true,
},
}).then((response) => {
expect(response.status).equal(200);
});

// Load web log data
cy.request({
method: "POST",
url: `${Cypress.env("opensearch_dashboards")}/api/sample_data/logs`,
headers: {
"osd-xsrf": true,
},
}).then((response) => {
expect(response.status).equal(200);
});
});

beforeEach(() => {
// Set welcome screen tracking to false
localStorage.setItem("home:welcome:show", "false");

Expand Down Expand Up @@ -79,24 +41,85 @@ describe("Snapshots", () => {

describe("Snapshot can be created", () => {
it("successfully creates a new snapshot", () => {
cy.visit(`${Cypress.env("opensearch_dashboards")}/app/${PLUGIN_NAME}#/snapshots`);

// delete any existing indices
cy.deleteAllIndices();

// create test indices
cy.createIndex("test_index_1");
cy.createIndex("test_index_2");
cy.createIndex("test_index_3");

// wait needed here to enable cypress to find "Take snapshot" button. Timeout
// cannot be used with cy.createIndex
cy.wait(5000);

// Click Take snapshot button
cy.get("button").contains("Take snapshot").click({ force: true });

// Confirm test_repo exists and is in the Select repo field
cy.contains("test_repo");

// Type in Snapshot name
cy.get(`input[data-test-subj="snapshotNameInput"]`).type("test_snapshot{enter}");

// Select indexes to be included
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("open*{enter}");
// Select all indexes to be included
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_1{enter}");
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_2{enter}");
cy.get(`[data-test-subj="indicesComboBoxInput"]`).type("test_index_3{enter}");


// Confirm test_repo exists
cy.contains("test_repo");

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

// check for success status and snapshot name
cy.contains("In_progress");
cy.contains("test_snapshot");
cy.get("button").contains("Refresh").click({ force: true });

cy.contains("Success");

// remove all indices
cy.deleteAllIndices();
});
});

describe("Snapshot can be restored", () => {
it("Successfully restores indices from snapshot", () => {
// Select test snapshot
cy.get(`[data-test-subj="checkboxSelectRow-test_repo:test_snapshot"]`).check({ force: true });

// click "Restore" button
cy.get(`[data-test-subj="restoreButton"]`).click({ force: true });

// Check for restore flyout
cy.contains("Restore snapshot");

// enter a prefix
cy.get(`input[data-test-subj="prefixInput"]`).type("restored_");

// Click restore snapshot button
cy.get("button").contains("Restore snapshot").click({ force: true });

// Check for success toast
cy.contains("Restored snapshot test_snapshot to repository test_repo");
});
});

describe("Snapshot can be deleted", () => {
it("deletes snapshot successfully", async () => {
// Select test snapshot
cy.get(`[data-test-subj="checkboxSelectRow-test_repo:test_snapshot"]`).check({ force: true });

// click "Delete" button
cy.get("button").contains("Delete", { timeout: 3000 }).click({ force: true });

// click "Delete snapshot" button on modal
cy.get("button").contains("Delete snapshot").click({ force: true });

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

});
})
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch_index_management_dashboards",
"version": "2.4.0.0",
"version": "2.4.0",
"description": "Opensearch Dashboards plugin for Index Management",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class NewPolicy extends React.Component<NewPolicyProps, NewPolicy
<EuiText size="xs">
<p>
When the new policy will take effect depends on the current state of indices and the states of the new policy.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DefinePolicy = ({ jsonString, onChange, onAutoIndent, hasJSONError }: Defi
<p>
You can think of policies as state machines. "Actions" are the operations ISM performs when an index is in a certain state.
"Transitions" define when to move from one state to another.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default class CreatePolicy extends Component<CreatePolicyProps, CreatePol
This ensures that any update to a policy doesn't harm indices that are running under an older version of the policy. To carry
over your edits to these indices, please use the "Change Policy" under "Managed Indices" to reapply the policy after submitting
your edits.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class RollupIndices extends Component<RollupIndicesProps, RollupI
"The target index stores rollup results. You can select an existing index or type in a new index name with embedded variables "
}
{
<EuiLink external href={ROLLUP_RESULTS_HELP_TEXT_LINK} target={"_blank"}>
<EuiLink external href={ROLLUP_RESULTS_HELP_TEXT_LINK} target={"_blank"} rel="noopener noreferrer">
Learn more
</EuiLink>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const CronSchedule = ({
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200, fontSize: "12px" }}>
Use Cron expression to define complex schedule.{" "}
<EuiLink href={CRON_EXPRESSION_DOCUMENTATION_URL} target="_blank">
<EuiLink href={CRON_EXPRESSION_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export default class CreateSnapshotPolicy extends Component<CreateSMPolicyProps,
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Snapshot policies allow you to define an automated snapshot schedule and retention period.{" "}
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank">
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ export default class TransformIndices extends Component<TransformIndicesProps, T
</EuiText>

<EuiText size="xs">
<EuiLink external={true} target="_blank" href="https://opensearch.org/docs/opensearch/query-dsl/index/">
<EuiLink
external={true}
target="_blank"
href="https://opensearch.org/docs/opensearch/query-dsl/index/"
rel="noopener noreferrer"
>
{" "}
Learn more
</EuiLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default class ApplyPolicyModal extends Component<ApplyPolicyModalProps, A
<EuiText size="xs" grow={false}>
<p>
This policy includes a rollover action. Specify a rollover alias.{" "}
<EuiLink href={DOCUMENTATION_URL} target="_blank">
<EuiLink href={DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more <EuiIcon type="popout" size="s" />
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<EuiText color="subdued" size="xs" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Define a repository by custom type and settings.{" "}
<EuiLink href={S3_REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={S3_REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
View sample configurations
</EuiLink>
</p>
Expand Down Expand Up @@ -186,7 +186,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<EuiText color="subdued" size="xs" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Define additional settings for this repository.{" "}
<EuiLink href={FS_REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={FS_REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand All @@ -212,7 +212,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<p>
To use a custom repository, such as Amazon S3, Azure Blob Storage or similar, install and configure the respective repository
plugin on OpenSearch and then define the repository configuration below.{" "}
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down Expand Up @@ -240,7 +240,7 @@ export default class CreateRepositoryFlyout extends Component<CreateRepositoryPr
<EuiText color="subdued" size="xs" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Select a supported repository type. For additional types, install the latest repository plugins and choose Custom configuration.{" "}
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank">
<EuiLink href={REPOSITORY_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export default class SnapshotPolicies extends Component<SnapshotPoliciesProps, S
<EuiText color="subdued" size="s" style={{ padding: "5px 0px" }}>
<p style={{ fontWeight: 200 }}>
Define an automated snapshot schedule and retention period with a snapshot policy.{" "}
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank">
<EuiLink href={SNAPSHOT_MANAGEMENT_DOCUMENTATION_URL} target="_blank" rel="noopener noreferrer">
Learn more
</EuiLink>
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import React from "react";
import "@testing-library/jest-dom/extend-expect";
import { render, screen, cleanup } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import AddPrefixInput from "./AddPrefixInput";


const testProps = { getPrefix: jest.fn() };

beforeEach(() => {
render(<AddPrefixInput {...testProps} />);
});

afterEach(() => {
cleanup();
});

describe("AddPrefixInput component", () => {
it("renders without error", () => {
expect(screen.getByText("Specify prefix for restored index names")).toBeInTheDocument();
expect(screen.getByTestId("prefixInput")).toBeInTheDocument();

const { container } = render(<AddPrefixInput {...testProps} />);

expect(container).toMatchSnapshot();
});

it("accepts user input", () => {
userEvent.type(screen.getByTestId("prefixInput"), "test_prefix_");

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

it("sends user input to parent component via getPrefix", () => {
userEvent.type(screen.getByTestId("prefixInput"), "four");

// getPrefix is prop sent from parent component to retrieve user input
expect(testProps.getPrefix).toBeCalledTimes(4);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const AddPrefixesInput = ({ getPrefix }: AddPrefixesInputProps) => {

<CustomLabel title="Specify prefix for restored index names" helpText="A prefix will be added to any restored index names." />
<EuiFormRow>
<EuiFieldText value={prefix} onChange={onPrefixChange} />
<EuiFieldText value={prefix} onChange={onPrefixChange} data-test-subj="prefixInput" />
</EuiFormRow>

<EuiSpacer size="m" />
Expand Down
Loading

0 comments on commit 4732903

Please sign in to comment.