Skip to content

Commit

Permalink
integrating with readonly data source
Browse files Browse the repository at this point in the history
  • Loading branch information
RamakrishnaChilaka committed Mar 20, 2024
1 parent 796622d commit 4937cdd
Showing 1 changed file with 5 additions and 40 deletions.
45 changes: 5 additions & 40 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,22 +282,16 @@ export default class Main extends Component<MainProps, MainState> {
`${ROUTES.CREATE_DATA_STREAM}/:dataStream`,
`${ROUTES.CREATE_TEMPLATE}/:template`,
`${ROUTES.CREATE_COMPOSABLE_TEMPLATE}/:composableTemplate`,
ROUTES.FORCE_MERGE,
ROUTES.SPLIT_INDEX,
ROUTES.ROLLOVER,
ROUTES.INDEX_DETAIL,
]}
render={(props) => (
<DataSourceMenu
appName={"Index State Management"}
setMenuMountPoint={this.props.setActionMenu}
showDataSourceSelectable={true}
dataSourceCallBackFunc={({ id: dataSourceId, label: dataSourceLabel }) => {
this.setState({ dataSourceId, dataSourceLabel });
}}
disableDataSourceSelectable={(() => {
return (
props.match.params.dataStream || props.match.params.template || props.match.params.composableTemplate
);
})()}
notifications={services.notificationService}
savedObjects={core.savedObjects.client}
showDataSourceView={true}
selectedOption={(() => {
if (this.state.dataSourceId && this.state.dataSourceId !== "") {
return [
Expand Down Expand Up @@ -353,35 +347,6 @@ export default class Main extends Component<MainProps, MainState> {
/>
)}
/>
<Route
path={[ROUTES.FORCE_MERGE, ROUTES.SPLIT_INDEX, ROUTES.ROLLOVER, ROUTES.INDEX_DETAIL]}
render={(props) => (
<DataSourceMenu
appName={"Index State Management"}
setMenuMountPoint={this.props.setActionMenu}
showDataSourceSelectable={true}
dataSourceCallBackFunc={({ id: dataSourceId, label: dataSourceLabel }) => {
this.setState({ dataSourceId, dataSourceLabel });
}}
disableDataSourceSelectable={true}
notifications={services.notificationService}
savedObjects={core.savedObjects.client}
selectedOption={(() => {
if (this.state.dataSourceId && this.state.dataSourceId !== "") {
return [
{
id: this.state.dataSourceId,
label: this.state.dataSourceLabel,
},
];
}
return undefined;
})()}
fullWidth={false}
hideLocalCluster={false}
/>
)}
/>
</Switch>
)}
<ModalRoot services={services} />
Expand Down

0 comments on commit 4937cdd

Please sign in to comment.