Skip to content

Commit

Permalink
clean ups
Browse files Browse the repository at this point in the history
  • Loading branch information
saarikabhasi committed Oct 18, 2024
1 parent f72f42c commit 6f3b582
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export class IndexActionsContextMenu extends Component {
extensionsService,
application,
http,
history
history,
IndexDetailsSection.Overview
);
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,9 @@ export const navigateToIndexDetailsPage = (
tabId?: IndexDetailsSection
) => {
if (!extensionsService.indexDetailsPageRoute) {
history.push(
getIndexDetailsLink(indexName, indicesListURLParams, IndexDetailsSection.Overview)
);
history.push(getIndexDetailsLink(indexName, indicesListURLParams, tabId));
} else {
const route = extensionsService.indexDetailsPageRoute.renderRoute(indexName, tabId);
application.navigateToUrl(http.basePath.prepend(`${route}`));
application.navigateToUrl(http.basePath.prepend(route));
}
};
10 changes: 5 additions & 5 deletions x-pack/plugins/search_indices/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ export class SearchIndicesPlugin
if (this.pluginEnabled) {
indexManagement?.extensionsService.setIndexDetailsPageRoute({
renderRoute: (indexName, detailsTabId) => {
const route = `/app/elasticsearch/indices/index_details/${indexName}`
if(detailsTabId && Object.values(SearchIndexDetailsTabs).includes(detailsTabId)){
return `${route}/${detailsTabId}`
const route = `/app/elasticsearch/indices/index_details/${indexName}`;
const tabIds:string[] = Object.values(SearchIndexDetailsTabs)
if (detailsTabId && tabIds.includes(detailsTabId)) {
return `${route}/${detailsTabId}`;
}
return route

return route;
},
});
}
Expand Down

0 comments on commit 6f3b582

Please sign in to comment.