Commit graph

1058 commits

Author SHA1 Message Date
Kerry Gallagher 1786364104
[LogsUI] Ensure 'unknown' setupStatus is handled (#45887)
* Ensure 'unknown' setupStatus is handled
2019-09-19 08:44:57 +01:00
WangQianliang 87e5b4556e
fix(code/frontend): folding icon position when line hilighted (#45865) 2019-09-19 14:56:37 +08:00
Stacey Gammon 01daabcb53
Move actions to NP (#44707)
* move actions to np

* fix jest and types
2019-09-18 21:50:34 -04:00
Nathan Reese 1ef6373f77
[Maps] use EuiPopover instead of mapbox tooltip (#45938)
* [Maps] use EuiPopover instead of mapbox tooltip

* update draw tooltip to use EuiPopover, remove mapbox popup css hacks

* use anchor size of 26px to fix positioning calculations

* close tooltip when position is no longer visible

* remove reevaluateTooltipPosition, its no longer needed

* fix problem with map move and hover tooltip location not also moving
2019-09-18 18:22:17 -06:00
Joe Reuter 921e356a4b [Lens] Transient suggestions (#44234)
* [lens] Initial Commit (#35627)

* [visualization editor] Initial Commit

* [lens] Add more complete initial state

* [lens] Fix type issues

* [lens] Remove feature control

* [lens] Bring back feature control and add tests

* [lens] Update plugin structure and naming per comments

* replace any usage by safe casting

* [lens] Respond to review comments

* [lens] Remove unused EditorFrameState type

* [lens] Initial state for IndexPatternDatasource (#36052)

* [lens] Add first tests to indexpattern data source

* Respond to review comments

* Fix type definitions

* [lens] Editor frame initializes datasources and visualizations (#36060)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* Fix state management issue

* [lens][draft] Lens/drag drop (#36268)

Add basic drag / drop component to Lens

* remove local package (#36456)

* [lens] Native renderer (#36165)

* Add nativerenderer component

* Use native renderer in app and editor frame

* [Lens] No explicit any (#36515)

* [Lens] Implement basic editor frame state handling (#36443)

* [lens] Load index patterns and render in data panel (#36463)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* remove local package

* [lens] Load index patterns into data source

* Redo types for Index Pattern Datasource

* Fix one more type

* Respond to review comments

* [draft] Lens/line chart renderer (#36827)

Expression logic for the Lens xy chart.

* [lens] Index pattern data panel (initial) (#37015)

* [lens] Index pattern switcher

* Respond to review comments

* [Lens] Editor state 2 (#36513)

* [lens] Dimension panel that generates columns (#37117)

* [lens] Dimension panel that generates columns

* Update from review comments

* [lens] Generate esdocs queries from index pattern (#37361)

* [lens] Generate esdocs queries from index pattern

* Remove unused code

* Update yarn.lock from yarn kbn bootstrap

* [Lens] Add basic Lens xy chart suggestions (#37030)

Basic xy chart suggestions

* [Lens] Expression rendering (#37648)

* [Lens] Expression handling (#37876)

* [Lens] Lens/xy config panel (#37391)

Basic xy chart configuration panel

* [Lens] Xy expression building (#37967)

* [Lens] Initialize visualization with datasource api (#38142)

* [lens] Dimension panel lets users select operations and fields individually (#37573)

* [lens] Dimension panel lets users select operations and fields individually

* Split files and add tests

* Fix dimension labeling and add clear button

* Support more aggregations, aggregation nesting, rollups, and clearing

* Fix esaggs expression

* Increase top-level test coverage of dimension panel

* Update from review comments

* [Lens] Rename columns (#38278)

* [Lens] Lens/index pattern drag drop (#37711)

* Basic xy chart suggestions

* Re-apply XY config panel after force merge

* Initial integration of lens drag and drop

* Tweak naming, remove irellevant comment

* Tweaks per Wylie's feedback

* Add xy chart internationalization
Tweak types per Joe's feedback

* Update xy chart i18n implementation

* Fix i18n id

* Add drop tests to the lens index pattern

* improve tests

* [lens] Only allow aggregated dimensions (#38820)

* [lens] Only allow aggregated dimensions

* [lens] Index pattern suggest on drop

* Fully remove value

* Revert "[lens] Index pattern suggest on drop"

This reverts commit 604c6ed68c.

* Fix type errors

* [lens] Suggest on drop (#38848)

* [lens] Index pattern suggest on drop

* Add test for suggestion without date field

* fix merge

* [Lens] Parameter configurations and new dimension config flow (#38863)

* fix eslint failure

* [lens] Fix build by updating saved objects and i18n (#39391)

* [lens] Update location of saved objects code

* Update internatationalization

* Remove added file

* Lens basic metric visualization

* [lens] Fix arguments to esaggs using booleans (#39462)

* [lens] Datatable visualization plugin (#39390)

* [lens] Datatable visualization plugin

* Fix merge issues and add tests

* Update from review

* Fix file locations

* Fix merge issues, localize expression help text

* Add auto-scaling to the lens metric visualization

* Fix unit tests broken by autoscale

* Move autoscale to the new Lens folder

* [lens] Use first suggestion when switching visualizations (#39377)

* [lens] Label each Y axis with its operation label (#39461)

* [lens] Label each Y axis with its operation label

* Remove comment

* Add link to chart issue

* [Lens] Suggestion preview rendering (#39576)

* [Lens] Popover configs (#39565)

* [Lens] Basic layouting (#39587)

* remove datasource public API in suggestions (#39772)

* [Lens] Basic save / load (#39257)

Add basic routing, save, and load to Lens

* [lens] Fix lint error

* [lens] Use node scripts/eslint.js --fix to fix errors

* [lens] Include link to lens from Visualize (#40542)

* [lens] Support stacking in xy visualization (#40546)

* [lens] Support stacking in xy visualization

* Use chart type switcher for stacked and horizontal xy charts

* Clean up remaining isStacked code

* Fix type error

* [Lens] Add xy split series support (#39726)

* Add split series to lens xy chart

* [lens] Lens Filter Ratio (#40196)

* WIP filter ratio

* Fix test issues

* Pass dependencies through plugin like new platform

* Pass props into filter ratio popover editor

* Provide mocks to filter_ratio popover test

* Add another test

* Clean up to prepare for review

* Clean up unnecessary changes

* Respond to review comments

* Fix tests

* [Lens] Terms order direction (#39884)

* fix types

* [Lens] Data panel styling and optimizations (#40787)

Style the data panel (mostly Joe Reuter's doing). Optimize a bunch of the Lens stack.

* Add metric preview icon

* Fix metric vis tests

* Fix metric plugin imports

* Use the operation label as the metric title

* [Lens] Optimize dimension panel flow (#41114)

* [Lens] re-introduce no-explicit-any (#41454)

* [Lens] No results marker (#41450)

* [lens] Support layers for visualizing results of multiple queries (#41290)

* [lens] WIP add support for layers

* [lens] WIP switch to nested tables

* Get basic layering to work

* Load multiple tables and render in one chart

* Fix priority ordering

* Reduce quantity of linting errors

* Ensure that new xy layer state has a split column

* Make the "add" y / split the trailing accessor

* Various fixes for datasource public API and implementation

* Unify datasource deletion and accessor removal

* Fix broken scss

* Fix xy visualization TypeScript errors?

* Build basic suggestions

* Restore save/load and fix typescript bugs

* simplify init routine

* fix save tests

* fix persistence tests

* fix state management tests

* Ensure the data table is aligned to the top

* Add layer support to Lens datatable

* Give xy chart a default layer initially

* Allow deletion of layers in xy charts

* xy: Make split accessor singular
Remove commented code blocks

* Change expression type for lens_merge_tables

* Fix XY chart rendering expression

* Fix type errors relating to `layerId` in table suggestions

* Pass around tables for suggestions with associated layerIds

* fix tests in workspace panel

* fix editor_frame tests

* Fix xy tests, skip inapplicable tests
that will be implemented in a separate PR

* add some tests for multiple datasources and layers

* Suggest that split series comes before X axis in XY chart

* Get datatable suggestion working

* Adjust how xy axis labels are computed

* Datasource suggestions should handle layers and have tests

* Fix linting in XY chart and remove commented code

* Update snapshots from earlier change

* Fix linting errors

* More cleanup

* Remove commented code

* Test the multi-column editor

* XY Visualization does not need to track datasourceId

* Fix various comments

* Remove unused xy prop
Add datasource header to datatable config

* Use operation labels for XY chart

* Adding and removing layers is reflected in the datasource

* rewrote datasource state init

* clean up editor_frame frame api implementation

* clean up editor frame

* [Lens] Embeddable (#41361)

* [lens] Move XY chart config into popover and fix layering (#41927)

* [lens] Move XY chart config into popover and fix layering

* Fix tests

* Update style

* Change wrapping of layer settings popover

* [Lens] Fix bugs in date_histogram and filter ratio (#42046)

* [Lens] Performance improvements (#41784)

* fix type error

* switch default size of terms operation to 3 (#42334)

* [lens] Improve suggestions for split series (#42052)

* [lens] Add chart switcher (#42093)

* solve merge conflicts

* fix test case

* [Lens] Allow only current visualization on field drop in workspace (#42344)

* [Lens] Remove indexpattern id on column (#42429)

* [lens] Implement app-level filtering and time picker (#42031)

* [lens] Implement app-level filtering and time picker

* More integration with filter bar

* Clean up test code and type errors

* Add frame level tests for syncing with app

* Add test coverage for app logic

* Simplify state management from app down

* Fix import errors

* Clarify whether properties are ids or titles for index pattern

* pass new saved object by ref

* add dirty state checking

* Fix tests

* [Lens] Add some tests around document handling in dimension panel (#42670)

* [Lens] Terms operation boolean support (#42817)

* [lens] Minor UX/UI improvements in Lens (#42852)

* Make dimension popover toggle when clicking button

* Without suggestions hide suggestion panel

* Add missing translations (#42921)

* [Lens] Config panel design (#42980)

* Fix up design of config panel

Does not include config popover

* Add metric suggestions, fix tests

* Remove a couple of non-null assertions (#43013)

* Remove a couple of non-null assertions

* Remove orphaned import

* [Lens] Switch indexpattern manually (#42599)

* [Lens] Update frame to put suggestions at the bottom (#42997)

* Back out suggestion changes, in lieu
of Joe's work

* fix type errors

* switch indexpattern on layer if there is only a single empty one (#43079)

* [Lens] Suggest reduced versions of current data table (#42537)

* [Lens] Field formatter support (#38874)

* Fix bugs

* Fix metric autoscale logic

* Register metric as an embeddable

* Fix metric autoscale flicker

* Render mini metric in suggestions panel

* Cache the metric filterOperations function

* fix auto scaling edge cases

* [Lens] Add bucket nesting editor to indexpattern (#42869)

* Modify auto-scale to handle resize events

* use format hints in metric vis

* start cleaning up suggestions

* [Lens] Remove unnecessary fields and indexing from mappings (#43285)

* Tweak metric to only scale down so far, and
scale both the number and the label.

* Fix lens metric tests

* [Lens] Xy scale type (#42142)

* start adding more suggestions

* remove unused imports

* work on suggestions

* work more on suggestions

* work more on suggestions

* work more on suggestions

* [lens] Allow updater function to be used for updating state (#43373)

* [Lens] Lens metric visualization (#39364)

* clean up tests and add new ones

* remove isMetric

* area as default on time dimension

* fix bug in area chart for time

* Fix axis rotation (#43792)

* remove title form layer

* [Lens] Auto date histogram (#43775)

* Add auto date histogram

* Improve documentation and cleanup

* Add tests

* Change test name

* handle state in app

* fix isMetric usages

* fix integration tests

* fix type errors

* fix date handling on submit

* add new suggestion types

* fix test

* do not suggest single tables

* remove unused import

* [Lens] Fix query bar integration (#43865)

* switch order of appending new string column

* resolve merge conflicts

* [Lens] Clean up operations code (#43784)

* fix merge conflicts

* poc implementation

* highlight currently active suggestion and provide button to submit current choice

* [Lens] Functional tests (#44279)

Foundational layer for lens functional tests. Lens-specific page objects are not in this PR.

* [Lens] Add Lens visualizations to Visualize list (#43398)

* [Lens] Suggestion improvements (#43688)

* fix bugs

* [lens] Calculate existence of fields in datasource (#44422)

* [lens] Calculate existence of fields in datasource

* Fix route registration

* Add page object and use existence in functional test

* Simplify layout of filters for index pattern

* Respond to review feedback

* Update class names

* Use new URL constant

* Fix usage of base path

* Fix lint errors

* [Lens ] Preview metric (#43755)

* format filter ratio as percentage (#44625)

* [Lens] Remove datasource suggestion id (#44495)

* [Lens] Make breadcrumbs look and feel like Visualize (#44258)

* [lens] Fix breakage from app-arch movements (#44720)

* Design cleanup

* PR review comments

* fix tests

* small cleanup

* remove unused import

* [lens] Fix type error in test from merge

* [lens] Fix registration of embeddable (#45171)

* keep references stable if table is just extended and add tests

* changed label for stack/unstack

* fix test

* [Lens] Functional tests (#44814)

Basic functional tests for Lens, by no means comprehensive. This is more of a smokescreen test of some normal use cases.

* [lens] Add Lens to CODEOWNERS (#45296)

* [lens] Fix visualization alias registration

* [lens] Fix usage of EUI after typescript upgrade (#45404)

* [lens] Fix usage of EUI after typescript upgrade

* Use local fix instead of workaround

* fix bug and address reviews

* Fix frame tests
2019-09-18 18:28:26 -04:00
Justin Kambic e507264ad8
[Uptime] [Blocker] Move absolute date parsing to URL params hook (#46066)
* Move absolute date parsing to URL params hook.

* Clean up naming.

* Update code to avoid putting dynamically-computed values in URL.

* Add test for new helper function.
2019-09-18 18:20:10 -04:00
Devin W. Hurley 05d296408d
removes awaits from return statements (#46006) 2019-09-18 17:09:52 -04:00
Frank Hassanabad a6a0b202c0
[SIEM] Remove ts-ignore where possible as other packages such as eui have updated now (#46046)
## Summary

Packages such as EUI have updated and we can remove more ts-ignore from imports and other areas of code.

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-09-18 14:34:18 -06:00
Chris Cowan 70166a0d79
[Infra UI] Limit Metric Explorer fields (#43322)
* [Infra UI] Limit Metric Explorer fields

- Closes #41090
- Closes #39613
- Adds allowed list for ECS, Promehteus, Kubernetes, and Docker fields
- Filters "graph pre" fields by selected metrics
- Only displays allowed fields for metric selection, graph per, and
Kquery bar

* Fixing test

* Changing all caps to camel case

* Fixing logic to be more clear and handle null use cases

* Changing to singular
2019-09-18 10:20:38 -07:00
Chris Cowan f818587546
[Infra UI] Load initial page state into the URL when empty for Metrics Explorer (#45683)
* [Infra UI] Load inital page state into the URL when empty for Metrics Explorer

* Initializing incoming empty url state with the URL state provided
2019-09-18 10:17:18 -07:00
Larry Gregory 15e52f2e5e
Spaces NP Migration - Moving server to the LegacyAPI model (#45382) 2019-09-18 12:57:05 -04:00
Joe Reuter 77c060b650
[Graph] Type and reactify venn diagram (#45770) 2019-09-18 17:53:32 +02:00
friol 30a1730bf2 Custom space avatar images (#45148)
* First changes for avatar images

* Added the ability to have custom images for space avatars

* Partial changes as requested by reviewers

* Final commit for space avatar images PR

* Wrapping avatar file name

* Colour picker always enabled, to allow background change for transparent svgs

* All the changes requested in the last review

* Fixes the type_check test errors

* Fixing the rendering errors for space pages

* Another batch of changes as requested by review

* Some more snapshot tests

* Last batch of changes

* Fixed the type_check test

* API doc updates

* Removed comment

* Removed imageUrl from state


Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-09-18 11:06:57 -04:00
Peter Pisljar 3d23deea07
moving agg_config and agg_configs to ui/agg_types (#45877) 2019-09-18 16:05:57 +02:00
Gidi Meir Morris bbfc38dd22
[Task Manager] Treats all tasks as a single unit of work (#45504)
Treat all tasks as a single unit of work, removing the numWorker configuration.
2019-09-18 14:25:50 +01:00
Yulong 265fcd7e89
[Code] added a language server launch failed status (#45753) 2019-09-18 13:49:29 +08:00
Andrew Goldstein 25d01ec7e3
[SIEM] Timeline flyout z-index / Search or Filter EuiSuperSelect width (#45971)
##  Summary

- Fixes [#45830](https://github.com/elastic/kibana/issues/45830), an issue where the timeline flyout button has lower z-index than the search bar (screenshots below)

- A recent change to EUI added a fixed width to the `EuiSuperSelect` popover, such that it matches the width of its parent, which caused the Timeline `Filter / Search` super select content to get cut off. This PR overrides that styling to restore the previous (7.3) behavior (screenshots below)

Tested in dark and light mode in:

- Chrome 77.0.3865.75
- Firefox 69.0
- Safari 12.1.2

### Screenshots

### Flyout - (before)

<img width="1503" alt="flyout-before" src="https://user-images.githubusercontent.com/4459398/65085256-db44f100-d96a-11e9-8660-185045e1ea0a.png">

### Flyout - Chrome / Light (after)

<img width="1680" alt="flyout-chrome-light-after" src="https://user-images.githubusercontent.com/4459398/65085404-3d9df180-d96b-11e9-8f37-cc28b6fdf857.png">

### Flyout - Chrome / Dark (after)

<img width="1680" alt="flyout-chorme-dark-after" src="https://user-images.githubusercontent.com/4459398/65085415-468ec300-d96b-11e9-9435-5c2c4fc57517.png">

### Flyout - Firefox / Light (after)

<img width="1680" alt="flyout-firefox-light-after" src="https://user-images.githubusercontent.com/4459398/65085423-50182b00-d96b-11e9-8c3f-fa83b9241b6a.png">

### Flyout - Firefox / Dark (after)

<img width="1680" alt="flyout-firefox-dark-after" src="https://user-images.githubusercontent.com/4459398/65085427-55757580-d96b-11e9-9f87-eb0e0ecf199d.png">

### Flyout - Safari / Light (after)

<img width="1680" alt="flyout-safari-light-after" src="https://user-images.githubusercontent.com/4459398/65085436-5b6b5680-d96b-11e9-8a31-f1086c7086bf.png">

### Flyout - Safari / Dark (after)

<img width="1680" alt="flyout-safari-dark-after" src="https://user-images.githubusercontent.com/4459398/65085443-60300a80-d96b-11e9-8c41-21c699023fca.png">

### Search or Filter - (before)

<img width="1680" alt="search-or-filter-before-chrome" src="https://user-images.githubusercontent.com/4459398/65085454-69b97280-d96b-11e9-92ff-2f9aed740dae.png">

### Search or Filter - Chrome / Light (after)

<img width="1680" alt="search-or-filter-after-chrome-light" src="https://user-images.githubusercontent.com/4459398/65085465-7211ad80-d96b-11e9-8cee-8eb2879c1404.png">

### Search or Filter - Chrome / Dark (after)

<img width="1680" alt="search-or-filter-after-chrome-dark" src="https://user-images.githubusercontent.com/4459398/65085473-7938bb80-d96b-11e9-928a-136d1bff38aa.png">

### Search or Filter - Firefox / Light (after)

Note: this PR does _not_ address what appears to be a FF light-only focus issue with the latest EUI change:

<img width="1680" alt="search-or-filter-after-firefox-light" src="https://user-images.githubusercontent.com/4459398/65085492-83f35080-d96b-11e9-914c-23b2cd36166f.png">

### Search or Filter - Firefox / Dark (after)

<img width="1680" alt="search-or-filter-after-firefox-dark" src="https://user-images.githubusercontent.com/4459398/65085502-8f467c00-d96b-11e9-8255-f2a5124b10ff.png">

### Search or Filter - Safari / Light (after)

<img width="1680" alt="search-or-filter-after-safari-light" src="https://user-images.githubusercontent.com/4459398/65085527-ac7b4a80-d96b-11e9-8890-9706f185799b.png">

### Search or Filter - Safari / Dark (after)

<img width="1680" alt="search-or-filter-after-safari-dark" src="https://user-images.githubusercontent.com/4459398/65085545-bdc45700-d96b-11e9-9c14-2e5c8c1d005f.png">

https://github.com/elastic/kibana/issues/45830
2019-09-17 19:06:01 -06:00
Ryland Herrick 26e812157b
[Code] New SearchPage layout (#45821)
* Remove now-unused ScopeTabs component

The new layout does not include these tabs; their utility is redundant
with the ScopeSelector dropdown in the search bar.

* Remove unused style

Randomly found this orphaned rule while in here. The consuming component
was deleted in a previous commit (ef8d7ea9).

* Use consistent block names in our BEM classes

Others in this component already use codeQueryBar, so...

* Move the Search bar above both the sidebar and main content

* Align the search dropdown's RHS with the search sidebar

This required a little coordination between the two components
through a couple of sass variables.

* Remove erroneous width rule

This was incorrect for two reasons:

* You need to interpolate the sass variable within calc
* This is the same as width: auto and can be deleted

* Copy: Search Filter -> Advanced Filter

Also removes some odd spacing surrounding the text; that should be done
with CSS instead.

* Space out badge with margin, not nbsp

The copy previously had a leading space; using margin is a better
approach. The class that was replaced was unused.

* Fix alignment of Filters flyout badge

This tweaks the pink badge to be aligned with the text on the flyout
title.

Also removes a now-obsolete className (code-flyout-title).

* Adjust layout of Search filter sidebar

* Indents facets below the filter's title
* Adjusts spacing to be more consistent, removes use of EuiSpacer

NB there's a bit of a hack for the indentation itself: we use an empty,
fixed-width div for the facet's icon prop.

* Fix newline errors

These were introduced by some default vscode settings, which have now
been resolved.

* Update snapshots following markup changes

* Less hacky way of indenting facet buttons

Rather than use an empty, fixed-width div as an icon, just give it some
margin-left.

* Swap hardcoded rem values for equivalent eui vars

* One more eui var replacement

* Remove unused import

* Remove unused translations

These existed in the ScopeTabs component which has been deleted.
2019-09-17 18:39:58 -05:00
Devin W. Hurley 13813e1bbb
[SIEM] Enables no-param-reassign Eslint Rule (#45776)
* enables no-param-reassign eslint rule

* replace some if statements with ternary operators

* remove dead code + fix logic on category of details query thankfully we were not using category on the UI

* adds test and minor logic update for regex replacer function. Also updates logic in events e' elasticsearch adapter for bug fix with field category and adds relevant test.

* remove unused resolvers and remove failing test I added because the type checker didn't like it.

* adds test cases and updates type definition for parts in regex replacer
2019-09-17 19:18:50 -04:00
Josh Dover 769180f8e7
Fix missing prop in Lens (#45969) 2019-09-17 17:40:18 -05:00
Clint Andrew Hall f6be95a751
[easy] Exclude __examples__ from coverage (#45556)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-09-17 14:50:14 -05:00
Joe Reuter eed848ab2e New visualization editor Lens (#36437)
* [lens] Initial Commit (#35627)

* [visualization editor] Initial Commit

* [lens] Add more complete initial state

* [lens] Fix type issues

* [lens] Remove feature control

* [lens] Bring back feature control and add tests

* [lens] Update plugin structure and naming per comments

* replace any usage by safe casting

* [lens] Respond to review comments

* [lens] Remove unused EditorFrameState type

* [lens] Initial state for IndexPatternDatasource (#36052)

* [lens] Add first tests to indexpattern data source

* Respond to review comments

* Fix type definitions

* [lens] Editor frame initializes datasources and visualizations (#36060)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* Fix state management issue

* [lens][draft] Lens/drag drop (#36268)

Add basic drag / drop component to Lens

* remove local package (#36456)

* [lens] Native renderer (#36165)

* Add nativerenderer component

* Use native renderer in app and editor frame

* [Lens] No explicit any (#36515)

* [Lens] Implement basic editor frame state handling (#36443)

* [lens] Load index patterns and render in data panel (#36463)

* [lens] Editor frame initializes datasources and visualizations

* Respond to review comments

* Fix build issues

* remove local package

* [lens] Load index patterns into data source

* Redo types for Index Pattern Datasource

* Fix one more type

* Respond to review comments

* [draft] Lens/line chart renderer (#36827)

Expression logic for the Lens xy chart.

* [lens] Index pattern data panel (initial) (#37015)

* [lens] Index pattern switcher

* Respond to review comments

* [Lens] Editor state 2 (#36513)

* [lens] Dimension panel that generates columns (#37117)

* [lens] Dimension panel that generates columns

* Update from review comments

* [lens] Generate esdocs queries from index pattern (#37361)

* [lens] Generate esdocs queries from index pattern

* Remove unused code

* Update yarn.lock from yarn kbn bootstrap

* [Lens] Add basic Lens xy chart suggestions (#37030)

Basic xy chart suggestions

* [Lens] Expression rendering (#37648)

* [Lens] Expression handling (#37876)

* [Lens] Lens/xy config panel (#37391)

Basic xy chart configuration panel

* [Lens] Xy expression building (#37967)

* [Lens] Initialize visualization with datasource api (#38142)

* [lens] Dimension panel lets users select operations and fields individually (#37573)

* [lens] Dimension panel lets users select operations and fields individually

* Split files and add tests

* Fix dimension labeling and add clear button

* Support more aggregations, aggregation nesting, rollups, and clearing

* Fix esaggs expression

* Increase top-level test coverage of dimension panel

* Update from review comments

* [Lens] Rename columns (#38278)

* [Lens] Lens/index pattern drag drop (#37711)

* Basic xy chart suggestions

* Re-apply XY config panel after force merge

* Initial integration of lens drag and drop

* Tweak naming, remove irellevant comment

* Tweaks per Wylie's feedback

* Add xy chart internationalization
Tweak types per Joe's feedback

* Update xy chart i18n implementation

* Fix i18n id

* Add drop tests to the lens index pattern

* improve tests

* [lens] Only allow aggregated dimensions (#38820)

* [lens] Only allow aggregated dimensions

* [lens] Index pattern suggest on drop

* Fully remove value

* Revert "[lens] Index pattern suggest on drop"

This reverts commit 604c6ed68c.

* Fix type errors

* [lens] Suggest on drop (#38848)

* [lens] Index pattern suggest on drop

* Add test for suggestion without date field

* fix merge

* [Lens] Parameter configurations and new dimension config flow (#38863)

* fix eslint failure

* [lens] Fix build by updating saved objects and i18n (#39391)

* [lens] Update location of saved objects code

* Update internatationalization

* Remove added file

* [lens] Fix arguments to esaggs using booleans (#39462)

* [lens] Datatable visualization plugin (#39390)

* [lens] Datatable visualization plugin

* Fix merge issues and add tests

* Update from review

* Fix file locations

* [lens] Use first suggestion when switching visualizations (#39377)

* [lens] Label each Y axis with its operation label (#39461)

* [lens] Label each Y axis with its operation label

* Remove comment

* Add link to chart issue

* [Lens] Suggestion preview rendering (#39576)

* [Lens] Popover configs (#39565)

* [Lens] Basic layouting (#39587)

* remove datasource public API in suggestions (#39772)

* [Lens] Basic save / load (#39257)

Add basic routing, save, and load to Lens

* [lens] Fix lint error

* [lens] Use node scripts/eslint.js --fix to fix errors

* [lens] Include link to lens from Visualize (#40542)

* [lens] Support stacking in xy visualization (#40546)

* [lens] Support stacking in xy visualization

* Use chart type switcher for stacked and horizontal xy charts

* Clean up remaining isStacked code

* Fix type error

* [Lens] Add xy split series support (#39726)

* Add split series to lens xy chart

* [lens] Lens Filter Ratio (#40196)

* WIP filter ratio

* Fix test issues

* Pass dependencies through plugin like new platform

* Pass props into filter ratio popover editor

* Provide mocks to filter_ratio popover test

* Add another test

* Clean up to prepare for review

* Clean up unnecessary changes

* Respond to review comments

* Fix tests

* [Lens] Terms order direction (#39884)

* fix types

* [Lens] Data panel styling and optimizations (#40787)

Style the data panel (mostly Joe Reuter's doing). Optimize a bunch of the Lens stack.

* [Lens] Optimize dimension panel flow (#41114)

* [Lens] re-introduce no-explicit-any (#41454)

* [Lens] No results marker (#41450)

* [lens] Support layers for visualizing results of multiple queries (#41290)

* [lens] WIP add support for layers

* [lens] WIP switch to nested tables

* Get basic layering to work

* Load multiple tables and render in one chart

* Fix priority ordering

* Reduce quantity of linting errors

* Ensure that new xy layer state has a split column

* Make the "add" y / split the trailing accessor

* Various fixes for datasource public API and implementation

* Unify datasource deletion and accessor removal

* Fix broken scss

* Fix xy visualization TypeScript errors?

* Build basic suggestions

* Restore save/load and fix typescript bugs

* simplify init routine

* fix save tests

* fix persistence tests

* fix state management tests

* Ensure the data table is aligned to the top

* Add layer support to Lens datatable

* Give xy chart a default layer initially

* Allow deletion of layers in xy charts

* xy: Make split accessor singular
Remove commented code blocks

* Change expression type for lens_merge_tables

* Fix XY chart rendering expression

* Fix type errors relating to `layerId` in table suggestions

* Pass around tables for suggestions with associated layerIds

* fix tests in workspace panel

* fix editor_frame tests

* Fix xy tests, skip inapplicable tests
that will be implemented in a separate PR

* add some tests for multiple datasources and layers

* Suggest that split series comes before X axis in XY chart

* Get datatable suggestion working

* Adjust how xy axis labels are computed

* Datasource suggestions should handle layers and have tests

* Fix linting in XY chart and remove commented code

* Update snapshots from earlier change

* Fix linting errors

* More cleanup

* Remove commented code

* Test the multi-column editor

* XY Visualization does not need to track datasourceId

* Fix various comments

* Remove unused xy prop
Add datasource header to datatable config

* Use operation labels for XY chart

* Adding and removing layers is reflected in the datasource

* rewrote datasource state init

* clean up editor_frame frame api implementation

* clean up editor frame

* [Lens] Embeddable (#41361)

* [lens] Move XY chart config into popover and fix layering (#41927)

* [lens] Move XY chart config into popover and fix layering

* Fix tests

* Update style

* Change wrapping of layer settings popover

* [Lens] Fix bugs in date_histogram and filter ratio (#42046)

* [Lens] Performance improvements (#41784)

* fix type error

* switch default size of terms operation to 3 (#42334)

* [lens] Improve suggestions for split series (#42052)

* [lens] Add chart switcher (#42093)

* solve merge conflicts

* fix test case

* [Lens] Allow only current visualization on field drop in workspace (#42344)

* [Lens] Remove indexpattern id on column (#42429)

* [lens] Implement app-level filtering and time picker (#42031)

* [lens] Implement app-level filtering and time picker

* More integration with filter bar

* Clean up test code and type errors

* Add frame level tests for syncing with app

* Add test coverage for app logic

* Simplify state management from app down

* Fix import errors

* Clarify whether properties are ids or titles for index pattern

* pass new saved object by ref

* add dirty state checking

* Fix tests

* [Lens] Add some tests around document handling in dimension panel (#42670)

* [Lens] Terms operation boolean support (#42817)

* [lens] Minor UX/UI improvements in Lens (#42852)

* Make dimension popover toggle when clicking button

* Without suggestions hide suggestion panel

* Add missing translations (#42921)

* [Lens] Config panel design (#42980)

* Fix up design of config panel

Does not include config popover

* Remove a couple of non-null assertions (#43013)

* Remove a couple of non-null assertions

* Remove orphaned import

* [Lens] Switch indexpattern manually (#42599)

* [Lens] Update frame to put suggestions at the bottom (#42997)

* fix type errors

* switch indexpattern on layer if there is only a single empty one (#43079)

* [Lens] Suggest reduced versions of current data table (#42537)

* [Lens] Field formatter support (#38874)

* Fix bugs

* [Lens] Add bucket nesting editor to indexpattern (#42869)

* [Lens] Remove unnecessary fields and indexing from mappings (#43285)

* [Lens] Xy scale type (#42142)

* [lens] Allow updater function to be used for updating state (#43373)

* [Lens] Lens metric visualization (#39364)

* Fix axis rotation (#43792)

* [Lens] Auto date histogram (#43775)

* Add auto date histogram

* Improve documentation and cleanup

* Add tests

* Change test name

* [Lens] Fix query bar integration (#43865)

* [Lens] Clean up operations code (#43784)

* [Lens] Functional tests (#44279)

Foundational layer for lens functional tests. Lens-specific page objects are not in this PR.

* [Lens] Add Lens visualizations to Visualize list (#43398)

* [Lens] Suggestion improvements (#43688)

* [lens] Calculate existence of fields in datasource (#44422)

* [lens] Calculate existence of fields in datasource

* Fix route registration

* Add page object and use existence in functional test

* Simplify layout of filters for index pattern

* Respond to review feedback

* Update class names

* Use new URL constant

* Fix usage of base path

* Fix lint errors

* [Lens ] Preview metric (#43755)

* format filter ratio as percentage (#44625)

* [Lens] Remove datasource suggestion id (#44495)

* [Lens] Make breadcrumbs look and feel like Visualize (#44258)

* [lens] Fix breakage from app-arch movements (#44720)

* [lens] Fix type error in test from merge

* [lens] Fix registration of embeddable (#45171)

* [Lens] Functional tests (#44814)

Basic functional tests for Lens, by no means comprehensive. This is more of a smokescreen test of some normal use cases.

* [lens] Add Lens to CODEOWNERS (#45296)

* [lens] Fix visualization alias registration

* [lens] Fix usage of EUI after typescript upgrade (#45404)

* [lens] Fix usage of EUI after typescript upgrade

* Use local fix instead of workaround

* [lens] Fix usage of expressions plugin (#45544)

* [lens] Fix usage of expressions plugin

* Use updated exports from #45538

* Fix imports and mocha tests

* Use relative instead of absolute path to fix tests

* [lens] More cleanup from QueryBar changes in master (#45687)

* [lens] Fix build and use new platform from entry points (#45834)

* [lens] Fix build and use new platform from entry points

* Fix params for existence route
2019-09-17 14:57:53 -04:00
Shaunak Kashyap c1d6a4701a
Sort using unix timestamp value (#43162)
* Sort using unix timestamp value

* Extract internationalization from react components to function calls.

* Updating Jest snapshots for pipelines table component
2019-09-17 11:30:05 -07:00
Søren Louv-Jansen 238ddd827d
[APM] Use POST instead of implicit GET (#45903) 2019-09-17 20:26:03 +02:00
Poff Poffenberger 54359e7c27
[Canvas] Converting workpad header components to typescript and adding i18n (#45274)
* Converting workpad header components to typescript and adding i18n

* i18n for custom interval

* Refactor of i18n ids and better time text

* Fixing help example

* Refactor of some naming

* More string refactor and finishing workpad export

* Addressing some PR feedback

* Changing plural format

* Quick fix

* Zoom controls

* Fixing id
2019-09-17 13:13:23 -05:00
Shahzad a204a4347f
[Uptime] Fix/issue 48 integration popup closes after refresh (#45759)
* integrate redux into uptime app

* update integrations popup handling

* keep popover open after page refresh

* updated unit test snaps

* update unit tests

* fixed types
2019-09-17 22:15:39 +05:00
Felix Stürmer 4e6cf7998f
[Logs UI] Support zoom by brushing in the log rate chart (#45879)
This enables the modification of the displayed time range in the log rate chart by brushing over the chart.

closes #45472
2019-09-17 18:50:36 +02:00
Robert Oskamp d733e5e77c
[ML] Add population job wizard test (#45765)
This PR adds functional UI tests to create a machine learning job using the population wizard.
2019-09-17 17:25:28 +02:00
Angela Chuang a70e0f44c1
remove setTimeoue for state change (#45853) 2019-09-17 14:55:19 +01:00
Joe Reuter e092e2fdfc
[Graph] Restructure folders and add readme (#45782) 2019-09-17 15:12:35 +02:00
Dmitrii 87f81e8de8
[ML] Enhance job id error message (#45349)
[ML] Enhance job id error message
2019-09-17 13:24:22 +02:00
Xavier Mouligneau 677f662b6c
[SIEM] Do not update state component when they did unmount (#45847)
* do not update state component when they did unmount

* Adds signals to the fetches

* review I
2019-09-16 22:24:35 -04:00
Justin Kambic 4999d09873
[Uptime] Add Kuery Bar (#43621)
* Add saved objects provider, auto-creation of index pattern.

* Fix outdated import.

* Add KueryBar component to Uptime app.

* Extract module helper function to higher scope for greater reuse.

* Reduce nesting in URL hook.

* Update client usage of previously-moved helper function.

* Add export for helper function to helper directory.

* Add index pattern adapter to client lib.

* Add KueryBar to Overview Page.

* Add KueryBar and new filter group.

* Move new components to appropriate directory.

* Fix overview page import.

* Delete status filter helper functions.

* Remove  from list of recommended fields.

* Update domain files to use status filter.

* Update GraphQL queries to use status filter.

* Update GraphQL endpoint to accept status filter.

* Delete obsolete component and associated files.

* Add custom filter components.

* Delete unneeded code.

* Update adapters to accept statusFilter parameter.

* Remove obsolete code.

* Alphabetize object declaration.

* Add index pattern helper function.

* Update Overview handling of filters/user search.

* Update GraphQL inferred types.

* Delete obsolete component.

* Update outdated unit test for stringify_url_params.

* Add index file to new adapter directory.

* Update test framework files to satisfy new typing requirements.

* Update test snapshot for useUrlParams.

* Update JSDoc comment in pings adapter.

* Update pings adapter tests to use new `statusFilter` parameter.

* Delete tests and fixtures for obsolete endpoints.

* Update outdated fixture.

* Update status filter usages for snapshot query tests.

* Delete obsolete imports from index file.

* Delete obsolete monitor list getter.

* Update supported URL params for new param keys.

* Remove unused prop reference.

* Improve naming in new filter components.

* Clean up function body.

* Internationalize filter components.

* Update internationalization key.

* Add test for new helper function.

* Extract function to dedicated file, add tests.

* Add tests for filter popover.

* Move FilterStatusButton to appropriate directory.

* Add test for FilterStatusButton.

* Add tests for getIndexPattern helper.

* Extract helper function to dedicated file.

* Add tests to combineFiltersAndUserSearch helper function.

* Extract inline JSX to new component and add tests.

* Remove obsolete code, update index pattern getter, and add tests.

* Add filter clause helper function and tests.

* Replace custom filter formatting code with calls to new helper function.

* Move filter components to dedicated directory.

* Rename filter files.

* Delete obsolete snapshot.

* Fix broken import in test file.

* Update a comment.

* Simplify index pattern loading in KueryBar.

* Delete unused prop.

* Extract toggle handler to external function and write tests.

* Delete obsolete int'l labels and reuse existing ones in current code.

* Delete remaining unused translation key.

* Rename a file.

* Handle numeric values for filters. Position KueryBar and FilterGroup on same line.

* Remove ID's and URL's from FilterGroup.

* Remove unneeded onOutsideClick handler from styled component to silence warning.

* Escape colons in filters.

* Escape colons in filters.

* Fix bug in snapshot code - calculate total after filtering by status.

* Add specific message to MonitorList when filters are active.

* Introduce missing prop to unit tests.

* Delete unused translation keys.

* Undo filter-related changes to snapshot adapter function.

* Remove unnecessary spread.

* Update filter popover to trap focus and improve keyboard experience.

* Update broken test snapshots.
2019-09-16 21:15:36 -04:00
Yulong 2b94f7c950
[Code] remove lsp job queue (#45757) 2019-09-17 09:02:55 +08:00
Yulong d67aa9264c
[Code] stop fetching lsp status in admin page (#45752) 2019-09-17 09:02:24 +08:00
Nathan Reese e57ea9f69a
[Maps] Refactor MBMapContainer (#45275)
* [Maps] refactor MBMapContainer

* remove debug code

* remove isDrawingFilter from MBMapContainer connector

* remove setTooltipState from MBMapContainer connector

* add guard around removing map handlers

* only render TooltipControl when mbMap exists, put mbMap on state

* only create DrawControl component when mbMap exists
2019-09-16 17:31:11 -06:00
igoristic e7e42b774b
Issue 25323: Fixed error catch and route handling v2 (#44800)
* Sample version

* Add to this page too

* Added base class and fixed some race conditions

* Addressed code review feedback

* Fixed sticky loading state

* Fixed unit tests
2019-09-16 18:34:49 -04:00
Oliver Gupte 54aaac3e08
[APM] Add telemetry to central config settings & service breakdown charts (#45217)
* - adds `trackEvent` to use_track_metric in infra
- tracks page loads for apm settings page
- tracks event for saving an agent configuration in apm settings
- tracks hide/show/hover service breakdown chart in apm transactions

* add optional `metricType` to `trackEvent` defaults to click

* - remove object mutation of syncedChartsProps
2019-09-16 15:21:10 -07:00
Frank Hassanabad a688ba43a3
Fix conditional links to work without relying on localhost (#45826)
## Summary

In my smoke tests for `ml_conditional_links` I accidentally used `locahost` for the tests and they will not run against cloud environments. 

This PR makes them work against any URL.

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~

~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~
~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~
~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~
~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~

### For maintainers

~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
2019-09-16 15:28:28 -06:00
Andrew Goldstein ad4bf17bd6
[SIEM] show all popover items / Timeline flyout button rendering (#45745)
##  Summary

- Fixed [#40406](https://github.com/elastic/kibana/issues/40406), an issue where some popover items (like MAC addresses) in "More…" popovers were not visible (screenshots below)

- Fixed a Chrome-specific (77.0.3865.75) Timeline flyout button rendering issue where, depending on the location of the button, the `border-radius` is not rendered correctly (animated `.gif`s below)

Tested in dark and light mode in:

- Chrome 77.0.3865.75
- Firefox 69.0
- Safari 12.1.2

### Screenshots

### + More - Before (Chrome)

![more-before-chrome](https://user-images.githubusercontent.com/4459398/64902410-f9a5a680-d663-11e9-8bb2-899dd969ced6.png)

### + More - After (Chrome)

![more-chrome-after](https://user-images.githubusercontent.com/4459398/64903200-ebf71d80-d671-11e9-8c4e-db71a6cc279d.png)

### Flyout `border-radius` - Before (Chrome)

![flyout-chrome-before](https://user-images.githubusercontent.com/4459398/64902181-ceb95380-d65f-11e9-8a41-ed83c12bb117.gif)

### Flyout `border-radius` - After (Chrome)

![flyout-chrome-after](https://user-images.githubusercontent.com/4459398/64902184-dda00600-d65f-11e9-89a0-3306096c2b86.gif)

https://github.com/elastic/kibana/issues/40406
2019-09-16 12:41:20 -06:00
Caroline Horn 74b3d84bb6
Update EUI to 14.0.0 (#45475) 2019-09-16 13:59:39 -04:00
Liza Katz b91fbd750c
Moved KbnError base class ⇒ kibana_utils (#45532)
* moved errors base class to kibana_utils

* Fixed tests for ui/errors imports

* fixed test path

* Restored Request Failure resp field

* Restored savedObjectType and savedObjectId

* simplified Error class extension

* updated constructors
2019-09-16 20:10:00 +03:00
James Gowdy 15e4e3c395
[ML] Adding IP field types to list of supported fields (#45758) 2019-09-16 18:03:52 +01:00
Søren Louv-Jansen 0e6e387f39 [APM] Catch auth errors when sending telemetry and creating agent configuration index (#45764) 2019-09-16 09:58:47 -07:00
Liza Katz 4c53fc01eb
Replace data plugin kfetch dependency with core.http service (#45498)
* replace kfetch with core.http

* Enforce get input id field (and use make to create empty index patterns).

* index patterns usage

* fixed jest test
2019-09-16 19:36:22 +03:00
Alexey Antonov 16cab29312
Move ui/field_formats to src/plugins/data (#44883) 2019-09-16 16:04:13 +02:00
Kerry Gallagher d059d1f053
[Logs UI] Enhance analysis setup flow (#44990)
* Enhance setup with a steps style flow
2019-09-16 14:54:40 +01:00
Aleh Zasypkin 15b272a87a
Provide realm name for OIDC/SAML authenticate requests. (#44984) 2019-09-16 10:32:58 +02:00
Shahzad 337c76f383
[Uptime] Fix/issue 41924 show permission warning if no right for uptime (#44968)
* add not found page

* update error handling and 404 page

* update unit tests snaps

* reverted a small change

* Resolved formatting issues

* update unit tests
2019-09-14 16:40:02 +05:00
Xavier Mouligneau 19867b9709
[SIEM] Fix timeline persistence against url and events viewer (#45657)
* fix timeline  persistence against url and events viewer

* fix reset fields browser for events view

* fix inspect event

* review I

* review II
2019-09-13 20:19:46 -04:00