Skip to content

Lens ad hoc data view#135991

Closed
flash1293 wants to merge 14 commits intoelastic:mainfrom
flash1293:lens-ad-hoc-data-view
Closed

Lens ad hoc data view#135991
flash1293 wants to merge 14 commits intoelastic:mainfrom
flash1293:lens-ad-hoc-data-view

Conversation

@flash1293
Copy link
Copy Markdown
Contributor

@flash1293 flash1293 commented Jul 8, 2022

Building on top of #135770 to add ad-hoc data views to Lens

Problems:

  • Field existence check doesn't work because it happens on the server - can either be solved by handling it on the client or by sending the spec to the server
  • Adhoc data view not shown in unified search picker

Explanation:

  • For ad hoc data views, put the spec into the datasource state along with the field list in the loader
  • On saving, put those specs into the datasource state instead of extracting references. When loading, create all the specs from the saved object
  • When a new data view is selected from the unified search menu, check whether it's adhoc - if yes, pass the data view down instead of just the id (lots of places now handle either id or spec)
  • For filters, on extracting make sure to not extract internal references to ad-hoc data views. For injecting, ignore if a reference can't be resolved, it's probably an ad-hoc one
  • To make dashboard aware of the ad hoc data views, pass it from the datasource to the embeddable (it was so far using the references array to collect the data views to pass to the container) - this part is a bit hacky as it's only taking into account one data view per datasource (but there can be multiple in theory). Once there is a central Lens "data view state", it should work better.
  • In the visualize ui action, pass the spec instead of the id
  • To the discover locator in show underlying data, pass the spec instead of the id (@kertal already took care of wiring it up)
  • Slightly unrelated change: The "Debug in Playground" link would implement the extraction logic itself - this PR passes the currentDoc which is the saved object shape of the state to the menu entry generator which simplifies the logic and also makes it pick up the new ad-hoc logic

@kibana-ci
Copy link
Copy Markdown

kibana-ci commented Jul 8, 2022

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState add sorting by timefield when switching from an index pattern without timefield to an indexpattern with timefield
  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState keep sorting by timefield when switching between index patterns with different timeFields
  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState remove sorting by timefield when switching to an index pattern without timefield that contains the timefield column
  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState removing fields that are not part of the next index pattern, keeping unknown fields
  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState removing sorted by fields not available in the next index pattern without modifying columns
  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState removing sorted by fields that are not part of the next index pattern
  • [job] [logs] Jest Tests #7 / Discover getSwitchIndexPatternAppState should change sorting for similar index patterns
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System should display a badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System should display a badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System should display a popover when clicking the badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System should display a popover when clicking the badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System should display the integrations on the definition section
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System should display the integrations on the definition section
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System the alerts generated should have a "kibana.alert.rule.parameters.related_integrations" field containing the integrations
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations installed integrations: Amazon CloudFront, AWS CloudTrail, System, enabled integrations: Amazon CloudFront, Aws Cloudfront, System the alerts generated should have a "kibana.alert.rule.parameters.related_integrations" field containing the integrations
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations integrations not installed should display a badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations integrations not installed should display a badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations integrations not installed should display a popover when clicking the badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations integrations not installed should display a popover when clicking the badge with the installed integrations on the rule management page
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations integrations not installed should display the integrations on the definition section
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations integrations not installed should display the integrations on the definition section
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations related Integrations Advanced Setting is disabled should display the integrations on the definition section
  • [job] [logs] Rules, Alerts and Exceptions ResponseOps Cypress Tests on Security Solution / Related integrations related Integrations Advanced Setting is disabled should display the integrations on the definition section

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
dataViewEditor 30.7KB 31.6KB +941.0B
discover 493.2KB 493.7KB +517.0B
lens 1.2MB 1.2MB +55.0B
total +1.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViewEditor 10.2KB 10.2KB +87.0B
Unknown metric groups

API count

id before after diff
dataViewEditor 14 15 +1

ESLint disabled in files

id before after diff
apm 14 13 -1
observability 7 6 -1
securitySolution 75 74 -1
total -3

ESLint disabled line counts

id before after diff
apm 87 84 -3
enterpriseSearch 9 7 -2
observability 49 48 -1
synthetics 63 57 -6
ux 11 10 -1
total -13

Total ESLint disabled count

id before after diff
apm 101 97 -4
enterpriseSearch 9 7 -2
observability 56 54 -2
securitySolution 517 516 -1
synthetics 69 63 -6
ux 14 13 -1
total -16

History

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

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants