File tree 2 files changed +10
-2
lines changed
DefineDetector/components/Datasource
ReviewAndCreate/components/DataConnectionFlyout
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,15 @@ export function DataSource(props: DataSourceProps) {
146
146
const localCluster : ClusterInfo [ ] = getLocalCluster (
147
147
opensearchState . clusters
148
148
) ;
149
- setFieldValue ( 'clusters' , getVisibleClusterOptions ( localCluster ) ) ;
149
+ if ( props . formikProps . values . clusters && props . formikProps . values . clusters . length > 0 ) {
150
+ const clusterInfoList : ClusterInfo [ ] = props . formikProps . values . clusters . map ( option => ( {
151
+ name : option . cluster ,
152
+ localCluster : option . localcluster === 'true' ,
153
+ } ) ) ;
154
+ setFieldValue ( 'clusters' , getVisibleClusterOptions ( clusterInfoList ) ) ;
155
+ } else {
156
+ setFieldValue ( 'clusters' , getVisibleClusterOptions ( localCluster ) ) ;
157
+ }
150
158
}
151
159
} , [ opensearchState . clusters ] ) ;
152
160
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const getIndexItemsToDisplay = (props: DataConnectionFlyoutProps) => {
53
53
const splitIndex = index . split ( ':' ) ;
54
54
let clusterName = shouldSplit ? splitIndex [ 0 ] : props . localClusterName ;
55
55
clusterName =
56
- clusterName === props . localClusterName
56
+ clusterName === props . localClusterName && ! shouldSplit
57
57
? `${ clusterName } (Local)`
58
58
: `${ clusterName } (Remote)` ;
59
59
const indexName = shouldSplit ? splitIndex [ 1 ] : index ;
You can’t perform that action at this time.
0 commit comments