Skip to content

Commit

Permalink
No index pattern routing (opensearch-project#4401)
Browse files Browse the repository at this point in the history
Should redirect to stack management page if there is no index pattern detected.

Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed Jun 30, 2023
1 parent d1ec331 commit 4017eaa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/dashboard/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,13 @@ export class DashboardPlugin
mount: async (params: AppMountParameters) => {
const [coreStart, pluginsStart, dashboardStart] = await core.getStartServices();
this.currentHistory = params.history;

// make sure the index pattern list is up to date
pluginsStart.data.indexPatterns.clearCache();
// make sure a default index pattern exists
// if not, the page will be redirected to management and dashboard won't be rendered
await pluginsStart.data.indexPatterns.ensureDefaultIndexPattern();

appMounted();
const {
embeddable: embeddableStart,
Expand Down

0 comments on commit 4017eaa

Please sign in to comment.