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][Agg based table]Navigate to lens for agg based table vis #140791

Merged
merged 264 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
a2d51eb
Removed console.log.
Kuznietsov Aug 19, 2022
78b715d
Other aggs to formula convertion added.
Kuznietsov Aug 19, 2022
0549bdd
Filter ratio added.
Kuznietsov Aug 19, 2022
9d1b9c9
Add XY Configuration
VladLasitsa Aug 19, 2022
7b8786f
Added last_value convertion.
Kuznietsov Aug 19, 2022
8b57f8d
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 19, 2022
6766d81
Updated ColumnWithMeta types.
Kuznietsov Aug 19, 2022
edbeea0
Fixed for loop.
Kuznietsov Aug 19, 2022
5221a01
Added StaticValue convertion.
Kuznietsov Aug 19, 2022
ecdf3e2
Added default agg convertion.
Kuznietsov Aug 19, 2022
faab810
Add filters column
VladLasitsa Aug 19, 2022
08a0539
Refactored filter part.
Kuznietsov Aug 19, 2022
defc3a0
Added meta to all the cols.
Kuznietsov Aug 22, 2022
0da77f1
Fixed problem with columns.
Kuznietsov Aug 22, 2022
fcdcb41
Added date_histogram column, fixed layer configuration
VladLasitsa Aug 22, 2022
bfd1dff
Added terms support.
Kuznietsov Aug 22, 2022
8f4c8d5
Refactored.
Kuznietsov Aug 22, 2022
a21b64e
Refactored for consistancy.
Kuznietsov Aug 22, 2022
6b0f939
Removed `getVisualizationSuggestionFromContext` fn.
Kuznietsov Aug 22, 2022
a36fabc
Added references.
Kuznietsov Aug 23, 2022
a9d19b7
Fixed percentile and percentile ranks.
Kuznietsov Aug 23, 2022
f1b8303
removed unused return statement.
Kuznietsov Aug 23, 2022
00dc472
Refactoring 'getEmptyLayersSuggestionsForVisualizeCharts' method
VladLasitsa Aug 23, 2022
b146838
TimeScaleUnit fix.
Kuznietsov Aug 23, 2022
97187d6
Fixed references.
Kuznietsov Aug 23, 2022
b2817cc
Fixed types.
Kuznietsov Aug 23, 2022
798998b
Fixed terms column
VladLasitsa Aug 23, 2022
b26ca08
Fixed count custom label.
Kuznietsov Aug 23, 2022
28e20f7
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 23, 2022
ac20b5a
Fix multi series
VladLasitsa Aug 23, 2022
235ac24
Merge branch 'navigate-to-lens-context-converting-imporvement' of htt…
VladLasitsa Aug 23, 2022
9bd61fb
Fixed custom labels.
Kuznietsov Aug 23, 2022
7073b79
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 23, 2022
9d45e79
Fixed 'insertReferences' method
VladLasitsa Aug 23, 2022
0556994
Revert "Fixed custom labels."
Kuznietsov Aug 24, 2022
09973a2
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 24, 2022
83060ad
Fixed custom labels.
Kuznietsov Aug 24, 2022
fac12ff
Fixed filter ratio and derivative metrics
VladLasitsa Aug 24, 2022
6070dec
fix last_value and series agg
VladLasitsa Aug 24, 2022
8e045ea
Added CounterRate formula support.
Kuznietsov Aug 24, 2022
f804cab
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 24, 2022
8cbb4ad
Merge remote-tracking branch 'upstream/main' into navigate-to-lens-co…
VladLasitsa Aug 24, 2022
2c0c001
Fix types
VladLasitsa Aug 24, 2022
3e2d943
Replaced usage of timeseries.
Kuznietsov Aug 24, 2022
0bc07fd
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 24, 2022
12669a3
Added window everywhere.
Kuznietsov Aug 24, 2022
9e9593c
Add std_deviation and value_count, fix some issues
VladLasitsa Aug 25, 2022
7fae45e
Fix interval for date_histogram and fix getting filter for metrics an…
VladLasitsa Aug 25, 2022
afe393d
Fix tests for 'getDatasourceSuggestionsForVisualizeCharts' except tes…
VladLasitsa Aug 25, 2022
421c39b
Refactored code.
Kuznietsov Aug 26, 2022
ca82caf
Refactoring 'createNewLayerWithMetricAggregationFromVizEditor'
VladLasitsa Aug 26, 2022
0e847fa
Removed not used code.
Kuznietsov Aug 26, 2022
3f36734
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 26, 2022
8ddaed9
Removed unused import.
Kuznietsov Aug 26, 2022
f49d11a
Fixed types.
Kuznietsov Aug 26, 2022
f472b42
Removed tests with type troubles.
Kuznietsov Aug 26, 2022
3ffa2c6
Some code refactoring + formatter.
Kuznietsov Aug 26, 2022
1380bb8
Removed not used comment.
Kuznietsov Aug 26, 2022
51ef491
Added formatter validation.
Kuznietsov Aug 26, 2022
0105536
Added tests for getFormat.
Kuznietsov Aug 26, 2022
26bf0a4
Fix `getFormat` method
VladLasitsa Aug 26, 2022
8576a9b
createColumn test added.
Kuznietsov Aug 26, 2022
309a861
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 26, 2022
dcbf498
Added tests for `excludeMetaFromColumn` and `isColumnWithMeta`.
Kuznietsov Aug 26, 2022
ab7ed74
Added tests for counter_rate.
Kuznietsov Aug 27, 2022
3233c51
Added tests for cumulative_sum.
Kuznietsov Aug 27, 2022
3bce624
Updated cumulative_sum tests.
Kuznietsov Aug 27, 2022
a7a6e8f
Added date_histogram tests.
Kuznietsov Aug 27, 2022
74ed9d6
Added filter ratio tests.
Kuznietsov Aug 27, 2022
2e1cafa
Filters test added.
Kuznietsov Aug 27, 2022
b653473
createFormulaColumn test added.
Kuznietsov Aug 27, 2022
299033f
convertMathToFormulaColumn test added.
Kuznietsov Aug 27, 2022
6594b8f
Added one more case to check.
Kuznietsov Aug 27, 2022
c9d089c
Added test for convertOtherAggsToFormulaColumn
Kuznietsov Aug 27, 2022
875e6ed
added more tests for formula.
Kuznietsov Aug 29, 2022
133cd0b
Added last_value tests.
Kuznietsov Aug 29, 2022
fcf9711
Added tests for moving average.
Kuznietsov Aug 29, 2022
6947132
Style fix.
Kuznietsov Aug 29, 2022
00e3fb6
Added test for convertMetricAggregationColumnWithoutSpecialParams
Kuznietsov Aug 29, 2022
4d45e3f
Add tests for metrics_helper. Update tests for filter ratio and count…
VladLasitsa Aug 29, 2022
2c9662c
Added tests for convertMetricAggregationToColumn
Kuznietsov Aug 29, 2022
85e25ed
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 29, 2022
7401851
Added tests for computeParentPipelineColumns
Kuznietsov Aug 29, 2022
4608467
Added tests for convertParentPipelineAggToColumns
Kuznietsov Aug 29, 2022
588d983
Add tests for getParentPipelineSeriesFormula
VladLasitsa Aug 29, 2022
dd6cbda
Merge branch 'navigate-to-lens-context-converting-imporvement' of htt…
VladLasitsa Aug 29, 2022
538bb05
Added tests for createParentPipelineAggregationColumn
Kuznietsov Aug 29, 2022
1fdba4a
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 29, 2022
28022a6
Added tests for isPercentileRanksColumnWithMeta
Kuznietsov Aug 29, 2022
615eb74
Added tests for convertToPercentileRankParams
Kuznietsov Aug 29, 2022
7335202
Update and add tests for getSiblingPipelineSeriesFormula
VladLasitsa Aug 29, 2022
70504fd
Fixed tests.
Kuznietsov Aug 29, 2022
e396964
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 29, 2022
fedee6d
Added tests for convertToPercentileRankColumn.
Kuznietsov Aug 29, 2022
1fd32b8
Added tests for convertToPercentileRankColumns.
Kuznietsov Aug 29, 2022
a99a96c
Added tests for percentile.
Kuznietsov Aug 29, 2022
3a850e1
Added tests for static_value.
Kuznietsov Aug 29, 2022
eb9fabf
Add tests for isValidMetrics
VladLasitsa Aug 29, 2022
55e5794
Added std_deviation tests.
Kuznietsov Aug 29, 2022
d8e24a0
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 29, 2022
eb6e245
Added tests for terms.
Kuznietsov Aug 29, 2022
69b2499
Added tests.
Kuznietsov Aug 30, 2022
2a4e0fa
Merge branch 'main' into navigate-to-lens-context-converting-imporvement
Kuznietsov Aug 30, 2022
99f86e2
Add tests for getLayers in xy configuration
VladLasitsa Aug 30, 2022
c65115a
Rename window to reducedTimeRange
VladLasitsa Aug 30, 2022
f47e4cf
Added test for getBucketsColumns
Kuznietsov Aug 30, 2022
5442fed
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 30, 2022
d041782
Fixed tests for parent_pipeline.
Kuznietsov Aug 30, 2022
42ab033
Added tests for getValidColumns
Kuznietsov Aug 30, 2022
b5f55f2
Added tests for getMetricsColumns
VladLasitsa Aug 30, 2022
d63061f
Removed empty new.index.ts of top_n.
Kuznietsov Aug 30, 2022
d57f02a
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 30, 2022
689b52b
Configuration refactored.
Kuznietsov Aug 30, 2022
6c7fbbd
Added tests for getConfigurationForTimeseries and getConfigurationFor…
VladLasitsa Aug 30, 2022
0fe7efc
Added tests for timeseries/index.ts
Kuznietsov Aug 30, 2022
2a24a95
Merge branch 'navigate-to-lens-context-converting-imporvement' of git…
Kuznietsov Aug 30, 2022
da89591
Added test for top_n.
Kuznietsov Aug 30, 2022
2a04190
Refactored getSuggestionFromConvertToLensContext at suggestion_helpers.
Kuznietsov Aug 30, 2022
703f03d
Merge branch 'main' into navigate-to-lens-context-converting-imporvement
kibanamachine Sep 1, 2022
873eac7
Fix format
VladLasitsa Sep 1, 2022
e3b98a2
Fix types
VladLasitsa Sep 1, 2022
144a7a2
Remove unused code
VladLasitsa Sep 1, 2022
c0b43ba
Fix tests
VladLasitsa Sep 1, 2022
7e28d79
Fix bucket columns test
VladLasitsa Sep 1, 2022
6829e85
Init comment. Add column and supported metric, update types for vis s…
VladLasitsa Sep 2, 2022
df426b2
Added percentile.
Kuznietsov Sep 2, 2022
8b58bd1
Added percentile_rank.
Kuznietsov Sep 2, 2022
1ce9ac2
Add metric column without special params
VladLasitsa Sep 2, 2022
53ac257
Added new type for AggParamsMapping.
Kuznietsov Sep 2, 2022
753f7bf
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 5, 2022
3d0a72d
Added cumulative_sum converter.
Kuznietsov Sep 5, 2022
0184d97
Replaced cumulative_sum with common parent_pipeline.
Kuznietsov Sep 5, 2022
e7a6df9
Add sibling pipeline agg and date histogram column converter
VladLasitsa Sep 5, 2022
7eb0c35
Added getColumnsFromVis method.
Kuznietsov Sep 5, 2022
3479653
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 5, 2022
2132497
Fixed formulas nad added support of value_count.
Kuznietsov Sep 5, 2022
4b4ac56
Added navigateToLens functionality to visEditor table.
Kuznietsov Sep 5, 2022
0903a23
Fixed eslint errors.
Kuznietsov Sep 5, 2022
340d9ae
Add convertBucketToColumns and some small updates
VladLasitsa Sep 5, 2022
f29c8cf
Merge branch 'main' into navigate-to-lens-agg-based-vis
Kuznietsov Sep 6, 2022
0bc079c
Fixed problems with converting.
Kuznietsov Sep 6, 2022
46f058d
Fixed Avg.
Kuznietsov Sep 6, 2022
7d92446
Added median.
Kuznietsov Sep 6, 2022
453ea51
Fixed percentile and percentile_ranks.
Kuznietsov Sep 6, 2022
eb04b31
Add terms and filters column, fix problem with changing index pattern…
VladLasitsa Sep 6, 2022
f33e3da
Fixed std_dev.
Kuznietsov Sep 6, 2022
2f7e5e7
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 6, 2022
be59d0f
update convert to lens for datatable
VladLasitsa Sep 6, 2022
796bb79
Fixed dateHistogram labels.
Kuznietsov Sep 7, 2022
7a9b9df
Fix terms converter
VladLasitsa Sep 7, 2022
b4c214b
Merge branch 'main' into navigate-to-lens-context-converting-imporvement
kibanamachine Sep 7, 2022
0318990
Fixed percentile/percentile_ranks/std_deviation.
Kuznietsov Sep 7, 2022
8801dcf
Fixed sum.
Kuznietsov Sep 7, 2022
9993474
Fixed cumulative_sum with value count.
Kuznietsov Sep 7, 2022
ac69c8a
Fix counter rate metric and remove unused comments
VladLasitsa Sep 7, 2022
4f21ff8
Added validation for *_bucket metrics.
Kuznietsov Sep 7, 2022
08d8196
Added timeshift, where it is possible.
Kuznietsov Sep 7, 2022
8a960b3
Fixed type.
Kuznietsov Sep 7, 2022
2bcc834
Add support of percentage column for datatable
VladLasitsa Sep 7, 2022
1f53f2d
Fixed formats.
Kuznietsov Sep 7, 2022
9b82a22
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 7, 2022
e4d5676
Add trigger for agg based visualizations
VladLasitsa Sep 7, 2022
08f3659
Fix formats
VladLasitsa Sep 8, 2022
a3a8de5
Some refactoring
VladLasitsa Sep 8, 2022
454d28a
Added configuration.
Kuznietsov Sep 8, 2022
8af7e6a
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 8, 2022
4e3862e
Fixed suggestions.
Kuznietsov Sep 8, 2022
bdd1ca5
Add dropEmptyRowsInDateHistogram param
VladLasitsa Sep 8, 2022
b38807e
excluded meta.
Kuznietsov Sep 8, 2022
c617f3e
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 8, 2022
f466102
Refactored imports.
Kuznietsov Sep 8, 2022
d93fa34
Fixed label.
Kuznietsov Sep 9, 2022
6cb16fd
Added last_value.
Kuznietsov Sep 9, 2022
96d52d3
Provide collapseFn for bucket columns
VladLasitsa Sep 9, 2022
a08ef9d
Merge remote-tracking branch 'upstream/main' into navigate-to-lens-co…
VladLasitsa Sep 9, 2022
eae71b9
Added percentile/percentile_rank labels fix.
Kuznietsov Sep 9, 2022
99833c7
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 9, 2022
226bef8
Fix sibling aggs converter
VladLasitsa Sep 9, 2022
2bd965c
Refactored convertToSchemaConfig
Kuznietsov Sep 9, 2022
f4c8ac9
Fixed terms
VladLasitsa Sep 9, 2022
cc9e08a
Fixed problem with showing sub metrics on UI
VladLasitsa Sep 9, 2022
f98f3c9
Merge branch 'main' into navigate-to-lens-context-converting-imporvement
flash1293 Sep 12, 2022
8689daf
Moved out convertToSchemaConfig.
Kuznietsov Sep 12, 2022
26e38b4
Fixed types.
Kuznietsov Sep 12, 2022
15daf47
Converted IAggConfig to SchemaConfig.
Kuznietsov Sep 12, 2022
3e39342
Fixed pipeline and terms aggs. Added timeShift arg.
VladLasitsa Sep 12, 2022
1e8ef4b
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 12, 2022
9ca095b
Fixed tests
VladLasitsa Sep 12, 2022
e75d5d0
Added support of nested parent pipeline metrics.
Kuznietsov Sep 12, 2022
dd0165c
Fixed formats.
Kuznietsov Sep 13, 2022
9908612
Merge branch 'main' into navigate-to-lens-context-converting-imporvement
Kuznietsov Sep 13, 2022
c3a443c
Fixed cumulative sum by value count.
Kuznietsov Sep 13, 2022
89f6945
Fixed percentile and percentile ranks.
Kuznietsov Sep 13, 2022
cc3fcd8
Fixed tests.
Kuznietsov Sep 13, 2022
018ea3c
One more fix.
Kuznietsov Sep 13, 2022
3743c4d
Fixed timeShift
VladLasitsa Sep 13, 2022
a23795c
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 13, 2022
d275207
Merge branch 'navigate-to-lens-context-converting-imporvement' into n…
Kuznietsov Sep 13, 2022
040d76d
Fixed std_deviation labels.
Kuznietsov Sep 13, 2022
9bf23da
Fixed percentage column and labels for sibling pipeline aggs
VladLasitsa Sep 13, 2022
1625b30
Fixed getDataSourceInfo method
VladLasitsa Sep 13, 2022
f875c40
Merge branch 'navigate-to-lens-context-converting-imporvement' into n…
Kuznietsov Sep 14, 2022
eedb52f
added track if the rendered table is able to be converted to Lens
VladLasitsa Sep 14, 2022
dcf8339
Added support of nested parent pipeline aggs.
Kuznietsov Sep 14, 2022
8dcc318
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 14, 2022
5f47083
Merge branch 'main' into navigate-to-lens-agg-based-vis
Kuznietsov Sep 15, 2022
12c4bf0
Fixed unit tests
VladLasitsa Sep 15, 2022
00fcff4
Fix column order
VladLasitsa Sep 15, 2022
28d38e6
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 15, 2022
bde1b28
Added shard_delay to SUPPORTED_AGGREGATIONS array and fixed limits
VladLasitsa Sep 16, 2022
1bdca44
Fixed mock for xy/vislib unti tests
VladLasitsa Sep 16, 2022
e05dd54
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 16, 2022
a0e7b25
Merge branch 'main' into navigate-to-lens-agg-based-vis
Kuznietsov Sep 16, 2022
3631fec
Small refactoring of getColumnsFromVis.
Kuznietsov Sep 19, 2022
17dcc3f
Refactored for tests purpose.
Kuznietsov Sep 19, 2022
5661c59
Added tests for utils.
Kuznietsov Sep 19, 2022
b95af9e
Added tests for isValidVis.
Kuznietsov Sep 19, 2022
7583d94
Added tests for getMetricsWithoutDuplicates
Kuznietsov Sep 19, 2022
73c97a8
Added tests for sortColumns.
Kuznietsov Sep 19, 2022
7028701
Added getColumnIds.
Kuznietsov Sep 19, 2022
5078d29
Added unit tests for table configuration
VladLasitsa Sep 19, 2022
09f40b1
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 19, 2022
04138cf
Added tests for schemas.
Kuznietsov Sep 19, 2022
28e3968
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 19, 2022
e233527
Merge branch 'main' into navigate-to-lens-agg-based-vis
kibanamachine Sep 19, 2022
a0515bf
Reduced bundle size.
Kuznietsov Sep 20, 2022
0bf11c3
Merge branch 'main' into navigate-to-lens-agg-based-vis
mbondyra Sep 21, 2022
3494b2a
Fixed annotations.
Kuznietsov Sep 21, 2022
312007b
Removed export.
Kuznietsov Sep 22, 2022
df713e0
Fixed terms column
VladLasitsa Sep 22, 2022
c8eb8d7
Update src/plugins/vis_types/table/public/convert_to_lens/configurati…
Kuznietsov Sep 22, 2022
2485396
Added support of ranges and histograms
VladLasitsa Sep 22, 2022
4f7c86a
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Sep 22, 2022
76f5507
Added supporting of split series + sibling pipeline aggs
VladLasitsa Sep 22, 2022
3414ab7
Fix getBucketCollapseFn method
VladLasitsa Sep 22, 2022
dcd96c0
Fixed problem with invalid fields.
Kuznietsov Sep 22, 2022
44839a1
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 22, 2022
659b855
Update src/plugins/visualizations/common/convert_to_lens/lib/convert/…
Kuznietsov Sep 22, 2022
ad483f7
Fixed problem with removed index pattern.
Kuznietsov Sep 22, 2022
efa97ef
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 22, 2022
4e2cd3c
Fixed types in timeseries supported metrics.
Kuznietsov Sep 22, 2022
5c1a431
Fixed tests.
Kuznietsov Sep 22, 2022
e2777fb
Merge branch 'main' into navigate-to-lens-agg-based-vis
kibanamachine Sep 22, 2022
5d6adee
Fixed tests
VladLasitsa Sep 23, 2022
3d69104
Merge branch 'main' into navigate-to-lens-agg-based-vis
Kuznietsov Sep 23, 2022
d10653b
Provided dataView to all the formula functions.
Kuznietsov Sep 23, 2022
651353a
Merge branch 'navigate-to-lens-agg-based-vis' of https://github.com/V…
Kuznietsov Sep 23, 2022
45a165c
Added checking field type for formula
VladLasitsa Sep 23, 2022
a920eac
Fixed bundle size.
Kuznietsov Sep 23, 2022
e35bdb7
Merge branch 'main' into navigate-to-lens-agg-based-vis
kibanamachine Sep 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pageLoadAssetSize:
kibanaUsageCollection: 16463
kibanaUtils: 79713
kubernetesSecurity: 77234
lens: 36000
lens: 36500
licenseManagement: 41817
licensing: 29004
lists: 22900
Expand Down
1 change: 1 addition & 0 deletions src/plugins/data/common/search/aggs/buckets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ export * from './sampler_fn';
export * from './sampler';
export * from './diversified_sampler_fn';
export * from './diversified_sampler';
export { SHARD_DELAY_AGG_NAME } from './shard_delay';
13 changes: 10 additions & 3 deletions src/plugins/data/common/search/aggs/buckets/multi_terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BucketAggType } from './bucket_agg_type';
import { BUCKET_TYPES } from './bucket_agg_types';
import { createFilterMultiTerms } from './create_filter/multi_terms';
import { aggMultiTermsFnName } from './multi_terms_fn';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

import { MultiFieldKey } from './multi_field_key';
import {
Expand All @@ -26,10 +26,9 @@ const termsTitle = i18n.translate('data.search.aggs.buckets.multiTermsTitle', {
defaultMessage: 'Multi-Terms',
});

export interface AggParamsMultiTerms extends BaseAggParams {
interface CommonAggParamsMultiTerms extends BaseAggParams {
fields: string[];
orderBy: string;
orderAgg?: AggConfigSerialized;
order?: 'asc' | 'desc';
size?: number;
shardSize?: number;
Expand All @@ -38,6 +37,14 @@ export interface AggParamsMultiTerms extends BaseAggParams {
separatorLabel?: string;
}

export interface AggParamsMultiTermsSerialized extends CommonAggParamsMultiTerms {
orderAgg?: AggConfigSerialized;
}

export interface AggParamsMultiTerms extends CommonAggParamsMultiTerms {
orderAgg?: IAggConfig;
}

export const getMultiTermsBucketAgg = () => {
const keyCaches = new WeakMap();
return new BucketAggType({
Expand Down
23 changes: 17 additions & 6 deletions src/plugins/data/common/search/aggs/buckets/terms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
migrateIncludeExcludeFormat,
} from './migrate_include_exclude_format';
import { aggTermsFnName } from './terms_fn';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

import { KBN_FIELD_TYPES } from '../../..';

Expand All @@ -33,24 +33,35 @@ const termsTitle = i18n.translate('data.search.aggs.buckets.termsTitle', {
defaultMessage: 'Terms',
});

export interface AggParamsTerms extends BaseAggParams {
export interface CommonAggParamsTerms extends BaseAggParams {
field: string;
orderBy: string;
orderAgg?: AggConfigSerialized;
order?: 'asc' | 'desc';
size?: number;
shardSize?: number;
missingBucket?: boolean;
missingBucketLabel?: string;
otherBucket?: boolean;
otherBucketLabel?: string;
// advanced
exclude?: string[] | number[];
include?: string[] | number[];
exclude?: string[] | string | number[];
include?: string[] | string | number[];
includeIsRegex?: boolean;
excludeIsRegex?: boolean;
}

export interface AggParamsTermsSerialized extends CommonAggParamsTerms {
orderAgg?: AggConfigSerialized;
order?: 'asc' | 'desc';
}

export interface AggParamsTerms extends CommonAggParamsTerms {
orderAgg?: IAggConfig;
order?: {
value: 'asc' | 'desc';
text: string;
};
}

export const getTermsBucketAgg = () =>
new BucketAggType({
name: BUCKET_TYPES.TERMS,
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/data/common/search/aggs/metrics/bucket_avg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ import { MetricAggType } from './metric_agg_type';
import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsBucketAvg extends BaseAggParams {
export interface AggParamsBucketAvgSerialized extends BaseAggParams {
customMetric?: AggConfigSerialized;
customBucket?: AggConfigSerialized;
}

export interface AggParamsBucketAvg extends BaseAggParams {
customMetric?: IAggConfig;
customBucket?: IAggConfig;
}

const overallAverageLabel = i18n.translate('data.search.aggs.metrics.overallAverageLabel', {
defaultMessage: 'overall average',
});
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/data/common/search/aggs/metrics/bucket_max.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ import { MetricAggType } from './metric_agg_type';
import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsBucketMax extends BaseAggParams {
export interface AggParamsBucketMaxSerialized extends BaseAggParams {
customMetric?: AggConfigSerialized;
customBucket?: AggConfigSerialized;
}

export interface AggParamsBucketMax extends BaseAggParams {
customMetric?: IAggConfig;
customBucket?: IAggConfig;
}

const overallMaxLabel = i18n.translate('data.search.aggs.metrics.overallMaxLabel', {
defaultMessage: 'overall max',
});
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/data/common/search/aggs/metrics/bucket_min.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ import { MetricAggType } from './metric_agg_type';
import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsBucketMin extends BaseAggParams {
export interface AggParamsBucketMinSerialized extends BaseAggParams {
customMetric?: AggConfigSerialized;
customBucket?: AggConfigSerialized;
}

export interface AggParamsBucketMin extends BaseAggParams {
customMetric?: IAggConfig;
customBucket?: IAggConfig;
}

const overallMinLabel = i18n.translate('data.search.aggs.metrics.overallMinLabel', {
defaultMessage: 'overall min',
});
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/data/common/search/aggs/metrics/bucket_sum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ import { MetricAggType } from './metric_agg_type';
import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsBucketSum extends BaseAggParams {
export interface AggParamsBucketSumSerialized extends BaseAggParams {
customMetric?: AggConfigSerialized;
customBucket?: AggConfigSerialized;
}

export interface AggParamsBucketSum extends BaseAggParams {
customMetric?: IAggConfig;
customBucket?: IAggConfig;
}

const overallSumLabel = i18n.translate('data.search.aggs.metrics.overallSumLabel', {
defaultMessage: 'overall sum',
});
Expand Down
13 changes: 10 additions & 3 deletions src/plugins/data/common/search/aggs/metrics/cumulative_sum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ import { MetricAggType } from './metric_agg_type';
import { parentPipelineAggHelper } from './lib/parent_pipeline_agg_helper';
import { makeNestedLabel } from './lib/make_nested_label';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsCumulativeSum extends BaseAggParams {
export interface CommonAggParamsCumulativeSum extends BaseAggParams {
buckets_path?: string;
customMetric?: AggConfigSerialized;
metricAgg?: string;
}

export interface AggParamsCumulativeSumSerialized extends CommonAggParamsCumulativeSum {
customMetric?: AggConfigSerialized;
}

export interface AggParamsCumulativeSum extends CommonAggParamsCumulativeSum {
customMetric?: IAggConfig;
}

const cumulativeSumLabel = i18n.translate('data.search.aggs.metrics.cumulativeSumLabel', {
defaultMessage: 'cumulative sum',
});
Expand Down
13 changes: 10 additions & 3 deletions src/plugins/data/common/search/aggs/metrics/derivative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ import { MetricAggType } from './metric_agg_type';
import { parentPipelineAggHelper } from './lib/parent_pipeline_agg_helper';
import { makeNestedLabel } from './lib/make_nested_label';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsDerivative extends BaseAggParams {
export interface CommonAggParamsDerivative extends BaseAggParams {
buckets_path?: string;
customMetric?: AggConfigSerialized;
metricAgg?: string;
}

export interface AggParamsDerivativeSerialized extends CommonAggParamsDerivative {
customMetric?: AggConfigSerialized;
}

export interface AggParamsDerivative extends CommonAggParamsDerivative {
customMetric?: IAggConfig;
}

const derivativeLabel = i18n.translate('data.search.aggs.metrics.derivativeLabel', {
defaultMessage: 'derivative',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ import { MetricAggType } from './metric_agg_type';
import { makeNestedLabel } from './lib/make_nested_label';
import { siblingPipelineAggHelper } from './lib/sibling_pipeline_agg_helper';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';
import { aggFilteredMetricFnName } from './filtered_metric_fn';

export interface AggParamsFilteredMetric extends BaseAggParams {
export interface AggParamsFilteredMetricSerialized extends BaseAggParams {
customMetric?: AggConfigSerialized;
customBucket?: AggConfigSerialized;
}

export interface AggParamsFilteredMetric extends BaseAggParams {
customMetric?: IAggConfig;
customBucket?: IAggConfig;
}

const filteredMetricLabel = i18n.translate('data.search.aggs.metrics.filteredMetricLabel', {
defaultMessage: 'filtered',
});
Expand Down
13 changes: 10 additions & 3 deletions src/plugins/data/common/search/aggs/metrics/moving_avg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,23 @@ import { aggMovingAvgFnName } from './moving_avg_fn';
import { parentPipelineAggHelper } from './lib/parent_pipeline_agg_helper';
import { makeNestedLabel } from './lib/make_nested_label';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsMovingAvg extends BaseAggParams {
export interface CommonAggParamsMovingAvg extends BaseAggParams {
buckets_path?: string;
window?: number;
script?: string;
customMetric?: AggConfigSerialized;
metricAgg?: string;
}

export interface AggParamsMovingAvgSerialized extends CommonAggParamsMovingAvg {
customMetric?: AggConfigSerialized;
}

export interface AggParamsMovingAvg extends CommonAggParamsMovingAvg {
customMetric?: IAggConfig;
}

const movingAvgTitle = i18n.translate('data.search.aggs.metrics.movingAvgTitle', {
defaultMessage: 'Moving Avg',
});
Expand Down
13 changes: 10 additions & 3 deletions src/plugins/data/common/search/aggs/metrics/serial_diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@ import { aggSerialDiffFnName } from './serial_diff_fn';
import { parentPipelineAggHelper } from './lib/parent_pipeline_agg_helper';
import { makeNestedLabel } from './lib/make_nested_label';
import { METRIC_TYPES } from './metric_agg_types';
import { AggConfigSerialized, BaseAggParams } from '../types';
import { AggConfigSerialized, BaseAggParams, IAggConfig } from '../types';

export interface AggParamsSerialDiff extends BaseAggParams {
export interface CommonAggParamsSerialDiff extends BaseAggParams {
buckets_path?: string;
customMetric?: AggConfigSerialized;
metricAgg?: string;
}

export interface AggParamsSerialDiffSerialized extends CommonAggParamsSerialDiff {
customMetric?: AggConfigSerialized;
}

export interface AggParamsSerialDiff extends CommonAggParamsSerialDiff {
customMetric?: IAggConfig;
}

const serialDiffTitle = i18n.translate('data.search.aggs.metrics.serialDiffTitle', {
defaultMessage: 'Serial Diff',
});
Expand Down
16 changes: 14 additions & 2 deletions src/plugins/data/common/search/aggs/metrics/top_hit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,30 @@

import _ from 'lodash';
import { i18n } from '@kbn/i18n';
import { DataViewField } from '@kbn/data-views-plugin/common';
import { aggTopHitFnName } from './top_hit_fn';
import { IMetricAggConfig, MetricAggType } from './metric_agg_type';
import { METRIC_TYPES } from './metric_agg_types';
import { flattenHit, KBN_FIELD_TYPES } from '../../..';
import { BaseAggParams } from '../types';

export interface AggParamsTopHit extends BaseAggParams {
export interface BaseAggParamsTopHit extends BaseAggParams {
field: string;
aggregate: 'min' | 'max' | 'sum' | 'average' | 'concat';
sortField?: string;
size?: number;
}

export interface AggParamsTopHitSerialized extends BaseAggParamsTopHit {
sortOrder?: 'desc' | 'asc';
sortField?: string;
}

export interface AggParamsTopHit extends BaseAggParamsTopHit {
sortOrder?: {
value: 'desc' | 'asc';
text: string;
};
sortField?: DataViewField;
}

const isNumericFieldSelected = (agg: IMetricAggConfig) => {
Expand Down
19 changes: 15 additions & 4 deletions src/plugins/data/common/search/aggs/metrics/top_metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,27 @@ import { i18n } from '@kbn/i18n';
import { aggTopMetricsFnName } from './top_metrics_fn';
import { IMetricAggConfig, MetricAggType } from './metric_agg_type';
import { METRIC_TYPES } from './metric_agg_types';
import { KBN_FIELD_TYPES } from '../../..';
import { DataViewField, KBN_FIELD_TYPES } from '../../..';
import { BaseAggParams } from '../types';

export interface AggParamsTopMetrics extends BaseAggParams {
export interface BaseAggParamsTopMetrics extends BaseAggParams {
field: string;
sortField?: string;
sortOrder?: 'desc' | 'asc';
size?: number;
}

export interface AggParamsTopMetricsSerialized extends BaseAggParamsTopMetrics {
sortOrder?: 'desc' | 'asc';
sortField?: string;
}

export interface AggParamsTopMetrics extends BaseAggParamsTopMetrics {
sortOrder?: {
value: 'desc' | 'asc';
text: string;
};
sortField?: DataViewField;
}

export const getTopMetricsMetricAgg = () => {
return new MetricAggType({
name: METRIC_TYPES.TOP_METRICS,
Expand Down
Loading