Skip to content

Commit

Permalink
No index pattern routing (#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 <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Jul 1, 2023
1 parent ce3a4d1 commit 979709c
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 979709c

Please sign in to comment.