mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit afb458ede7
)
Co-authored-by: James Gowdy <jgowdy@elastic.co>
This commit is contained in:
parent
8de9d603a1
commit
b23900728c
2 changed files with 10 additions and 10 deletions
|
@ -34,7 +34,7 @@ export function topCategoriesProvider(mlClient: MlClient) {
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
[jobId]
|
||||
);
|
||||
return typeof body.hits.total === 'number' ? body.hits.total : body.hits.total.value;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ export function topCategoriesProvider(mlClient: MlClient) {
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
[jobId]
|
||||
);
|
||||
|
||||
const catCounts: Array<{
|
||||
|
@ -123,7 +123,7 @@ export function topCategoriesProvider(mlClient: MlClient) {
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
[jobId]
|
||||
);
|
||||
|
||||
// @ts-expect-error incorrect search response type
|
||||
|
|
|
@ -180,7 +180,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
sort: [{ record_score: { order: 'desc' } }],
|
||||
},
|
||||
},
|
||||
[]
|
||||
jobIds
|
||||
);
|
||||
|
||||
const tableData: {
|
||||
|
@ -311,7 +311,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
},
|
||||
};
|
||||
|
||||
const { body } = await mlClient.anomalySearch(query, []);
|
||||
const { body } = await mlClient.anomalySearch(query, jobIds);
|
||||
const maxScore = get(body, ['aggregations', 'max_score', 'value'], null);
|
||||
|
||||
return { maxScore };
|
||||
|
@ -375,7 +375,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
jobIds
|
||||
);
|
||||
|
||||
const bucketsByJobId: Array<{ key: string; maxTimestamp: { value?: number } }> = get(
|
||||
|
@ -406,7 +406,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
[jobId]
|
||||
);
|
||||
|
||||
const examplesByCategoryId: { [key: string]: any } = {};
|
||||
|
@ -443,7 +443,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
[jobId]
|
||||
);
|
||||
|
||||
const definition = { categoryId, terms: null, regex: null, examples: [] };
|
||||
|
@ -492,7 +492,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
},
|
||||
},
|
||||
},
|
||||
[]
|
||||
[jobId]
|
||||
);
|
||||
return body ? body.hits.hits.map((r) => r._source) : [];
|
||||
}
|
||||
|
@ -583,7 +583,7 @@ export function resultsServiceProvider(mlClient: MlClient, client?: IScopedClust
|
|||
aggs,
|
||||
},
|
||||
},
|
||||
[]
|
||||
jobIds
|
||||
);
|
||||
if (fieldToBucket === JOB_ID) {
|
||||
finalResults = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue