Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MD][IP]Tweak fetch data back to original #2238

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class CreateIndexPatternWizard extends Component<
);

// query local and remote indices, updating state independently
const queryLocalAndRemotePromise = ensureMinimumTime(
ensureMinimumTime(
this.catchAndWarn(
getIndices({ http, getIndexTags, pattern: '*', searchClient, dataSourceId }),

Expand All @@ -175,7 +175,7 @@ export class CreateIndexPatternWizard extends Component<
this.setState({ allIndices, isInitiallyLoadingIndices: false })
);

const queryWithFallbackPromise = this.catchAndWarn(
this.catchAndWarn(
// if we get an error from remote cluster query, supply fallback value that allows user entry.
// ['a'] is fallback value
getIndices({ http, getIndexTags, pattern: '*:*', searchClient, dataSourceId }),
Expand All @@ -185,8 +185,6 @@ export class CreateIndexPatternWizard extends Component<
).then((remoteIndices: string[] | MatchedItem[]) =>
this.setState({ remoteClustersExist: !!remoteIndices.length })
);

await Promise.all([queryLocalAndRemotePromise, queryWithFallbackPromise]);
};

createIndexPattern = async (timeFieldName: string | undefined, indexPatternId: string) => {
Expand Down Expand Up @@ -244,7 +242,7 @@ export class CreateIndexPatternWizard extends Component<

goToNextFromDataSource = (dataSourceRef: DataSourceRef) => {
this.setState({ isInitiallyLoadingIndices: true, dataSourceRef }, async () => {
await this.fetchData();
this.fetchData();
mpabba3003 marked this conversation as resolved.
Show resolved Hide resolved
this.goToNextStep();
});
};
Expand Down