File tree Expand file tree Collapse file tree
public/pages/VisualCreatePolicy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -432,6 +432,7 @@ export interface ConvertIndexToRemoteAction extends Action {
432432 convert_index_to_remote : {
433433 repository : string ;
434434 snapshot : string ;
435+ rename_pattern : string ;
435436 } ;
436437}
437438
Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ export default class ConvertIndexToRemoteUIAction implements UIAction<ConvertInd
2525 clone = ( action : ConvertIndexToRemoteAction ) => new ConvertIndexToRemoteUIAction ( action , this . id ) ;
2626
2727 isValid = ( ) => {
28- return ! ! this . action . convert_index_to_remote . snapshot && ! ! this . action . convert_index_to_remote . repository ;
28+ return (
29+ ! ! this . action . convert_index_to_remote . snapshot &&
30+ ! ! this . action . convert_index_to_remote . repository &&
31+ ! ! this . action . convert_index_to_remote . rename_pattern
32+ ) ;
2933 } ;
3034
3135 render = ( action : UIAction < ConvertIndexToRemoteAction > , onChangeAction : ( action : UIAction < ConvertIndexToRemoteAction > ) => void ) => {
@@ -74,6 +78,30 @@ export default class ConvertIndexToRemoteUIAction implements UIAction<ConvertInd
7478 data-test-subj = "action-render-convert-index-to-remote-snapshot"
7579 />
7680 </ EuiCompressedFormRow >
81+ < EuiSpacer size = "s" />
82+ < EuiFormCustomLabel
83+ title = "Rename Pattern"
84+ helpText = "Rename pattern for restored index ($1 is the name of managed index)."
85+ isInvalid = { ! this . isValid ( ) }
86+ />
87+ < EuiCompressedFormRow fullWidth isInvalid = { ! this . isValid ( ) } error = { null } >
88+ < EuiCompressedFieldText
89+ fullWidth
90+ value = { ( action . action as ConvertIndexToRemoteAction ) . convert_index_to_remote . rename_pattern }
91+ onChange = { ( e : ChangeEvent < HTMLInputElement > ) => {
92+ const rename_pattern = e . target . value ;
93+ onChangeAction (
94+ this . clone ( {
95+ convert_index_to_remote : {
96+ ...action . action . convert_index_to_remote ,
97+ rename_pattern,
98+ } ,
99+ } )
100+ ) ;
101+ } }
102+ data-test-subj = "action-render-convert-index-to-remote-rename-pattern"
103+ />
104+ </ EuiCompressedFormRow >
77105 </ >
78106 ) ;
79107 } ;
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ export const DEFAULT_CONVERT_INDEX_TO_REMOTE = {
8787 convert_index_to_remote : {
8888 repository : "example-repository" ,
8989 snapshot : "example-snapshot" ,
90+ rename_pattern : "$1_remote" ,
9091 } ,
9192} ;
9293export const DEFAULT_DELETE = {
You can’t perform that action at this time.
0 commit comments