Skip to content

Commit

Permalink
Fix loading data views in ES|QL mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Nov 6, 2024
1 parent bde5e11 commit fbd7718
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,10 @@ export function DiscoverMainRoute({
const { dataSource } = stateContainer.appState.getState();
const isEsqlQuery = isDataSourceType(dataSource, DataSourceType.Esql);

// ES|QL should work without data views
// Given we have a saved search id, we can skip the data/data view check, too
// A given nextDataView is provided by the user, and therefore we can skip the data/data view check

if (savedSearchId || isEsqlQuery || nextDataView) {
if (!isEsqlQuery) {
await stateContainer.actions.loadDataViewList();
}
// even ES|QL doesn't need a data view, we still need to load the data view list to
// ensure the data view is available for the user to switch to classic mode
await stateContainer.actions.loadDataViewList();
return true;
}

Expand Down

0 comments on commit fbd7718

Please sign in to comment.