Commit graph

35688 commits

Author SHA1 Message Date
Spencer a735a9f825
[bin/kibana-plugin] support KP plugins instead (#74604)
* [cli/kibana-plugin] support KP plugins instead

* fix some Logger imports from cli/kibana_keystore

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 16:38:08 -07:00
Matthew Kime 981fdda966
Reduce number of indexed fields in index pattern saved object (#74817)
* reduce number of indexed fields in index pattern saved object
2020-08-12 18:31:30 -05:00
Josh Dover 0eee111cf3
[reporting] Pass along generic parameters in high-order route handler (#74892) 2020-08-12 15:24:29 -06:00
Yuliia Naumenko 124bd126f8
Migrated last pieces of legacy fixture code (#74470)
* Migrated last pieces of legacy fixture code

* Implemented own server for webhook simulator

* Fixed type checks. Moved slack simulator to own server

* close server after tests run

* Fixed due to comments

* fixed failing tests
2020-08-12 14:08:02 -07:00
Caroline Horn 5b64a4cdfe
Empty index patterns page re-design (#68819)
Empty index patterns page re-design
2020-08-12 15:58:16 -05:00
Spencer c97916ea81
[babel] coalese some versions to prevent breaking yarn install (#74864)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 12:45:49 -07:00
Devon Thomson 2e5140d67b
[Dashboard First] Decouple Attribute Service and By Value Embeddables (#74302)
* Added an interface that determines if an embeddable can be treated as either by reference or by value
2020-08-12 15:31:44 -04:00
Josh Dover 5d82ac15cb
Revert "[reporting] Pass along generic parameters in high-order route handler" (#74891)
This reverts commit 041b78cec1.
2020-08-12 12:46:13 -06:00
Josh Dover 041b78cec1
[reporting] Pass along generic parameters in high-order route handler (#74879) 2020-08-12 12:45:38 -06:00
Spencer c8b63c0b1b
[src/dev/build] implement a getBuildNumber() mock (#74881)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-08-12 11:09:46 -07:00
Constance 6ee2460ebc
[Enterprise Search] Add solution-level side navigation (#74705)
* Add basic layout/sidebar blocking

- note: we should *not* set left: 0 / top: 0 etc., as this can interfere with Kibana's existing UI (e.g. docked navigation, telemetry callout)

* Add sidebar styles + static links

* Refactor SideNav to be a reusable component

- So that Workplace Search can reuse the same layout but pass in their own custom nav
+ Refactor AppSearch to use Layout in router

* Refactor all views to account for in-router Layout

* Fix root redirects not working as expected

- If enterpriseSearchUrl hasn't been set, all pages should redirect to SetupGuide, not just root
- The engines redirect simply wasn't working at all - it would always show a blank page when '/' was clicked in the Kibana breadcrumbs. Not sure if this is a Kibana issue - had to change to a component load to fix
+ Simplify index.test.tsx (probably unreasonable and not super helpful to add assertions for each new route)

* Implement active styling for links

* Fix failing location tests

- By adding a new useLocation mock
+ add SideNavLink active class test

TODO: I should probably rename react_router_history.mock to just react_router.mock

* Add responsive toggle + styling

* Add navigation accessibility attributes/controls

* [Feedback] Update mobile UX to close menu on link click/navigation

- This requires updating our EUI/React Router components to accept and run custom onClick events
- Also requires adding a new ReactContext to pass down closeNavigation, but that's not too onerous thanks to useContext
2020-08-12 09:33:10 -07:00
Kaarina Tungseth 8f54198434
[DOCS] Canvas docs 7.9 refresh (#74000)
* [DOCS] Canvas docs refresh

* Reformatting

* Image descriptions

* Adds workpad redirect

* Link fix pt 2

* Link fix part 3

* Link fix part 4

* Comments from Poff

* Corrected file name

* Review comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 11:13:04 -05:00
Brent Kimmel 34195271c5
[Security Solution][Resolver]Enzyme test related events closing (#74811) 2020-08-12 11:56:05 -04:00
Jean-Louis Leysens 0e5ac40b00
Support sentence case names for known processors (#74847) 2020-08-12 17:45:12 +02:00
Steph Milovic fb2b9a46af
[Security Solution] [Cases] Bugfix for special character tags filtering (#74849) 2020-08-12 10:41:12 -05:00
Angela Chuang be7e21c925
[Security Solution] put back savedObjectId in error message (#74775)
* put back savedObjectId in error message

* fix type error
2020-08-12 16:14:48 +01:00
MadameSheema 64b609b081
[SIEM] Adds pin event to timeline cypress test (#74256)
* adds 'pin event' cypress test

* refactors code

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 17:09:16 +02:00
Kerry Gallagher 2e38f5a705
[Logs UI] Return 403s rather than 500s for ML privilege errors (#74506)
* Add ML privileges error checks to all routes
2020-08-12 15:22:00 +01:00
Kevin Logan 7f33e72ba7
[SECURITY_SOLUTION] fix unenrolled query (#74798) 2020-08-12 09:20:55 -04:00
Nathan Reese ed69f9b85a
[maps] implement save and return from dashboard (#74303)
* pass originatingApp into App

* save and return top nav option

* clean up

* navigate to originating app

* functional test

* tslint

* cutOriginatingAppConnection

* add functional test for cutting originating app flow

* one more fix for cutting originator app and another functional test to verify

* typo

* review feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 07:09:49 -06:00
Robert Oskamp 178afd71fc
[ML] Functional tests - stabilize DFA dependent variable input (#74829)
This PR stabilizes the dependent variable input during tests by explicitly waiting for the options to load.
2020-08-12 13:42:43 +02:00
Alexey Antonov 21b9b36c94
[Vega] add functional tests for Vega visualization (#74097)
* [Vega] [Inspector] add functional tests for Request tab

* add some tests for Vega Debug tab

* add clipboard permissions for webdriver

* add smoke tests for data grid

* fix CI

* add some tests for vega expression funcitons

* change order

* Update _vega_chart.ts

* Rename dagta_grid.ts to data_grid.ts

* Update index.ts

* Update data_grid.ts

* stabilize tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-12 14:05:23 +03:00
James Gowdy a81059b14b
[ML] Removing full lodash library imports (#74742)
* [ML] Removing full lodash library imports

* more has

* fixing missing filter

* removing _

* removing unused file

* removing first use

* removing comment
2020-08-12 09:24:43 +01:00
Liza Katz 506e9537bf
[Search] Server strategy example (#71679)
* Server strategy example

* Add tsconfig
Renamed is_partial to isPartial
Added isPartial and isRunning to OSS response type

* Docs + remove unused sample code

* Fix test naming of arguments

* ts

* ts fix

* Add filters and query input selector

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Use new service

* exapmle plugin ts

* unsubscribe + use timefilter

* typo

* docs

* Add comments and use agg config

* Added agg configs
Added field selector
Added a custom input param

* Adding getEsQuery to query service (??)

* Add server side example

* docs

* caps

* list plugin in examples page

* fix typo

* Update examples/search_examples/public/application.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/application.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update examples/search_examples/public/components/app.tsx

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* eslint

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 23:28:43 +03:00
Tim Sullivan d78644229e
[Reporting] Fix and test for Listing of Reports (#74453)
* [Reporting] Fix and test for Listing of Reports

* add sleeps

* await selector instead of sleep

* reduce changes

* cleanup after csv generated

* fix snapshot
2020-08-11 12:59:23 -07:00
Nathan Reese 7d3a1ff218
[maps] fix drawing shapes (#74689)
* [maps] fix drawing shapes

* prevent re-render on state change
2020-08-11 12:27:24 -06:00
Robert Austin bd8761ee15
[Resolver] Improve simulator. Add more click-through tests and panel tests. (#74601)
### Improved the simulator.
* Replace `mapStateTransitions` with `map`. The usage and interface are the same, but `map` is not dependent on redux state. This will work for parts of the app that don't use redux (aka EUI). `map` also forces any `AutoSizer` instances used by EUI to show their full contents. `AutoSizer` works but it doesn't behave as expected in JSDOM. With this hack in place, we can bypass `AutoSizer`. Going forward, we should make sure to use something other than `EuiSelectable` for the dropdowns
* Removed the `connectEnzymeWrapperAndStore` test helper. The new `map` simulator method doesn't rely on redux so we no longer need this explicit sync.
* The simulator can receive a memory history instance. This allows tests to pass in a precreated / controlled memory instance. Useful for testing the query string. This design is not final. Instead we could have an 'intiialHistorySearch' parameter that sets the query string on instantiation as well as 'pushHistory' and 'replaceHistory' methods?
* `findInDom` is now called `domNodes`.
* `processNodeElementLooksSelected` and `processNodeElementLooksUnselected` are gone. Instead use `selectedProcessNode` and `unselectedProcessNode` to find the wrappers and  assert that they wrappers contain the nodes you are interested in.
* Added `processNodeSubmenu` method that gets the submenu that comes up when you click the events button on a process node.
* Added `nodeListElement` method. This returns the list of nodes that shows up in the panel. Name is not final.
* Added `nodeListItems` method. This returns the list item elements in the node list. Name is not final.
* Added `nodeListNodeLinks` method. This returns the links in the items in the node list. Name is not final.
* Added `nodeDetailElement` method. This gets the element that contains details about a node. Name is not final.
* Added `nodeDetailBreadcrumbNodeListLink` method. Returns the link rendered in the breadcrumbs of the node detail view. Takes the user to the node list. Name is not final.
* Added `nodeDetailViewTitle` method. This returns the title of the node detail view. Name is not final.
* Added `nodeDetailDescriptionListEntries` method. This returns an entries list of the details in the node detail view. Name is not final
* Added `resolveWrapper` method. Pass this a function that returns a `ReactWrapper`. The method will evaluate the returned wrapper after each event loop and return it once it isn't empty.

### Improved our mocks
* We had a DataAccessLayer and ResolverTree mock named 'one_ancestor_two_children` that actually had no ancestors. Renamed them to `no_ancestors_two_children`.
* New DataAccessLayer mock called `noAncestorsTwoChildrenWithRelatedEventsOnOrigin`

### Added new 'clickthrough' suite test
* Added new test in the 'clickthrough' suite that asserts that a user can click the 'related events' button on a node and see the list of related event categories in the submenu.

### Improved the Resolver event model
* Added `timestampAsDateSafeVersion` to the event model. This gets a `Date` object for the timestamp. (We still need make it clear that this model is ResolverSpecific)

### New `urlSearch` test helper.
Use `urlSearch` when testing Resolver's interaction with the browser location. It calculates the expected 'search' value based on some Resolver specific parameters.
* Use this to calculate a URL and then populate the memory history with this URL. This will allow you to see if Resolver loads correctly based on the URL state.
* Use this to calculate the expected URL based on Resolver's current state.

### Added new 'panel' test
* If Resolver is loaded with a url search parameter that selects a node, the node's details are shown in the panel.
* When a history.push occurs that sets a search parameter that selects a node, the details of that node are shown.
* Check that the url search is updated when the user interacts with the panel
* Check that the panel shows the correct details for a node. (except for the timestamp. See TODO)

### Changed `data-test-subj`s
* Removed `resolver:panel`. This was used on a wrapper element that we expect to remove soon. 
* Added `resolver:node-detail:breadcrumbs:node-list-link` for the buttons in the breadcrumb in the panel.
* Added `resolver:node-detail:title` for the title element in the node detail view.
* Added `resolver:node-detail:entry-title` and `resolver:node-detail:entry-description` for the details shown about a process in the node detail view. 
* Added `resolver:node-list:node-link`. This is the link shown for each node in the node list.
* added `resolver:node-list:item` to each list item in the node list view.

### Removed dead code
* `map.tsx` wasn't being used. It was renamed but the old version wasn't deleted.

### Improved the node detail view
* Show the timestamp for a node's process event even if the timestamp is the unix epoch. Note: this is technically a bug fix but the bug is very obscure. 
* Show the PID for a node's process event when the PID is 0. Note: this is a bug fix.
2020-08-11 13:57:56 -04:00
Alexey Antonov 489b134927
Deprecate schema-less specs in Vega (#73805)
* Deprecate schema-less specs in Vega

Closes #30951

* update an error Message

* update tests

* update error message

* Update vega_parser.ts

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 20:47:20 +03:00
Dan Panzarella 80a5c4bef7
[Security Solution] Rename Administration > Hosts subtab to Endpoints (#74287) 2020-08-11 13:31:59 -04:00
Stratoula Kalafateli 7b5df7ce3b
Timelion deprecation doc (#74508)
* timelion deprecation doc wip

* Create Timelion Deprecation section to Visualize

* Code review changes

* minor changes

* Make some changes in order to give priotization on how to replace an existing timelion worksheet to a dashboard

* Syntax related improvements

* Final touch

* Remove extra lines and some minor changes
2020-08-11 20:22:46 +03:00
Stratoula Kalafateli 78689b7ecd
[Functional Tests] Adds a wait time between setting the index pattern and the time field on TSVB (#74736)
* Adds a wait time between setting the index pattern and the time field on tsvb

* Char by char to set indexpattern to give more time to load the time field

* Add more time

* uncomment commented lines
2020-08-11 20:17:08 +03:00
Stratoula Kalafateli 0cfc7b464c
[Lens] Add styling options for x and y axes on the settings popover (#71829)
* [Lens] Add styling options for x axis on the settings popover

* ts related changes

* Changes to the popover's design and y-axis implementatin

* fix types and add unit tests

* Add extra translations

* Fix functional test and change the logic of the yTitle

* fixes

* fix showTitle settings bug

* Fix ticklabels bug on y axes

* fix some tests

* Change the user flow on x and y titles on settings popover and enable the gridlines by default

* disable linter warning

* PR Comments

* Add a comment to callback to explain the decision to listen only to open changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 20:10:35 +03:00
Nathan Reese 75b8a3cb71
[Maps] add initial location option that fits to data bounds (#74583)
* [Maps] add initial location option that fits to data bounds

* update navigation_panel snapshot

* add functional test to ensure sync is called when auto fit to bounds with no data

* add functional test for auto fit to bounds on map load

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 10:18:36 -06:00
Peter Pisljar 0ef17f92a6
theme function (#73451) 2020-08-11 17:58:47 +02:00
Luke Elmers 910c883607
[data.ui.query] Write filters to query log from default editor. (#74474) 2020-08-11 09:55:09 -06:00
Luke Elmers d84777f053
[data.search.SearchSource] Move some SearchSource dependencies to the server. (#74607) 2020-08-11 09:53:42 -06:00
Corey Robertson bc0b4821ad
[Canvas][tech-debt] Convert renderers (#74134)
* Convert renderers to typescript

* Fix typo

* Fix type issues

* Fixes

* Fix issue with data table render

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 11:36:08 -04:00
Frank Hassanabad 461d68418c
[security solutions][lists] Adds end to end tests (#74473)
## Summary

Adds initial set of end to end tests for lists

You can run all of these with the command from kibana root:

```ts
node scripts/functional_tests --config x-pack/test/lists_api_integration/security_and_spaces/config.ts
```

Fixes a few minor bugs found such as...
* Validation for importing lists was not checking if the indexes were created first
* Some wording for the error messages had duplicate words within them

### Checklist

- [x] [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
2020-08-11 09:25:04 -06:00
Brittany Joiner f621b0e2b6
pluralized for occurrences vs occurrence (#74564)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 09:20:15 -05:00
Stacey Gammon f9c3036759
Update links that pointed to CONTRIBUTING.md (#74757)
* Update links that pointed to CONTRIBUTING.md

* Update .github/PULL_REQUEST_TEMPLATE.md

point to master instead of 7.x
2020-08-11 10:18:12 -04:00
Alison Goryachev bf666910b0
[Ingest pipelines] Implement tabs in processor flyout (#74469) 2020-08-11 10:03:41 -04:00
Gidi Meir Morris 67025579ba
[Event log] Use Alerts client & Actions client when fetching these types of SOs (#73257)
Introduces a pluggable API to Event Log which allows custom Providers for Saved Objects which is used to ensure a user is authorised to get the Saved Object referenced in the Event Log whenever the find api is called.
2020-08-11 15:00:02 +01:00
Tyler Smalley 9782ac4b7f
Bump chalk to 4.1.0 (#73397)
https://github.com/chalk/chalk/releases

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 06:47:33 -07:00
Matthew Kime 6c63b0d40b
Index pattern field list - transition away from extending array - introduce and use getAll() (#74718)
- Introduce `indexPattern.fields.getAll()` and use where possible
- Rename `index_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.ts`
- FieldSpec - make `count` and `scripted` fields optional
- use `indexPattern.fields.getByName` instead of filter where possible
2020-08-11 07:54:58 -05:00
Xavier Mouligneau d91e024f66
[SECURITY] Bugs css/inspect (#74711)
* Fix inspection button when using topN

* css left over
2020-08-11 08:52:38 -04:00
Ahmad Bamieh 53828dab35
[telemetry] update README to downplay ui_metrics (#74635)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 15:24:21 +03:00
igoristic 5665ce2cd2
Fixed grammar (#74725) 2020-08-11 06:40:22 -04:00
Alejandro Fernández Haro 0c16ca4649
[Telemetry][API Integration] size_in_bytes to be a number (#74664) 2020-08-11 10:44:32 +01:00
Yulia Čech a4ec4332c6
[ILM] Convert node details flyout to TS (#73707)
* [ILM] Convert node allocation component to TS and use hooks

* [ILM] Fix jest tests

* [ILM] Fix i18n check

* [ILM] Implement code review suggestions

* [ILM] Fix type check, docs link and button maxWidth in NodeAllocation component

* Fix internaliation error

* [ILM] Convert node details flyout to TS

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node attributes

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

* [ILM] Delete a period in error callout

* [ILM] Convert node details flyout to TS

* [ILM] Fix i18n check

* [ILM] Fix useState declaration

* [ILM] Fix useState declaration

* [ILM] Fix jest test

* [ILM] Change error message when unable to load node details

* [ILM] Delete a period in error callout

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 11:32:05 +02:00
Jean-Louis Leysens 92289b63ef
[Ingest Node Pipelines] Sentence-case processor names (#74645)
* wip on fixing processor names

* added comment

* fix Jest test element selector

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 10:05:54 +02:00