Skip to content
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] Fix overflow in printable report #70723

Merged
merged 4 commits into from
Jul 13, 2020

Conversation

flash1293
Copy link
Contributor

Fixes #55238

In printable reporting, the element with the reporting selector will get resized and repositioned. In regular usage, this element is just stretched with the content, but with the styles applied by reporting it has a fixed height. This PR sets the overflow attribute on this element so content doesn't leak.

@flash1293 flash1293 marked this pull request as ready for review July 3, 2020 21:57
@flash1293 flash1293 requested a review from a team July 3, 2020 21:57
@flash1293 flash1293 requested a review from a team as a code owner July 3, 2020 21:57
@flash1293 flash1293 added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jul 3, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

Confirmed that bug still exists on master and is fixed in this PR. Code LGTM 👌

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@wylieconlon
Copy link
Contributor

By truncating the table, are we going to lead to user confusion? Unlike the other table visualizations in Kibana, our table doesn't have pagination indicators. Personally I think this is an improvement, so it's worth doing, but what I'm asking is whether there is anything else we can do beyond this.

@flash1293
Copy link
Contributor Author

@wylieconlon I see your point, but that would be a more general question for how "printable reporting" works in general - the regular table vis can also be truncated like that depending on the config.

Copy link
Contributor

@miukimiu miukimiu left a comment

Choose a reason for hiding this comment

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

Tested locally and it looks good to me. 🎉

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

1 similar comment
@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Kibana Embedded in iframe with X-Pack Security.x-pack/test/functional_embedded/tests/iframe_embedded·ts.Kibana embedded in iframe should open Kibana for logged-in user

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 5 times on tracked branches: https://github.com/elastic/kibana/issues/70928

[00:00:00]       │
[00:00:00]         └-: Kibana embedded
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: in iframe
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> should open Kibana for logged-in user
[00:00:00]               └-> "before each" hook: global before each
[00:00:00]               │ debg TestSubjects.exists(headerGlobalNav)
[00:00:00]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="headerGlobalNav"]') with timeout=2500
[00:00:02]               │ debg --- retry.tryForTime error: [data-test-subj="headerGlobalNav"] is not displayed
[00:00:03]               │ debg navigating to login url: https://localhost:6131/login
[00:00:03]               │ debg navigate to: https://localhost:6131/login
[00:00:03]               │ debg browser[INFO] https://localhost:6131/login?_t=1594642280927 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:03]               │
[00:00:03]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:03]               │ debg ... sleep(700) start
[00:00:04]               │ debg ... sleep(700) end
[00:00:04]               │ debg returned from get, calling refresh
[00:00:04]               │ debg browser[INFO] https://localhost:6131/login?_t=1594642280927 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:04]               │
[00:00:04]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:04]               │ debg currentUrl = https://localhost:6131/login
[00:00:04]               │          appUrl = https://localhost:6131/login
[00:00:04]               │ debg TestSubjects.find(kibanaChrome)
[00:00:04]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:07]               │ debg browser[INFO] https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-13T12:11:23Z
[00:00:07]               │        Adding connection to https://localhost:6131/elasticsearch
[00:00:07]               │
[00:00:07]               │      "
[00:00:07]               │ debg ... sleep(501) start
[00:00:08]               │ debg ... sleep(501) end
[00:00:08]               │ debg in navigateTo url = https://localhost:6131/login
[00:00:08]               │ debg TestSubjects.exists(statusPageContainer)
[00:00:08]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:10]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:11]               │ debg Waiting for Login Form to appear.
[00:00:11]               │ debg Waiting up to 100000ms for login form...
[00:00:11]               │ debg TestSubjects.exists(loginForm)
[00:00:11]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:00:11]               │ debg TestSubjects.setValue(loginUsername, elastic)
[00:00:11]               │ debg TestSubjects.click(loginUsername)
[00:00:11]               │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:11]               │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:11]               │ debg TestSubjects.setValue(loginPassword, changeme)
[00:00:11]               │ debg TestSubjects.click(loginPassword)
[00:00:11]               │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:11]               │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:11]               │ debg TestSubjects.click(loginSubmit)
[00:00:11]               │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:11]               │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:11]               │ debg Waiting for login result, expected: undefined.
[00:00:11]               │ debg Waiting up to 20000ms for logout button visible...
[00:00:11]               │ debg TestSubjects.exists(userMenuButton)
[00:00:11]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:00:14]               │ debg browser[INFO] https://localhost:6131/app/home 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:14]               │
[00:00:14]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:14]               │ debg browser[INFO] https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-13T12:11:30Z
[00:00:14]               │        Adding connection to https://localhost:6131/elasticsearch
[00:00:14]               │
[00:00:14]               │      "
[00:00:14]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:00:14]               │ proc [kibana]  error  [12:11:32.181] [error][client][connection] Error: 140017862416192:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
[00:00:14]               │ proc [kibana] 
[00:00:14]               │ERROR browser[SEVERE] http://localhost:6131/api/_newsfeed-FTS-external-service-simulators/kibana/v8.0.0-SNAPSHOT.json - Failed to load resource: net::ERR_EMPTY_RESPONSE
[00:00:14]               │ERROR browser[SEVERE] https://localhost:6131/34553/bundles/plugin/newsfeed/newsfeed.plugin.js 0:19107 TypeError: Failed to fetch
[00:00:14]               │          at Fetch._callee3$ (https://localhost:6131/34553/bundles/core/core.entry.js:34:105174)
[00:00:14]               │          at l (https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:155324)
[00:00:14]               │          at Generator._invoke (https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:155077)
[00:00:14]               │          at Generator.forEach.e.<computed> [as throw] (https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:155681)
[00:00:14]               │          at fetch_asyncGeneratorStep (https://localhost:6131/34553/bundles/core/core.entry.js:34:99267)
[00:00:14]               │          at _throw (https://localhost:6131/34553/bundles/core/core.entry.js:34:99675)
[00:00:15]               │ debg TestSubjects.exists(userMenuButton)
[00:00:15]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:00:15]               │ debg TestSubjects.exists(userMenu)
[00:00:15]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:00:17]               │ debg --- retry.tryForTime error: [data-test-subj="userMenu"] is not displayed
[00:00:18]               │ debg TestSubjects.click(userMenuButton)
[00:00:18]               │ debg Find.clickByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:00:18]               │ debg Find.findByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:00:18]               │ debg Waiting up to 20000ms for user menu opened...
[00:00:18]               │ debg TestSubjects.exists(userMenu)
[00:00:18]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:00:18]               │ debg TestSubjects.exists(userMenu > logoutLink)
[00:00:18]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"] [data-test-subj="logoutLink"]') with timeout=2500
[00:00:18]               │ debg TestSubjects.find(iframe_embedded)
[00:00:18]               │ debg Find.findByCssSelector('[data-test-subj="iframe_embedded"]') with timeout=10000
[00:00:18]               │ debg browser[INFO] https://localhost:6131/app/home 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:18]               │
[00:00:18]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:18]               │ debg TestSubjects.exists(headerGlobalNav)
[00:00:18]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="headerGlobalNav"]') with timeout=2500
[00:00:21]               │ debg browser[INFO] https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-13T12:11:38Z
[00:00:21]               │        Adding connection to https://localhost:6131/elasticsearch
[00:00:21]               │
[00:00:21]               │      "
[00:00:21]               │ debg --- retry.tryForTime error: [data-test-subj="headerGlobalNav"] is not displayed
[00:00:21]               │ proc [kibana]  error  [12:11:39.539] [error][client][connection] Error: 140017862416192:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
[00:00:21]               │ proc [kibana] 
[00:00:21]               │ERROR browser[SEVERE] http://localhost:6131/api/_newsfeed-FTS-external-service-simulators/kibana/v8.0.0-SNAPSHOT.json - Failed to load resource: net::ERR_EMPTY_RESPONSE
[00:00:21]               │ERROR browser[SEVERE] https://localhost:6131/34553/bundles/plugin/newsfeed/newsfeed.plugin.js 0:19107 TypeError: Failed to fetch
[00:00:21]               │          at Fetch._callee3$ (https://localhost:6131/34553/bundles/core/core.entry.js:34:105174)
[00:00:21]               │          at l (https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:155324)
[00:00:21]               │          at Generator._invoke (https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:155077)
[00:00:21]               │          at Generator.forEach.e.<computed> [as throw] (https://localhost:6131/34553/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:155681)
[00:00:21]               │          at fetch_asyncGeneratorStep (https://localhost:6131/34553/bundles/core/core.entry.js:34:99267)
[00:00:21]               │          at _throw (https://localhost:6131/34553/bundles/core/core.entry.js:34:99675)
[00:00:21]               │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional_embedded/screenshots/failure/Kibana embedded in iframe should open Kibana for logged-in user.png"
[00:00:22]               │ info Current URL is: https://localhost:6131/iframe_embedded
[00:00:22]               │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional_embedded/failure_debug/html/Kibana embedded in iframe should open Kibana for logged-in user.html
[00:00:22]               └- ✖ fail: Kibana embedded in iframe should open Kibana for logged-in user
[00:00:22]               │      Error: expected true to equal false
[00:00:22]               │       at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
[00:00:22]               │       at Assertion.be.Assertion.equal (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:227:8)
[00:00:22]               │       at Assertion.be (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:69:22)
[00:00:22]               │       at Context.it (test/functional_embedded/tests/iframe_embedded.ts:39:33)
[00:00:22]               │ 
[00:00:22]               │ 

Stack Trace

Error: expected true to equal false
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:227:8)
    at Assertion.be (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:69:22)
    at Context.it (test/functional_embedded/tests/iframe_embedded.ts:39:33)

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
lens 133 +9 124

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@flash1293 flash1293 merged commit b4737e8 into elastic:master Jul 13, 2020
flash1293 added a commit to flash1293/kibana that referenced this pull request Jul 13, 2020
flash1293 added a commit that referenced this pull request Jul 13, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 13, 2020
* master: (28 commits)
  skip flaky suite (elastic#71361)
  [Ingest Manager] Add UI to enroll standalone agent (elastic#71288)
  Node options from cfg file for production (elastic#62468)
  [APM] Improvements to the ML Settings page (elastic#71309)
  add old .chromium to gitignore to prevent it from being accidentally committed
  [Ingest Manager] Simplify add/edit package config (integration) form (elastic#71187)
  Ensure Other bucket works on scripted fields. (elastic#71329)
  [APM] Anomaly detection setup link with alert if job doesn't exist (elastic#71229)
  [APM] Anomaly detection integration with transaction duration chart (elastic#71230)
  inclusive language (elastic#71438)
  [Ingest Manager] During fleet setup create an enrollment for every config (elastic#71308)
  Improvements to our developer guide (elastic#67764)
  [SIEM][Detections] Fixes index patterns order (elastic#71270)
  [Metrics + Logs UI] Add test for logs and metrics telemetry (elastic#70858)
  [Maps] Inclusive language (elastic#71427)
  [Logs UI] Unskip log highlight api integration test (elastic#71058)
  [Security_Solution][Resolver] Style adjustments per UX (elastic#71179)
  [Functional test] Increase the timeout to click new vis function (elastic#71226)
  [Discover] Migrate async import of embeddable factory to actual embeddable (elastic#70920)
  fix overflow (elastic#70723)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Datatable does not have a height set when using PDF with print layout
6 participants