Skip to content

Commit

Permalink
Fixed bug: Readonly DataSourceMEnu in create rollup and create transf…
Browse files Browse the repository at this point in the history
…orm workflow (opensearch-project#1047)

Signed-off-by: Prabhat Sharma <[email protected]>
Co-authored-by: Prabhat Sharma <[email protected]>
  • Loading branch information
CaptainDredge and Prabhat Sharma authored Apr 29, 2024
1 parent 18986f7 commit 43b9e1e
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,33 @@ export default class Main extends Component<MainProps, MainState> {
>
{this.props.multiDataSourceEnabled && DataSourceMenu && DataSourceViewer && (
<Switch>
<Route
path={[ROUTES.CREATE_ROLLUP, ROUTES.CREATE_TRANSFORM]}
render={() =>
this.state.dataSourceReadOnly ? (
<DataSourceViewer
setMenuMountPoint={this.props.setActionMenu}
componentType={"DataSourceView"}
componentConfig={{
activeOption,
fullWidth: false,
}}
/>
) : (
<DataSourceMenu
setMenuMountPoint={this.props.setActionMenu}
componentType={"DataSourceSelectable"}
componentConfig={{
savedObjects: core?.savedObjects.client,
notifications: core?.notifications,
fullWidth: false,
activeOption,
onSelectedDataSources: this.onSelectedDataSources,
}}
/>
)
}
/>
<Route
path={[
`${ROUTES.CREATE_DATA_STREAM}/:dataStream`,
Expand Down Expand Up @@ -451,33 +478,6 @@ export default class Main extends Component<MainProps, MainState> {
/>
)}
/>
<Route
path={[ROUTES.CREATE_ROLLUP, ROUTES.CREATE_TRANSFORM]}
render={() =>
this.state.dataSourceReadOnly ? (
<DataSourceViewer
setMenuMountPoint={this.props.setActionMenu}
componentType={"DataSourceView"}
componentConfig={{
activeOption,
fullWidth: false,
}}
/>
) : (
<DataSourceMenu
setMenuMountPoint={this.props.setActionMenu}
componentType={"DataSourceSelectable"}
componentConfig={{
savedObjects: core?.savedObjects.client,
notifications: core?.notifications,
fullWidth: false,
activeOption,
onSelectedDataSources: this.onSelectedDataSources,
}}
/>
)
}
/>
</Switch>
)}
{!this.state.dataSourceLoading && (
Expand Down

0 comments on commit 43b9e1e

Please sign in to comment.