use getIndexPattern instead of title (#143686)

This commit is contained in:
Matthew Kime 2022-10-20 07:27:40 -05:00 committed by GitHub
parent 719d680c9d
commit a921696fbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -93,7 +93,7 @@ export const ExplainLogRateSpikesAnalysis: FC<ExplainLogRateSpikesAnalysisProps>
searchQuery: JSON.stringify(searchQuery),
// TODO Handle data view without time fields.
timeFieldName: dataView.timeFieldName ?? '',
index: dataView.title,
index: dataView.getIndexPattern(),
grouping: true,
flushFix: true,
...windowParameters,

View file

@ -40,7 +40,7 @@ export async function setFullTimeRange(
): Promise<GetTimeFieldRangeResponse> {
const runtimeMappings = dataView.getRuntimeMappings();
const resp = await getTimeFieldRange({
index: dataView.title,
index: dataView.getIndexPattern(),
timeFieldName: dataView.timeFieldName,
query: excludeFrozenData ? addExcludeFrozenToQuery(query) : query,
...(isPopulatedObject(runtimeMappings) ? { runtimeMappings } : {}),

View file

@ -148,7 +148,7 @@ export const useData = (
earliest: timefilterActiveBounds.min?.valueOf(),
latest: timefilterActiveBounds.max?.valueOf(),
intervalMs: _timeBuckets.getInterval()?.asMilliseconds(),
index: currentDataView.title,
index: currentDataView.getIndexPattern(),
searchQuery,
timeFieldName: currentDataView.timeFieldName,
runtimeFieldMap: currentDataView.getRuntimeMappings(),