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

[Reporting/CSV-Panel-Action] Allow state params sent in POST payload to customize the search #34670

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Apr 5, 2019

Summary

The UI control passes a state parameter in the POST payload, intended to layer on customizations to the search:

  • sort field and sort order
  • filter bar filters
  • query bar filters

image

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan tsullivan force-pushed the feature/reporting/csv-export-panel-action-use-state branch from 80b5ffb to 97a41ea Compare April 10, 2019 20:37
@tsullivan tsullivan force-pushed the feature/reporting/csv-export-panel-action-use-state branch from 97a41ea to 5b21113 Compare April 10, 2019 20:46
@tsullivan tsullivan changed the base branch from master to feature/reporting/csv-export-panel-action April 10, 2019 21:39
@tsullivan tsullivan requested a review from joelgriffith April 10, 2019 21:40
@tsullivan tsullivan marked this pull request as ready for review April 10, 2019 21:40
const docValueFields = indexPatternTimeField ? [indexPatternTimeField] : undefined;
const buildCsvParams: [IndexPatternSavedObject, SearchSourceQuery, Filter[], ESQueryConfig] = [
Copy link
Member Author

Choose a reason for hiding this comment

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

Decided to do this since buildEsQuery takes complicated structures for params, but isn't in Typescript

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@tsullivan tsullivan added (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead review v8.0.0 Feature:New Feature New feature not correlating to an existing feature label and removed v8.0.0 Feature:New Feature New feature not correlating to an existing feature label labels Apr 10, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

* These filter types are stub types to help ensure things get passed to
* non-Typescript functions in the right order. An actual structure is not
* needed because the code doesn't look into the properties; just combines them
* and passes them through to other non-TS modules.
Copy link
Member Author

Choose a reason for hiding this comment

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

A better way to do this might be to define a module for the function I'm using that doesn't have a module definition. I don't know how to do that in TS for Kibana though :\

range: {
[indexPatternTimeField]: {
format: 'epoch_millis',
gte: moment(timerange.min).valueOf(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we suspect of getting that negative value here? Not sure if ES gracefully handles this at this level

…/reporting/csv-export-panel-action-use-state
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@tsullivan tsullivan merged commit 78a1162 into elastic:feature/reporting/csv-export-panel-action Apr 12, 2019
@tsullivan tsullivan deleted the feature/reporting/csv-export-panel-action-use-state branch April 12, 2019 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants