Skip to content

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

Merged
tsullivan merged 12 commits intoelastic:feature/reporting/csv-export-panel-actionfrom
tsullivan:feature/reporting/csv-export-panel-action-use-state
Apr 12, 2019
Merged

[Reporting/CSV-Panel-Action] Allow state params sent in POST payload to customize the search#34670
tsullivan merged 12 commits intoelastic:feature/reporting/csv-export-panel-actionfrom
tsullivan:feature/reporting/csv-export-panel-action-use-state

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 { timeFieldName: indexPatternTimeField } = indexPatternSavedObject;
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 zDeprecated Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead review v8.0.0 :New Feature and removed v8.0.0 :New Feature 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

review zDeprecated Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants