Skip to content

Commit

Permalink
Address few more comments
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhat Sharma <[email protected]>
  • Loading branch information
Prabhat Sharma committed Apr 5, 2024
1 parent 4043672 commit fa9c418
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion public/pages/Indices/containers/Indices/Indices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ export class Indices extends MDSEnabledComponent<IndicesProps, IndicesState> {
try {
const { indexService, history } = this.props;
const queryObject = this.getQueryObjectFromState(this.state);
const queryParamsString = queryString.stringify({ ...queryObject, dataSourceLabel: this.state.dataSourceLabel });
const queryParamsString = queryString.stringify({
...queryObject,
...(this.state.multiDataSourceEnabled ? { dataSourceLabel: this.state.dataSourceLabel } : {}),
});
history.replace({ ...this.props.location, search: queryParamsString });

const getIndicesResponse = await indexService.getIndices({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ export class ManagedIndices extends MDSEnabledComponent<ManagedIndicesProps, Man
try {
const { managedIndexService, history } = this.props;
const queryObject = ManagedIndices.getQueryObjectFromState(this.state);
const queryParamsString = queryString.stringify({ ...queryObject, dataSourceLabel: this.state.dataSourceLabel });
const queryParamsString = queryString.stringify({
...queryObject,
...(this.state.multiDataSourceEnabled ? { dataSourceLabel: this.state.dataSourceLabel } : {}),
});
history.replace({ ...this.props.location, search: queryParamsString });

const getManagedIndicesResponse = await managedIndexService.getManagedIndices({
Expand Down

0 comments on commit fa9c418

Please sign in to comment.