Add Convert index to remote support for dashboard ism plugin #1373
+461
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds comprehensive support for the convert_index_to_remote ISM action in the Index Management Dashboards Plugin, aligning with the new functionality introduced in OpenSearch Index Management.
Key Changes:
Action Interface & Type Definitions (models/interfaces.ts)
Added ConvertIndexToRemoteAction interface with all required and optional parameters
Supports repository, snapshot, include_aliases, ignore_index_settings, and number_of_replicas
UI Component (ConvertIndexToRemoteUIAction.tsx)
Comprehensive form controls for all action parameters
Field validation for required fields (repository and snapshot)
Support for Mustache template variables (e.g., {{ctx.index}})
User-friendly help text based on OpenSearch documentation
Toggle switch for include_aliases
Number input for number_of_replicas with validation
Text input for comma-separated ignore_index_settings
Action Registration
Added ConvertIndexToRemote to ActionType enum
Registered in ActionRepository with default values
Integrated into the visual policy editor action dropdown
Test Coverage
Added ConvertIndexToRemoteUIAction.test.tsx with 10 test cases
Tests cover UI rendering, user interactions, field validation, and action conversion
Updated helpers.test.ts to verify action registration
Snapshot tests for UI consistency
Example Policy (sample_convert_index_to_remote_policy.json)
Demonstrates complete workflow: snapshot → convert_index_to_remote
Shows usage of all optional parameters
Features Implemented:
✅ Repository configuration with validation
✅ Snapshot naming with Mustache variable support
✅ Include aliases option
✅ Ignore index settings configuration
✅ Number of replicas configuration
This allows users to create ISM policies that convert indexes to searchable snapshots for cost-effective long-term storage while maintaining search capabilities.
Issues Resolved
Related to OpenSearch documentation PR: opensearch-project/documentation-website#11495
Implements dashboard support for the convert_index_to_remote action documented in: opensearch-project/index-management#1527
Check List
[ ] Commits are signed per the DCO using --signoff
[x] New functionality includes comprehensive test coverage
[x] All linter checks pass
[x] TypeScript types are properly defined
[x] UI follows existing patterns and design consistency
[x] Help text aligns with OpenSearch documentation
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.