Commit graph

297 commits

Author SHA1 Message Date
Joe Reuter 67e48527e7
[Lens] Add toolbar api (#69263) 2020-06-26 09:38:35 +02:00
Devon Thomson 98a897736b
Remove App communication from URL (#67064)
Removed all inter-app communication via url in favour of a new service in the embeddable start contract called the state transfer service.
2020-06-23 12:21:48 -04:00
Marco Vettorello f9f1158e1f
Update dependency @elastic/charts to v19.5.2 (#69126)
Update @elastic/charts to 19.5.2

Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
2020-06-17 16:02:34 +02:00
Marta Bondyra cb2c90ca4b
[lens] perf: memoize onEvent handler to avoid unnecessary re-render (#68637)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-12 16:59:27 +02:00
Caroline Horn 1277934588
[Lens] Fix aggregation selection indicator (#68973)
* Some sass modularization and using EuiListGroup instead of EuiSideNav
* Fixes #68530
2020-06-12 10:04:54 -04:00
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Joe Reuter 8d1a319472
keep custom labels (#68498) 2020-06-10 18:29:22 +02:00
Joe Reuter 497ecf8164
[Lens] Add description property and check duplicate title on save (#68219) 2020-06-10 18:28:00 +02:00
Joe Reuter a462e2c7b0
[Lens] Keep global filters, time range and refresh interval on refresh (#68075) 2020-06-10 15:44:59 +02:00
Uladzislau Lasitsa b87eefc753
[uiSettings]: Migrate items owned by app arch to new platform (#66040)
* Migrated uiSettings items to new platform

* API changes

* Fixed translations

* Fixed comment and i18n

* Fixed tests

* Fixed internalization

* Fix karma tests

* made code more explicit

* Fixed plugin

* Added consts for ui settings ids.

* Added id for another settings

* Fixed tests.

* Improved imports

* Fix imports to public which were happening from the server.

* Fixed paths

* Moved styles to plugin.ts

* Moved styles

* Fixed docs

* Fix ci

* Fix ci

* fix documentation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
2020-06-05 10:55:42 +03:00
Devon Thomson 97a72b33c5
[Chore] Simplify Embeddable Panel usage (#68006)
Replaced usages of the EmbeddablePanel component with a shortcut panel API
2020-06-04 16:55:11 -04:00
Joe Reuter 4a1b05c843
Lens editor auto refresh (#65868) 2020-06-03 11:35:55 +02:00
Wylie Conlon b061d85f9a
[Lens] Warn if leaving with unsaved visualization (#67689)
* [Lens] Warn if leaving with unsaved visualization

* Made confirmation logic more robust and add title

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 15:05:27 -04:00
Wylie Conlon be51ca6041
[Lens] Allow visualizations to provide a dimension editor (#67560)
* [Lens] Allow visualizations to provide a dimension editor

* Update to tab style

* Remove table update

* Update class name

* typecheck fix

* Add test

* Require each dimension group to enable editor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
2020-06-01 13:33:23 -04:00
Marta Bondyra 84ed5096f3
[Lens] Fix empty values filtering (#67594) 2020-05-29 09:38:07 +02:00
Marta Bondyra 9c28661449
perf: drag and drop performance improvement for field list (#67455) 2020-05-29 09:34:55 +02:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Joe Reuter 20ba3c0fde
fix filter filtering out falsy values (#66904) 2020-05-19 14:44:59 +02:00
Marta Bondyra d9d8777613
[Lens] Fix datatable empty state (#66744) 2020-05-19 11:14:26 +02:00
Joe Reuter 52070091f4
Lens drilldowns (#65675) 2020-05-15 12:01:27 +02:00
Devon Thomson 28623ad33a
[Lens] fix redirect after reload (#66328)
Changed the way the lens app tracks originatingApp. It is now removed from the url when the app starts and is tracked as part of the state
2020-05-14 12:29:03 -04:00
Marta Bondyra 0d571ae129
[Lens] fix empty state for pie (#66206) 2020-05-13 14:49:50 +02:00
Joe Reuter b7e87c2c8b
Switch to core application service (#63443) 2020-05-13 09:19:24 +02:00
Marta Bondyra 25a3fcea52
[Lens] refactor to not filter layers three times (#66174) 2020-05-12 17:46:35 +02:00
Marta Bondyra eb97e919f3
[Lens] Fix console.error react memory leak when saving new viz (#65490) 2020-05-07 17:21:49 +02:00
Wylie Conlon 459daa7f23
[Lens] Use rules of hooks with linting (#65593) 2020-05-07 10:01:51 -04:00
Wylie Conlon 90de711c27
[Lens] Remove "inside only" option for treemap labels (#65363)
* [Lens] Remove "inside only" option for treemap labels

* Fix type error

* Update from feedback
2020-05-06 16:45:32 -04:00
Devon Thomson 5bad855e4b
Return to dashboard after editing embeddable (#62865)
Changed the process for saving visualizations and lens visualizations when the user has been redirected there from another application.
2020-05-05 16:58:36 -04:00
Wylie Conlon e5d7bb6e9a
[Lens] Pie and treemap charts (#55477)
* [Lens] Add pie and treemap visualizations

* Fix types

* Update to new platform

* Support 2-layer treemap and legends, dark mode

* Significant restructuring of code

* Upgrade to latest charts library

* Commit yarn.lock

* chore: update elastic-charts

* fix types after merge master

* Add settings panel and merge visualizations

* Fix tests

* build: upgrade @elastic/charts to 19.0.0

* refactor: onBrushEnd breaking changes

* fix: missing onBrushEnd argument changes

* More updates

* Fix XY rendering issue when all dates are empty

* Fix bugs and tests

* Use shared services location

* Fix bug in XY chart

* fix: update ech to 19.1.1

* fix: lens onBrushEnd breaking changes

* Change how pie/treemap settings work

* [Design] Fix up settings panel

* [Design] Update partition chart config styles

* fix eslint

* Fix legend issues in pie and XY, add some tests

* update to 19.1.2

* Fix text color for treemap

* Fix chart switch bug

* Fix suggestions

Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-05-05 15:59:32 -04:00
Marco Vettorello 2d4dc801c3
Update dependency @elastic/charts to v19.1.2 (#64759)
* build: upgrade @elastic/charts to 19.0.0

* refactor: onBrushEnd breaking changes

* fix: missing onBrushEnd argument changes

* fix: update ech to 19.1.1

* fix: lens onBrushEnd breaking changes

* update to 19.1.2
2020-05-04 18:42:58 -05:00
Mikhail Shustov c8ddb6b8ed
load lens app lazily (#64769) 2020-05-01 12:57:29 +02:00
Marta Bondyra c4e6789c28
[Lens] Trigger a filter action on click in datatable visualization (#63840)
* wip: datatable

* fix: empty values

* fix: empty values

* translations

* using dataPlugin to get buckets

* one more time, passing aggs data

* tests: added

* feat: new design applied

* remove icon

* feat: old design

* CR corrections

* better name

* Fix merge issue

* fix: design changes

* feat: correction

* fix: copy changes

* Update x-pack/plugins/lens/public/datatable_visualization/_visualization.scss

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update _visualization.scss

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2020-04-30 17:44:16 -04:00
Marta Bondyra 5887c97d75
[Lens] Allow user to drag and select a subset of the timeline in the chart (aka brush interaction) (#62636)
* feat: brushing basic example for time histogram

* test: added

* refactor: simplify the structure

* refactor: move to inline function

* refactor

* refactor

* Always use time field from index pattern

* types

* use the meta.aggConfigParams for timefieldName

* fix: test snapshot update

* Update embeddable.tsx

removing commented code

* fix: moment remov

* fix: corrections for adapting to timepicker on every timefield

* fix: fix single bar condition

* types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
2020-04-30 20:36:50 +02:00
Wylie Conlon 988b93edca
[Lens] Hide some suggestions in preparation for pie charts (#64740)
* [Lens] Hide some suggestions in preparation for pie charts

* Suggest reordering the X and Break down by axis

* More tweaks
2020-04-30 10:52:10 -04:00
Wylie Conlon 4e58d7ae0a
[Lens] Use a size of 5 for first string field in visualization (#64726) 2020-04-29 22:03:41 -04:00
Tim Roes 9b65cbd92b
[Lens] Bind all time fields to the time picker (#63874)
* Bind non primary time fields to timepicker

* Fix typescript argument types

* Allow auto interval on all fields

* Remove lens_auto_date function

* Fix existing jest tests and add test todos

* Remove lens_auto_date from esarchives

* Add TimeBuckets jest tests

* Fix typo in esarchiver

* Address review feedback

* Make code a bit better readable

* Fix default time field retrieval

* Fix TS errors

* Add esaggs interpreter tests

* Change public API doc of data plugin

* Add toExpression tests for index pattern datasource

* Add migration stub

* Add full migration

* Fix naming inconsistency in esaggs

* Fix naming issue

* Revert archives to un-migrated version

* Ignore expressions that are already migrated

* test: remove extra spaces and  timeField=\\"products.created_on\\"} to timeField=\"products.created_on\"}

* Rename all timeField -> timeFields

* Combine duplicate functions

* Fix boolean error and add test for it

* Commit API changes

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
2020-04-29 20:10:14 -04:00
Wylie Conlon a907c9bda5
[Lens] Use suggestion system in chart switcher for subtypes (#64613)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 19:14:47 -04:00
Marta Bondyra da4c33b022
[Lens] Don't use auto interval to get interval for single bar (#64502)
* feat: don't use auto interval to get interval for single bar

* fix: fixing non auto intervals

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 14:47:45 +02:00
Nick Partridge bc6291349c
Update elastic charts v18.4.1 (#64257) 2020-04-23 11:59:19 -05:00
Wylie Conlon dd094f2333
[Lens] Split apart config panel component to more manageable chunks (#63910)
* [Lens] Split apart config panel component to more manageable chunks

* Moving around and renaming SASS appropriately

* Remove layer limit

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-04-22 17:36:36 -04:00
Chandler Prall 126d187429
Upgrade to EUI v22.3.0 (#62963)
* snapshot updates

* bump to eui 22.3.0

* snapshots

* Fix css selector in test to match EUI internal DOM change

* Updated snapshots

* Insert react-beautiful-dnd@10 into top-level kibana to force siem's node_modules to hold its correct version

* More snapshot updates, resolved a typescript issue

* Move react-beautiful-dnd dependency around to make things happy again

* Use SearchFilterConfig from the top-level eui export

* Swallow 'ResizeObserver error does not have an err object' error in canvas

* Swallow ResizeObserver error cross-browser
2020-04-22 11:01:49 -06:00
Peter Pisljar 222fdc5029
refactor action filter creation utils (#62969) 2020-04-22 10:41:58 +02:00
Wylie Conlon 561c0f9fed
[Lens] Allow table to scroll horizontally (#63805)
* [Lens] Allow table to scroll horizontally

* Fixing scrolling pt. 2

Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-04-17 17:03:33 -04:00
Wylie Conlon 13422b8c91
[Lens] Make average the default suggested metric (#63416)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 10:34:24 -04:00
Wylie Conlon c21cec7abd
[Lens] Fix escaping of field names (#63509)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 10:32:58 -04:00
Wylie Conlon ac549ac6f5
[Lens] Only show copy on save for previously saved docs (#63535)
* [Lens] Only show copy on save for previously saved docs

* Update app.test.tsx

import after kibana platform changes

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
2020-04-15 14:57:44 -04:00
Tim Roes ebbc062689
Move Lens frontend to Kibana Platform (#62965)
* Move Lens frontend to Kibana platform

* Fix line breaks

* Fix jest tests

* Fix remaining test

* Remove old Lens plugin entry

* Fix i18n prefix

* Add config schema

* Address review
2020-04-15 12:22:37 +02:00