mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[8.17] [ML] Anomaly Explorer: Respect selected Overall swimlane bucket for view by jobId
(#222845) (#222930)
# Backport This will backport the following commits from `main` to `8.17`: - [[ML] Anomaly Explorer: Respect selected Overall swimlane bucket for view by `jobId` (#222845)](https://github.com/elastic/kibana/pull/222845) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Robert Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-06T08:15:48Z","message":"[ML] Anomaly Explorer: Respect selected Overall swimlane bucket for view by `jobId` (#222845)\n\nCurrently, we pass `SWIMLANE_HARD_LIMIT` (1000) to the\n`mlResultsService.getScoresByBucket` request, which causes\n`topFieldValues` to be empty. As a result, `_initViewBySwimLaneData`\nisn't called, and the viewBy swimlane isn't filtered accordingly.\n\n\n","sha":"d42f5b68e3543f2b2a5a8c0a957cd12d99e7131b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","Feature:Anomaly Detection","Team:ML","backport:version","v9.1.0","v8.19.0","v8.18.3","v8.17.8"],"title":"[ML] Anomaly Explorer: Respect selected Overall swimlane bucket for view by `jobId`","number":222845,"url":"https://github.com/elastic/kibana/pull/222845","mergeCommit":{"message":"[ML] Anomaly Explorer: Respect selected Overall swimlane bucket for view by `jobId` (#222845)\n\nCurrently, we pass `SWIMLANE_HARD_LIMIT` (1000) to the\n`mlResultsService.getScoresByBucket` request, which causes\n`topFieldValues` to be empty. As a result, `_initViewBySwimLaneData`\nisn't called, and the viewBy swimlane isn't filtered accordingly.\n\n\n","sha":"d42f5b68e3543f2b2a5a8c0a957cd12d99e7131b"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222845","number":222845,"mergeCommit":{"message":"[ML] Anomaly Explorer: Respect selected Overall swimlane bucket for view by `jobId` (#222845)\n\nCurrently, we pass `SWIMLANE_HARD_LIMIT` (1000) to the\n`mlResultsService.getScoresByBucket` request, which causes\n`topFieldValues` to be empty. As a result, `_initViewBySwimLaneData`\nisn't called, and the viewBy swimlane isn't filtered accordingly.\n\n\n","sha":"d42f5b68e3543f2b2a5a8c0a957cd12d99e7131b"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
This commit is contained in:
parent
314e4e46c5
commit
44caaceacf
2 changed files with 11 additions and 4 deletions
|
@ -272,6 +272,7 @@ export class AnomalyTimelineStateService extends StateService {
|
|||
this.getSwimLaneBucketInterval$(),
|
||||
this._timeBounds$,
|
||||
this._refreshSubject$,
|
||||
this._swimLaneSeverity$,
|
||||
]) as Observable<
|
||||
[
|
||||
ExplorerJob[],
|
||||
|
@ -282,7 +283,8 @@ export class AnomalyTimelineStateService extends StateService {
|
|||
AppStateSelectedCells,
|
||||
TimeBucketsInterval,
|
||||
TimeRangeBounds,
|
||||
Refresh
|
||||
Refresh,
|
||||
number
|
||||
]
|
||||
>
|
||||
)
|
||||
|
@ -296,6 +298,9 @@ export class AnomalyTimelineStateService extends StateService {
|
|||
swimLaneCardinality,
|
||||
selectedCells,
|
||||
swimLaneBucketInterval,
|
||||
timeBounds,
|
||||
refresh,
|
||||
swimlaneSeverity,
|
||||
]) => {
|
||||
if (!selectedCells?.showTopFieldValues) {
|
||||
return of([]);
|
||||
|
@ -319,7 +324,8 @@ export class AnomalyTimelineStateService extends StateService {
|
|||
swimLanePagination.viewByFromPage,
|
||||
swimLaneBucketInterval,
|
||||
selectionInfluencers,
|
||||
influencersFilterQuery
|
||||
influencersFilterQuery,
|
||||
swimlaneSeverity
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -257,7 +257,8 @@ export class AnomalyTimelineService {
|
|||
fromPage: number,
|
||||
bucketInterval: TimeBucketsInterval,
|
||||
selectionInfluencers: MlEntityField[],
|
||||
influencersFilterQuery: InfluencersFilterQuery
|
||||
influencersFilterQuery: InfluencersFilterQuery,
|
||||
swimlaneSeverity: number
|
||||
) {
|
||||
const selectedJobIds = selectedJobs.map((d) => d.id);
|
||||
|
||||
|
@ -296,7 +297,7 @@ export class AnomalyTimelineService {
|
|||
bucketInterval.asMilliseconds(),
|
||||
perPage,
|
||||
fromPage,
|
||||
swimlaneLimit
|
||||
swimlaneSeverity
|
||||
);
|
||||
return Object.keys(resp.results);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue