Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Minor bugfix to Restore Activities panel #344

Merged
merged 1 commit into from
Nov 4, 2022

Commits on Nov 4, 2022

  1. Minor bugfix to Restore Activities panel (#343)

    * 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>
    
    * Working out validation issue between norman/advanced options
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Incorporate minor requested changes to ui
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Fix issue with validating JSON, RestoreSnapshotFlyout
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    Move validation functions to helper.ts, debug typescript
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Resolve several potential inconsistencies with validation
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Change title/messages for unrestorable snapshots toasts
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Remove old code that slipped by in update merge
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Update jest snapshots
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Change minor but awkwardly implemented space between text/link
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Add EuiHealth to Restore activities panel, fix toast text Snapshots
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Change restore in progress color to "warning", EuiHealth, Restore activities
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Forgot to save brb
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Remove 2 console.logs, change === to ==, RestoreSnapshotFlyout
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Fix conditional in useEffect, RestoreActivitiesPanel
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Add release notes 2.4
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Add entry for release notes for adding release notes
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Make corrections to 2.4 release notes
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Add one PR to Maintenance, 2.4 release notes
    
    Signed-off-by: Chris Hesterman <phestech@amazon.com>
    
    * Bugfix that was preventing auto refresh from stopping Restore Activities Panel.
    
    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 cf16c2c)
    phestecAMZN authored and github-actions[bot] committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    2ee3f93 View commit details
    Browse the repository at this point in the history