-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Enable report sharing #153429
[Lens] Enable report sharing #153429
Conversation
@@ -624,6 +624,12 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({ | |||
); | |||
}); | |||
|
|||
function dispatchRenderComplete(node: HTMLDivElement | null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also a RenderCompleteDispatcher
class, but for just few lines I thought to inline it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @vadimkibana
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to use your inline dispatcher.
@@ -7,6 +7,11 @@ | |||
display: none !important; | |||
} | |||
|
|||
/* some elements needs to be stretched to be shared */ | |||
.stretch-for-sharing { | |||
margin: 0px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not found any other solution here to remove the bottom margin in Lens' workspace, used to space the suggestion panel from the chart one.
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome Marco, def one of my favorite enhancements for 8.8. PNGs are created without stretching but I see some stretching on pdfs
I tested the agg based and they also have the same problem so I think it is fine for now.
Question: When I share an unsaved agg based visualization the report has the title Visualization[DATE]. Can we do the same for Lens? Because now all of them have the unsaved
title and can be difficult for someone to identify them (the date can always help)
- Exporting a metric with a scrollbar is generating a png that misses the last row. Can we fix it? (same happens with a bar with a very long legend)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dej611 can we run a test runner 50 times to ensure that the tests added are not flaky?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure 100 runs all passing ✅ : https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2034
got it Marco thanx, I am fine with the first 1. About the second I am also fine if it is something that needs an investigation and is not an easy fix. Thanx for looking into the 3rd one! |
Updated the naming convention. Note that unfortunately this applies also to the CSV exporting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, and it's so close! I still see one issue where the report doesn't contain the latest state of the work in the browser.
Steps to reproduce:
- Install eCommerce Sample Data
- Open the Dashboard, click Edit
- Edit the "Breakdown by Category" visualization
- Save the visualization to the library (uncheck Update panel on Dashboard)
- Now make a change to the visualization. Example: change the breakdown field to customer first name.
- Without saving the visualization, make a PNG report
- The report shows the breakdown by category still - not the unsaved changes.
Users should be able to make a report that includes some ad-hoc (unsaved) changes. It's not uncommon to see users with reporting privileges and read-only privileges to visualizations. Therefore, when a report is made based on a saved object with some unsaved changes, the report should show what the browser shows: a merge of the saved state and the ad-hoc changes.
Fixed in fe0d606 for both v1 and v2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Great work! Thanks for bearing with me through the requirements about optimizing the locator params.
Let's not worry greatly that a POST URL can't be copied from Lens when the visualization is in a dirty state. Advanced users will be able to modify the POST URL to add filters if needed. Sorry that the integration is in a confusing state, since the share panel options accept a URL but that URL is not used for Reporting. The V1 interface only exists from tech debt, since putting a URL in the job parameters doesn't serve a great purpose for the future plans of reporting. |
@@ -116,7 +118,7 @@ export const reportingScreenshotShareProvider = ({ | |||
}); | |||
|
|||
const jobProviderOptions: JobParamsProviderOptions = { | |||
shareableUrl, | |||
shareableUrl: isDirty ? shareableUrl : shareableUrlForSavedObject ?? shareableUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed this issue to remove V1 code from reporting, which will make the shareableUrl
field not part of JobParamsProviderOptions
in the future: #154601
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
## Summary Adds the 8.8 documentation for the following: - Enable report sharing: #153429 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/reporting-getting-started.html - Random sampling feature: #143221 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#improve-visualization-loading-time - Improve Ignore global filters UI: #154441 and #155280 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations --------- Co-authored-by: Tim Sullivan <[email protected]>
## Summary Adds the 8.8 documentation for the following: - Enable report sharing: elastic#153429 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/reporting-getting-started.html - Random sampling feature: elastic#143221 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#improve-visualization-loading-time - Improve Ignore global filters UI: elastic#154441 and elastic#155280 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations --------- Co-authored-by: Tim Sullivan <[email protected]> (cherry picked from commit 06a800f)
# Backport This will backport the following commits from `main` to `8.8`: - [[DOCS] Adds 8.8 Viz docs (#157215)](#157215) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kaarina Tungseth","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-23T15:41:42Z","message":"[DOCS] Adds 8.8 Viz docs (#157215)\n\n## Summary\r\n\r\nAdds the 8.8 documentation for the following:\r\n\r\n- Enable report sharing: https://github.com/elastic/kibana/pull/153429\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/reporting-getting-started.html\r\n\r\n- Random sampling feature: https://github.com/elastic/kibana/pull/143221\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#improve-visualization-loading-time\r\n\r\n- Improve Ignore global filters UI:\r\nhttps://github.com//pull/154441 and\r\nhttps://github.com//pull/155280\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations\r\n\r\n---------\r\n\r\nCo-authored-by: Tim Sullivan <[email protected]>","sha":"06a800fbad1f2a8fd9146bfe0c439e2107f771fc","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","Team:SharedUX","v8.8.0","v8.9.0"],"number":157215,"url":"https://github.com/elastic/kibana/pull/157215","mergeCommit":{"message":"[DOCS] Adds 8.8 Viz docs (#157215)\n\n## Summary\r\n\r\nAdds the 8.8 documentation for the following:\r\n\r\n- Enable report sharing: https://github.com/elastic/kibana/pull/153429\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/reporting-getting-started.html\r\n\r\n- Random sampling feature: https://github.com/elastic/kibana/pull/143221\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#improve-visualization-loading-time\r\n\r\n- Improve Ignore global filters UI:\r\nhttps://github.com//pull/154441 and\r\nhttps://github.com//pull/155280\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations\r\n\r\n---------\r\n\r\nCo-authored-by: Tim Sullivan <[email protected]>","sha":"06a800fbad1f2a8fd9146bfe0c439e2107f771fc"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157215","number":157215,"mergeCommit":{"message":"[DOCS] Adds 8.8 Viz docs (#157215)\n\n## Summary\r\n\r\nAdds the 8.8 documentation for the following:\r\n\r\n- Enable report sharing: https://github.com/elastic/kibana/pull/153429\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/reporting-getting-started.html\r\n\r\n- Random sampling feature: https://github.com/elastic/kibana/pull/143221\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#improve-visualization-loading-time\r\n\r\n- Improve Ignore global filters UI:\r\nhttps://github.com//pull/154441 and\r\nhttps://github.com//pull/155280\r\nDocs preview:\r\nhttps://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations\r\n\r\n---------\r\n\r\nCo-authored-by: Tim Sullivan <[email protected]>","sha":"06a800fbad1f2a8fd9146bfe0c439e2107f771fc"}}]}] BACKPORT--> Co-authored-by: Kaarina Tungseth <[email protected]>
## Summary Adds the 8.8 documentation for the following: - Enable report sharing: elastic#153429 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/reporting-getting-started.html - Random sampling feature: elastic#143221 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#improve-visualization-loading-time - Improve Ignore global filters UI: elastic#154441 and elastic#155280 Docs preview: https://kibana_157215.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations --------- Co-authored-by: Tim Sullivan <[email protected]>
…163873) ## Summary This PR fixes a bug mentioned in https://github.com/elastic/sdh-kibana/issues/4016 from #153429 where users with custom roles should allow them the ability to generate reports (with `xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't arise for users with all privileges. - set xpack.reporting.roles.enabled false in the kibana.yml - load sample data - create a custom role where the index (whatever sample data index you want) has the read and view_index_metadata privilege. - Add the Kibana privilege for all spaces Analytics > Dashboard > Generate PDF or PNG Reports and Download Csv reports from Saved Search panels. Create the global privilege and then the role. - Apply that role to a new user and log in using that user. ## Before You can see in the console that usesUiCapabilitie in register_pdf_png_reporting.tsx is true <img width="1458" alt="Screenshot 2023-08-14 at 12 34 38 PM" src="https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb"> ## After <img width="1343" alt="Screenshot 2023-08-14 at 2 18 30 PM" src="https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]>
…lastic#163873) ## Summary This PR fixes a bug mentioned in https://github.com/elastic/sdh-kibana/issues/4016 from elastic#153429 where users with custom roles should allow them the ability to generate reports (with `xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't arise for users with all privileges. - set xpack.reporting.roles.enabled false in the kibana.yml - load sample data - create a custom role where the index (whatever sample data index you want) has the read and view_index_metadata privilege. - Add the Kibana privilege for all spaces Analytics > Dashboard > Generate PDF or PNG Reports and Download Csv reports from Saved Search panels. Create the global privilege and then the role. - Apply that role to a new user and log in using that user. ## Before You can see in the console that usesUiCapabilitie in register_pdf_png_reporting.tsx is true <img width="1458" alt="Screenshot 2023-08-14 at 12 34 38 PM" src="https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb"> ## After <img width="1343" alt="Screenshot 2023-08-14 at 2 18 30 PM" src="https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 54d11a9)
…ard (#163873) (#163972) # Backport This will backport the following commits from `main` to `8.9`: - [[Reporting] Allow custom roles to use image reporting in dashboard (#163873)](#163873) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Rachel Shen","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-15T19:42:06Z","message":"[Reporting] Allow custom roles to use image reporting in dashboard (#163873)\n\n## Summary\r\n\r\nThis PR fixes a bug mentioned in\r\nhttps://github.com/elastic/sdh-kibana/issues/4016 from\r\nhttps://github.com//pull/153429 where users with custom\r\nroles should allow them the ability to generate reports (with\r\n`xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't\r\narise for users with all privileges.\r\n\r\n- set xpack.reporting.roles.enabled false in the kibana.yml \r\n- load sample data \r\n- create a custom role where the index (whatever sample data index you\r\nwant) has the read and view_index_metadata privilege.\r\n- Add the Kibana privilege for all spaces Analytics > Dashboard >\r\nGenerate PDF or PNG Reports and Download Csv reports from Saved Search\r\npanels. Create the global privilege and then the role.\r\n- Apply that role to a new user and log in using that user. \r\n\r\n\r\n## Before \r\n\r\nYou can see in the console that usesUiCapabilitie in\r\nregister_pdf_png_reporting.tsx is true\r\n\r\n<img width=\"1458\" alt=\"Screenshot 2023-08-14 at 12 34 38 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb\">\r\n\r\n\r\n## After\r\n<img width=\"1343\" alt=\"Screenshot 2023-08-14 at 2 18 30 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131\">\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"54d11a964c1ed86268cb1a5aca24674895ffdf13","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:Reporting","Team:SharedUX","backport:all-open","v8.10.0"],"number":163873,"url":"https://github.com/elastic/kibana/pull/163873","mergeCommit":{"message":"[Reporting] Allow custom roles to use image reporting in dashboard (#163873)\n\n## Summary\r\n\r\nThis PR fixes a bug mentioned in\r\nhttps://github.com/elastic/sdh-kibana/issues/4016 from\r\nhttps://github.com//pull/153429 where users with custom\r\nroles should allow them the ability to generate reports (with\r\n`xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't\r\narise for users with all privileges.\r\n\r\n- set xpack.reporting.roles.enabled false in the kibana.yml \r\n- load sample data \r\n- create a custom role where the index (whatever sample data index you\r\nwant) has the read and view_index_metadata privilege.\r\n- Add the Kibana privilege for all spaces Analytics > Dashboard >\r\nGenerate PDF or PNG Reports and Download Csv reports from Saved Search\r\npanels. Create the global privilege and then the role.\r\n- Apply that role to a new user and log in using that user. \r\n\r\n\r\n## Before \r\n\r\nYou can see in the console that usesUiCapabilitie in\r\nregister_pdf_png_reporting.tsx is true\r\n\r\n<img width=\"1458\" alt=\"Screenshot 2023-08-14 at 12 34 38 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb\">\r\n\r\n\r\n## After\r\n<img width=\"1343\" alt=\"Screenshot 2023-08-14 at 2 18 30 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131\">\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"54d11a964c1ed86268cb1a5aca24674895ffdf13"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163873","number":163873,"mergeCommit":{"message":"[Reporting] Allow custom roles to use image reporting in dashboard (#163873)\n\n## Summary\r\n\r\nThis PR fixes a bug mentioned in\r\nhttps://github.com/elastic/sdh-kibana/issues/4016 from\r\nhttps://github.com//pull/153429 where users with custom\r\nroles should allow them the ability to generate reports (with\r\n`xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't\r\narise for users with all privileges.\r\n\r\n- set xpack.reporting.roles.enabled false in the kibana.yml \r\n- load sample data \r\n- create a custom role where the index (whatever sample data index you\r\nwant) has the read and view_index_metadata privilege.\r\n- Add the Kibana privilege for all spaces Analytics > Dashboard >\r\nGenerate PDF or PNG Reports and Download Csv reports from Saved Search\r\npanels. Create the global privilege and then the role.\r\n- Apply that role to a new user and log in using that user. \r\n\r\n\r\n## Before \r\n\r\nYou can see in the console that usesUiCapabilitie in\r\nregister_pdf_png_reporting.tsx is true\r\n\r\n<img width=\"1458\" alt=\"Screenshot 2023-08-14 at 12 34 38 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb\">\r\n\r\n\r\n## After\r\n<img width=\"1343\" alt=\"Screenshot 2023-08-14 at 2 18 30 PM\"\r\nsrc=\"https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131\">\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"54d11a964c1ed86268cb1a5aca24674895ffdf13"}}]}] BACKPORT--> Co-authored-by: Rachel Shen <[email protected]>
…lastic#163873) ## Summary This PR fixes a bug mentioned in https://github.com/elastic/sdh-kibana/issues/4016 from elastic#153429 where users with custom roles should allow them the ability to generate reports (with `xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't arise for users with all privileges. - set xpack.reporting.roles.enabled false in the kibana.yml - load sample data - create a custom role where the index (whatever sample data index you want) has the read and view_index_metadata privilege. - Add the Kibana privilege for all spaces Analytics > Dashboard > Generate PDF or PNG Reports and Download Csv reports from Saved Search panels. Create the global privilege and then the role. - Apply that role to a new user and log in using that user. ## Before You can see in the console that usesUiCapabilitie in register_pdf_png_reporting.tsx is true <img width="1458" alt="Screenshot 2023-08-14 at 12 34 38 PM" src="https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb"> ## After <img width="1343" alt="Screenshot 2023-08-14 at 2 18 30 PM" src="https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 54d11a9)
…lastic#163873) ## Summary This PR fixes a bug mentioned in elastic/sdh-kibana#4016 from elastic#153429 where users with custom roles should allow them the ability to generate reports (with `xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't arise for users with all privileges. - set xpack.reporting.roles.enabled false in the kibana.yml - load sample data - create a custom role where the index (whatever sample data index you want) has the read and view_index_metadata privilege. - Add the Kibana privilege for all spaces Analytics > Dashboard > Generate PDF or PNG Reports and Download Csv reports from Saved Search panels. Create the global privilege and then the role. - Apply that role to a new user and log in using that user. ## Before You can see in the console that usesUiCapabilitie in register_pdf_png_reporting.tsx is true <img width="1458" alt="Screenshot 2023-08-14 at 12 34 38 PM" src="https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb"> ## After <img width="1343" alt="Screenshot 2023-08-14 at 2 18 30 PM" src="https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]>
…163873) ## Summary This PR fixes a bug mentioned in elastic/sdh-kibana#4016 from #153429 where users with custom roles should allow them the ability to generate reports (with `xpack.reporting.roles.enabled: false`) in Dashboard. This bug doesn't arise for users with all privileges. - set xpack.reporting.roles.enabled false in the kibana.yml - load sample data - create a custom role where the index (whatever sample data index you want) has the read and view_index_metadata privilege. - Add the Kibana privilege for all spaces Analytics > Dashboard > Generate PDF or PNG Reports and Download Csv reports from Saved Search panels. Create the global privilege and then the role. - Apply that role to a new user and log in using that user. ## Before You can see in the console that usesUiCapabilitie in register_pdf_png_reporting.tsx is true <img width="1458" alt="Screenshot 2023-08-14 at 12 34 38 PM" src="https://github.com/elastic/kibana/assets/20343860/f6b567fa-3fbd-4039-aa64-fd28bb4534fb"> ## After <img width="1343" alt="Screenshot 2023-08-14 at 2 18 30 PM" src="https://github.com/elastic/kibana/assets/20343860/1e4ade9e-332c-4431-954a-38e8a16d4131"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]>
Summary
Fixes #130438
This PR introduces the PNG/PDF reporting feature within Lens editor.
Note each reporting tasks is generating a shortURL SO in addition of the reporting job SO. There's a reusing mechanism but it applies only to the same config within the same session.
lens_visualization
typelens
typelens_visualization
object typelens_visualization
tolens
and used the app iconrenderComplete
within the Lens editorrenderComplete
event for the right node.hide-for-sharing
class where needed.stretch-for-sharing
where neededrenderComplete
for the RegionMap external plugin => separate issueReporting page:
Note: at the moment the reporting name follows the CSV naming convention of
unsaved
for unsaved Lens visualizations. The legacy Agg-based editor uses instead a namming pattern as follow:Visualization <timestamp>.png
.Final results:
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers