Skip to content

[ML] Anomaly Swim Lane: Fixes rendering of dashboard panel in PDF reporting#235475

Merged
rbrtj merged 5 commits intoelastic:mainfrom
rbrtj:anomaly-swimlane-embeddable-fix
Sep 22, 2025
Merged

[ML] Anomaly Swim Lane: Fixes rendering of dashboard panel in PDF reporting#235475
rbrtj merged 5 commits intoelastic:mainfrom
rbrtj:anomaly-swimlane-embeddable-fix

Conversation

@rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Sep 18, 2025

Adds data-render-complete for PDF reporting for the ML Anomaly Swim Lane dashboard panel.

Resolves #234704

How to test:

  1. create new dashboard and add a anomaly swimlane panel.
  2. save dashboard
  3. share dashboard as PDF
  4. Open report and notice that panel is now displaying correctly
Before After
image image
@rbrtj rbrtj self-assigned this Sep 18, 2025
@rbrtj rbrtj marked this pull request as ready for review September 18, 2025 07:41
@rbrtj rbrtj requested a review from a team as a code owner September 18, 2025 07:41
@rbrtj rbrtj added release_note:fix :ml Team:ML Team label for ML (also use :ml) t// backport:version Backport to applied version labels v8.18.8 v8.19.5 v9.0.8 labels Sep 18, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and confirmed the swim lane panel is rendered in PDF reports.

Don't want to block this PR, but for the SMV panel I noticed that the main chart sometimes doesn't get rendered, only the context chart.

@rbrtj
Copy link
Contributor Author

rbrtj commented Sep 22, 2025

Tested and confirmed the swim lane panel is rendered in PDF reports.

Don't want to block this PR, but for the SMV panel I noticed that the main chart sometimes doesn't get rendered, only the context chart.

As discussed, we decided to move forward with the fix for the Swimlane only for now.

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #12 / discover Discover CSV Export Generate CSV: archived search generates a report with data
  • [job] [logs] Scout Test Run Builder / undefined - EUI testing wrapper: EuiDataGrid - data grid, run

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 5.4MB 5.4MB +296.0B

History

cc @rbrtj

@rbrtj rbrtj merged commit 7b68018 into elastic:main Sep 22, 2025
12 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/17917796079

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 22, 2025
…reporting (elastic#235475)

Resolves elastic#234704

How to test:
1. create new dashboard and add a anomaly swimlane panel.
2. save dashboard
3. share dashboard as PDF
4. Open report and notice that panel is now displaying correctly

| Before  | After |
| ------------- | ------------- |
| <img width="1676" height="731" alt="image"
src="https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21"
/> | <img width="1687" height="615" alt="image"
src="https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279"
/> |

(cherry picked from commit 7b68018)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 22, 2025
…reporting (elastic#235475)

Resolves elastic#234704

How to test:
1. create new dashboard and add a anomaly swimlane panel.
2. save dashboard
3. share dashboard as PDF
4. Open report and notice that panel is now displaying correctly

| Before  | After |
| ------------- | ------------- |
| <img width="1676" height="731" alt="image"
src="https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21"
/> | <img width="1687" height="615" alt="image"
src="https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279"
/> |

(cherry picked from commit 7b68018)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.18:
- [ML] Fixes handling of time range in embedded anomaly swim lane (#225803)
8.19
9.0 Backport failed because of merge conflicts
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 235475

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 22, 2025
…or PDF reporting (#235475) (#235962)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ML] Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)](#235475)

<!--- 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-09-22T14:02:16Z","message":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)\n\nResolves
https://github.com/elastic/kibana/issues/234704\n\nHow to test:\n1.
create new dashboard and add a anomaly swimlane panel.\n2. save
dashboard\n3. share dashboard as PDF\n4. Open report and notice that
panel is now displaying correctly\n\n| Before | After |\n| -------------
| ------------- |\n| <img width=\"1676\" height=\"731\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21\"\n/>
| <img width=\"1687\" height=\"615\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279\"\n/>
|","sha":"7b6801816289d1f7a30d13335801de6f1c347451","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Team:ML","backport:version","v9.2.0","v8.18.8","v8.19.5","v9.0.8","v9.1.5"],"title":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting","number":235475,"url":"https://github.com/elastic/kibana/pull/235475","mergeCommit":{"message":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)\n\nResolves
https://github.com/elastic/kibana/issues/234704\n\nHow to test:\n1.
create new dashboard and add a anomaly swimlane panel.\n2. save
dashboard\n3. share dashboard as PDF\n4. Open report and notice that
panel is now displaying correctly\n\n| Before | After |\n| -------------
| ------------- |\n| <img width=\"1676\" height=\"731\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21\"\n/>
| <img width=\"1687\" height=\"615\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279\"\n/>
|","sha":"7b6801816289d1f7a30d13335801de6f1c347451"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19","9.0","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/235475","number":235475,"mergeCommit":{"message":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)\n\nResolves
https://github.com/elastic/kibana/issues/234704\n\nHow to test:\n1.
create new dashboard and add a anomaly swimlane panel.\n2. save
dashboard\n3. share dashboard as PDF\n4. Open report and notice that
panel is now displaying correctly\n\n| Before | After |\n| -------------
| ------------- |\n| <img width=\"1676\" height=\"731\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21\"\n/>
| <img width=\"1687\" height=\"615\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279\"\n/>
|","sha":"7b6801816289d1f7a30d13335801de6f1c347451"}},{"branch":"8.18","label":"v8.18.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Sep 22, 2025
…r PDF reporting (#235475) (#235963)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[ML] Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)](#235475)

<!--- 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-09-22T14:02:16Z","message":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)\n\nResolves
https://github.com/elastic/kibana/issues/234704\n\nHow to test:\n1.
create new dashboard and add a anomaly swimlane panel.\n2. save
dashboard\n3. share dashboard as PDF\n4. Open report and notice that
panel is now displaying correctly\n\n| Before | After |\n| -------------
| ------------- |\n| <img width=\"1676\" height=\"731\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21\"\n/>
| <img width=\"1687\" height=\"615\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279\"\n/>
|","sha":"7b6801816289d1f7a30d13335801de6f1c347451","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Team:ML","backport:version","v9.2.0","v8.18.8","v8.19.5","v9.0.8","v9.1.5"],"title":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting","number":235475,"url":"https://github.com/elastic/kibana/pull/235475","mergeCommit":{"message":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)\n\nResolves
https://github.com/elastic/kibana/issues/234704\n\nHow to test:\n1.
create new dashboard and add a anomaly swimlane panel.\n2. save
dashboard\n3. share dashboard as PDF\n4. Open report and notice that
panel is now displaying correctly\n\n| Before | After |\n| -------------
| ------------- |\n| <img width=\"1676\" height=\"731\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21\"\n/>
| <img width=\"1687\" height=\"615\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279\"\n/>
|","sha":"7b6801816289d1f7a30d13335801de6f1c347451"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19","9.0","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/235475","number":235475,"mergeCommit":{"message":"[ML]
Anomaly Swimlane Embeddable: Add `data-render-complete` for PDF
reporting (#235475)\n\nResolves
https://github.com/elastic/kibana/issues/234704\n\nHow to test:\n1.
create new dashboard and add a anomaly swimlane panel.\n2. save
dashboard\n3. share dashboard as PDF\n4. Open report and notice that
panel is now displaying correctly\n\n| Before | After |\n| -------------
| ------------- |\n| <img width=\"1676\" height=\"731\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21\"\n/>
| <img width=\"1687\" height=\"615\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279\"\n/>
|","sha":"7b6801816289d1f7a30d13335801de6f1c347451"}},{"branch":"8.18","label":"v8.18.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
…reporting (elastic#235475)

Resolves elastic#234704

How to test:
1. create new dashboard and add a anomaly swimlane panel.
2. save dashboard
3. share dashboard as PDF
4. Open report and notice that panel is now displaying correctly

| Before  | After |
| ------------- | ------------- |
| <img width="1676" height="731" alt="image"
src="https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21"
/> | <img width="1687" height="615" alt="image"
src="https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279"
/> |
@peteharverson peteharverson changed the title [ML] Anomaly Swimlane Embeddable: Add data-render-complete for PDF reporting Sep 24, 2025
@peteharverson peteharverson changed the title [ML] Anomaly Swimlane Embeddable: Adds data-render-complete for PDF reporting Sep 24, 2025
niros1 pushed a commit that referenced this pull request Sep 30, 2025
…reporting (#235475)

Resolves #234704

How to test:
1. create new dashboard and add a anomaly swimlane panel.
2. save dashboard
3. share dashboard as PDF
4. Open report and notice that panel is now displaying correctly

| Before  | After |
| ------------- | ------------- |
| <img width="1676" height="731" alt="image"
src="https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21"
/> | <img width="1687" height="615" alt="image"
src="https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279"
/> |
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…reporting (elastic#235475)

Resolves elastic#234704

How to test:
1. create new dashboard and add a anomaly swimlane panel.
2. save dashboard
3. share dashboard as PDF
4. Open report and notice that panel is now displaying correctly

| Before  | After |
| ------------- | ------------- |
| <img width="1676" height="731" alt="image"
src="https://github.com/user-attachments/assets/b752543f-7c73-452d-aab0-58d70f07dc21"
/> | <img width="1687" height="615" alt="image"
src="https://github.com/user-attachments/assets/a2a083d0-fd39-4155-9cad-1bbd95348279"
/> |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels :ml release_note:fix Team:ML Team label for ML (also use :ml) t// v8.18.8 v8.19.5 v9.0.8 v9.1.5 v9.2.0

5 participants