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

[Data Table] Use shared CSV export mechanism #89702

Merged

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Jan 29, 2021

Summary

Resolves #84759

This PR replaces custom CSV export function with a common mechanism : datatableToCSV from data plugin and downloadFileAs from shared plugin.

To switch the usage on the common mechanism, the table visData shape was changed.
useFormattedColumnsAndRows effect where removed from TableVisBasic and the logic was moved into createFormattedTable function - this creates the necessary shape both for data rendering and creating a CSV.
Other changes are mostly caused by data shape changes.

Unit test cases will be added in a follow up PR #89719

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeTable 85 84 -1

Async chunks

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

id before after diff
visTypeTable 125.9KB 120.8KB -5.1KB

History

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

@sulemanof sulemanof marked this pull request as ready for review February 1, 2021 11:33
@sulemanof sulemanof requested a review from a team February 1, 2021 11:33
Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

I have tested a lot locally, it seems to work fine :) Code LGTM. Looking forward for the unit tests 🎉

@sulemanof sulemanof added release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v8.0.0 Feature:Data Table Data table visualization feature Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 1, 2021
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

👍 Tested on Chrome and Safari

Copy link
Contributor

@VladLasitsa VladLasitsa left a comment

Choose a reason for hiding this comment

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

LGTM

@sulemanof sulemanof merged commit e73b377 into elastic:master Feb 2, 2021
@sulemanof sulemanof deleted the feat/data_table_shared_csv_export branch February 2, 2021 09:55
sulemanof pushed a commit to sulemanof/kibana that referenced this pull request Feb 2, 2021
* Move formatting columns into response handler

* Use shared csv export

* Cleanup files

* Fix type

* Fix translation

* Filter out non-dimension values
sulemanof pushed a commit that referenced this pull request Feb 2, 2021
* Move formatting columns into response handler

* Use shared csv export

* Cleanup files

* Fix type

* Fix translation

* Filter out non-dimension values
phillipb added a commit to phillipb/kibana that referenced this pull request Feb 2, 2021
…-ml-jobs

* 'master' of github.com:elastic/kibana: (254 commits)
  [Security Solution] [Detections] Remove allow_no_indices to prevent error being thrown in response of field capabilities (elastic#89927)
  Skip test for cloud (elastic#89450)
  [Fleet] Fix duplicate data streams being shown in UI (elastic#89812)
  Bump package dependencies (elastic#90034)
  [App Search] DRY helper for encoding/decoding routes that can have special characters in params (elastic#89811)
  TypeScript project references for Observability plugin (elastic#89320)
  [SearchSource] Combine sort and parent fields when serializing (elastic#89808)
  Made imports static (elastic#89935)
  [ml] migrate file_data_visualizer/import route to file_upload plugin (elastic#89640)
  [Discover] Adapt default column behavior (elastic#89826)
  Round start and end values (elastic#89030)
  Rename getProxyAgents to getCustomAgents (elastic#89813)
  [Form lib] UseField `onError` listener (elastic#89895)
  [APM] use latency sum instead of avg for impact (elastic#89990)
  migrate more core-owned plugins to tsproject ref (elastic#89975)
  [Logs UI] Load <LogStream> entries via async searches (elastic#86899)
  [APM] Abort browser requests when appropriate (elastic#89557)
  [Alerting] Allow user to select existing connector of same type when fixing broken connector (elastic#89062)
  [Data Table] Use shared CSV export mechanism (elastic#89702)
  chore(NA): improve logic check when installing Bazel tools (elastic#89634)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Table Data table visualization feature release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data table] use shared CSV export mechanism
7 participants