Commit graph

37155 commits

Author SHA1 Message Date
Michail Yasonik b9613af6a8
Navigational search UI metrics (#79238) 2020-10-05 15:35:25 -05:00
Bohdan Tsymbala 96d3b7710a
Added description to trusted app card. (#79503)
* Added description to trusted app card.

* Fixed the test and increased the specificity of styling for item details card styles as opposed to using !important.

* Added useMemo.
2020-10-05 22:04:07 +02:00
Rudolf Meijering cd383800e3
Core usage data (#79101)
* Core Telemetry service

* CoreTelemetryService mock

* Add missing config values back, cleanup

* Core usage collector

* HttpConfig path is 'server'

* Fix tests

* CoreTelemetry -> CoreUsageData

* Improve tests / docs

* Fix telemetry_check

* Don't catch fetch function exceptions, let usage collector handle it

* Code review

* Collect saved object index usage data

* Fix tests and telemetry_check

* explicitly import/export usage data types for telemetry_check

* Remove OS data for now, test for SO usage data

* Fix tests

* Polish core docs

* This shouldn't be here
2020-10-05 21:50:07 +02:00
Constance 7eeb4eed83
Fix breadcrumbs test->trail API (#79554) 2020-10-05 15:49:42 -04:00
Constance 1cf7f783cd
[Enterprise Search] Fix cross-application links & breadcrumbs (#79530)
* Update our cross-app links to correctly include Kibana basePaths

- see https://www.elastic.co/guide/en/kibana/master/kibana-navigation.html
- for this change, we need to pass in the `http` lib as another dependency alongside `history` to createHelper

* Update helpers using createHref to pass new expected dependency

- Note that a lot of their createHref tests did not functionally change in output because Kibana mocks an empty basePath ('/') in tests
2020-10-05 12:48:07 -07:00
Kevin Logan fe13030979
[SECURITY_SOLUTION] remove Elastic from Endpoint Security name (#79367) 2020-10-05 15:26:34 -04:00
Nathan L Smith bd778221dc
Fix link to RFC in GlobalSearch plugin README (#79407) 2020-10-05 14:25:07 -05:00
Nathan Reese a64aa686bd
[Maps] expose map title and description to reporting and embeddable container (#79325)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 13:22:41 -06:00
Jen Huang c88d2d3ae0
[Ingest Manager] Enforce license level for custom registry URL (#79204)
* Enforce enterprise license for custom registry URL

* Add comments
2020-10-05 12:20:33 -07:00
Shahzad 8120e7e7bc
[Uptime]Make uptime ping histogram bar clickable to improve filtering (#79054) 2020-10-05 21:03:28 +02:00
Constance d5b8a95694
Temporarily remove Layout from App Search plugin for 7.10 release (#79506)
- Since our other top level pages (settings, credentials, role mappings) aren't yet ready, we'll stick to the same UI for 7.9, only showing the Engines Overview to users
2020-10-05 11:51:21 -07:00
Spencer a08fe39710
[build] only strip public code, leave other assets (#79504)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-05 11:47:06 -07:00
Søren Louv-Jansen 3d0681bb9e
[APM] Persist time range across apps (#79090) 2020-10-05 20:46:51 +02:00
Chandler Prall 3bad1fc328
Upgraded EUI to v29.3.0 (#78870)
* Upgraded EUI to v29.2.0

* Remove hacks on top of EuiHeaderLink(s)

* Actual update to eui@29.2.0

* Resolve typescript issue when omitting a key over a union

* Resolve nav menu test's expectations

* Fix lint issue

* Update to 29.3.0

* Revert vega snapshot update

I don’t think this was intended to change when I ran the updater

* [ui-shared-deps] strip proptypes from ui-shared-deps production build

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-05 12:44:29 -06:00
Scotty Bollinger 197510a737
[Enterprise Search][Workplace Search] Migrate Groups to Kibana (#78679)
* Initial copying of Groups component tree

This commit moves the base component tree from ent-search with the following changes to satisfy pre-commit hooks

- All file names changed to camel_case
- Copyright comment added to the top of each file
- Semicolons and formatting to match Kibana
- Default exports removed from components
- Placeholder keyboard listener functions added to non-interactive elements with click handlers

* Update paths, remove kea typecasting

This commit does the following:

- Updates the paths of the imports
- Removed the need to typecast logic i.e. "as IGroupsLogic" after the Kea hooks
- Fixed a few TypeScript errors with events and return values on functions

- Finally, this commit does away with the ConfirmModal component (was never copied over), as it only wraps 2 EUI components and we decided it was not needed

* Add constants and image

* Update types

- Adds new types
- Moves types needed by server and app to common

* Refactor ContentSection and ViewContentHeader

With the groups components, we needed to add a header action that was right-aligned to ContentSection.

After building what was needed, I realized that the header in the ContentSection was basically a ViewContentHeader with a different sized heading. I refactored ViewContentHeader to have variable sizes and for ContentSection to use that instead.

Also added styles from ent-search

* Add group routes

This is both the server routes and the frontend paths. After conversation with Jonas, we decided to not use the `/org` prefix. Will clean up the other routes as we build out the rest the migration

* Update logic files

This commit converts the logic files for use in Kibana. This includes:

- Using the new Kea 2.2 syntax that uses MakeLogicType to provide types
- Uses the Kibana HttpLogic instead of the rails routes/http
- Adds return types to Actions interfaces
- Adds `path` key to help with debuggin in dev tools
- Removes FashMessages in lieu of separate logic. Because of this, we have to manually clear the flash mesages with listeners where reducers used to do it when the messages were local to the logic file
- Preplaces promises with async/await & try/catch

- Also, in GroupsLogic’s getSearchResults method, we used Kea’s breakpoint functionality and replaced the useDebouce Hook that was used in the component (future commit)
- Uses global lodash per Kibana’s new directive

* Update routers an indexes

This PR configures the routers to work with Kibana

- Updates paths to imports
- Adds top-level styles

For GroupRouter
- Removes AppView
- Use global flash messages
- Remove sidebar and breadcrumbs

* Update GroupOverview

Adds some changes to facilitate the new design for Kibana

- Copy changes
- Layout changes to have buttons inline and not conditionally shown

* Various updates to components

Adds some changes to facilitate the new design for Kibana.

- Remove unnecessary TableHeader
- Adds pencil in lieu of manage button per design

* Update main groups component

A previous commit did this for the components, as the intention was to do this for components in one PR and the others an a separate PR. Unfortunately the build does not pass with all the missing imports.

This commit does the following:
- Updates the paths of the imports
- Removed the need to typecast logic i.e. "as IGroupsLogic" after the Kea hooks
- Fixed a few TypeScript errors with events and return values on functions
- Use global flash messages
- Remove debounces filderValue, as it’s now debounces in logic file
- Remove legacy isCurated props
- Remove legact AppView

* Add sub navigation to main nav

Also removes redundant search link in sidebar

* Update logic file to reset flashmessages correctly

Because we have separated concerns with global flash message state, we now have to manually trigger resets of flash messages with listeners in Kea where we used to be able to use a reducer to listen to changes and reset flash messages.

* Use navigateToUrl for navigation over history.push

Thanks to work by @constance, we can now use the KibanaLogic’s navigateToUrl value to change routes directly from logic files

* Fix failing test

A previous commit removed the redundant Search link from the sidebar nav because of the one in the header. This commit fixes a filing test and now assets on the number of items as the link addresses will be changing as we migrate more components over

* Convert React Router links to our wrappers

* Replace anchors with EuiButtonEmpty

The original pre-commit hooks failed because the anchors didn’t have key handlers. Pleaceholders were added with TODOs and these have been replaced with EuiButtonEmpty, which satisifies the UI needs and passes linting

* Fix a bug where header actions disappearing

There was a bug where changing routes would cause the header action, in the case of Workplace Search the “Go to search application” link, to disappear on route changes.

Turns out that we didn’t need it in the useEffect and that moving it out keeps the unmount from removing the link from the header.

* i18n top-level component and logic files

* i18n for components

* Fix failing test

This was from 3254c6277e

* Fix broken i18n

Had duplicate ids and misnamed value

* Fix a bug where manage group not in Flash message

There is a button that appears in the Flash Message when a new group is added so that the user can navigate to manage the group and, because the order of setting the new group was before the instantiation of the global flashmessages, the button was not appearing. This commit moves the action after the flash message is set.

* Refactor typings

* Refactor ContentSection spacing

The css was not being used and the bottom padding of 44px (xxl + xs spacer) was being generated with spacers. This has been changed to use only CSS

* Remove canCreateInvitations

* Remove hasMessages check rendering FlashMessages

* snake_case telemetry and path

Will convert other paths in a separate PR

* Fix failing tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 13:33:58 -05:00
Kevin Logan 106ab7e1d9
[SECURITY_SOLUTION] rely on table in test for endpoint list kql bar (#79402) 2020-10-05 14:33:37 -04:00
Nathan Reese a074ef5e07
[Maps] enable auto fit to bounds by default (#79296)
* [Maps] enable auto fit to bounds by default

* type fixes and functional test fixes

* final tslint fixes

* update jest expect

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 12:31:19 -06:00
Brian Seeders 9011f42d7f Skip failing suite (#79522) 2020-10-05 14:30:49 -04:00
Aleh Zasypkin dca9e70616
Ignore intermediate unauthenticated session during repeated authentication attempt. (#79300) 2020-10-05 20:07:23 +02:00
Patrick Mueller a812db3e26
[Alerts] resolve flaky lastExecutionDate tests (#79436)
resolves https://github.com/elastic/kibana/issues/79249

The tests that were flaky were capturing a date while the test was running,
and then comparing to a lastExecutionDate field.  Most of the time this
worked, but were sometimes out of order because of the way the searches
are done and status changing dynamically.  The only current dates we can test
against are really at the very beginning and very end of the tests.
2020-10-05 14:05:34 -04:00
Quynh Nguyen ad89e6f956
[ML] Add runtime fields support (#78700)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 13:00:58 -05:00
Poff Poffenberger ead4ebc9f6
[Canvas] Disable datasource UI when expression contains an expression argument (#79369)
* Disable datasource UI when expression contains an expression argument

* Removing unnecessary type coercion
2020-10-05 12:52:12 -05:00
Sushrut Kasture 8c3af56e2b
Update user table after user is deleted (#79491) 2020-10-05 13:41:25 -04:00
Jean-Louis Leysens e98e2796d5
[Ingest Pipelines] Fix description field bug (#79445)
* rendering optimisation of text fields

* fix description disappearing bug

* refactor fix to get value from form serializer
2020-10-05 19:40:19 +02:00
Walter Rafelsberger c7caac61a2
[ML] Data Frame Analytics: Expandable sections for classification and regression (#79414)
Applies the expandable section based layout to the results pages of classification and regression analytics jobs.
2020-10-05 19:23:13 +02:00
Gidi Meir Morris 4fdf2f1566
[Actions] makes savedObjectId field optional (#79186)
This PR makes the `savedObjectId` parameter optional in the Jira, ServiceNow and IBM Resilient Connectors.
This allows them to execute without this field outside of Alerts, as it is currently populated using the `alertId` which isn't available in other places.
Additionally this adds an optional field in the `Params` Components for all three of the connectors, which allows users to provide a value for the `savedObjectId` field if the so wish.
2020-10-05 18:21:20 +01:00
Shahzad de130abfbc
[UX] Add core web vitals in obsv homepage (#78976) 2020-10-05 19:15:13 +02:00
Nicolas Chaulet 28278abdda
[Ingest Manager] Fix agent tests and short polling timeout (#79442) 2020-10-05 13:10:17 -04:00
Constance 5812217631
[Enterprise Search] Update chrome/breadcrumbs to support dynamic/nested breadcrumbs (#79231)
* [Setup] Add new stripLeadingSlash util

- will be used by upcoming breadcrumb/path logic
- rename folder + update references
+ clean up tests

* Update breadcrumb helpers with new useGenerateBreadcrumbs
- responsible for generating an array of IBreadcrumb objs with correct react router paths, given an array of breadcrumb text

+ rename previous generic useBreadcrumbs helper to a more specific useEuiBreadcrumbs (indicates the type of transforming happening)

+ misc typing updates/improvements

* Update SetChrome helpers
- to use new useGenerateBreadcrumbs() helper

+ simplify props - remove `isRoot` and `text` (now just accepts a single `trail` array - an empty trail creates the same effect as isRoot
+ simplify/improve typing as a result (yay!)
- improve docs

+ useEffect update - update breadcrumbs/titles if `trail` ever changes. This will primarily be most helpful for pages that fetch dynamic data on page load (e.g. a dynamic engineName, groupName, etc.)
- note that in the above case trail arrays should probably be wrapped in useMemo() to reduce unnecessary rerenders

* Update all instances of SetPageChrome to new props

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 10:08:13 -07:00
Sonja Krause-Harder ce4641aa97
[Ingest Manager] Install uploaded package (#77986)
* Refactor: installPackage -> installPackageFromRegistry

* Refactor: factor out source-agnostic installation steps

* Unpack and cache uploaded zip and tgz files.

* Add basic archive verification and parse manifest.

* Catch error when zip archive is uploaded as gzip.

* Add API integration tests.

* Remove unnecessary use of "package key" concept.

* Add 'install_source' property to saved object epm-packages.

* Adjust tests.

* Add API integration test for manifest missing fields.

* Refactor loadArchive -> loadArchivePackage.

* Refactor caching of package archive content

* Get datasets and config templates from manifest files.

* Use file paths from archive instead of asset paths from registry.

* Correctly load registry packages into cache

* Use InstallablePackage instead of RegistryPackage where possible.

* Actually install uploaded package.

* Add missing field to saved objects in tests.

* Adjust unit test to pick buffer extractor.

* Adjust unit test.

* Fix and re-enable getAsset() test.

* Adjust integration tests.

* Make error message match test.

* Pick data_stream.dataset from manifest if set.

* dataset -> data_stream also in comments

* Remove unused variable.

* Use pkgToPkgKey() where appropriate.

* More dataset -> data stream renaming.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 18:51:06 +02:00
Uladzislau Lasitsa 90b6442ca6
[Visualize] Horizontal Bar Graph Visualizations have Vertical Bar Graph Type (#78536)
* Fixed useEffect in metric_axes. Update type in params instead of type of vis

* Fixed tests

* Fixed tests

* Update current chart type definition

Co-authored-by: sulemanof <daniil_suleiman@epam.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 19:46:02 +03:00
Ryland Herrick 951034cf0c
[Search]Add EQL search strategy (#78645)
* Add EQL search strategy

Since EQL is an x-pack feature, this strategy will live in the
x-pack plugin data_enhanced.

* Refactor our test setup to minimize shared state

* Ensures that the same variable is not used for both test setup and
  test assertions
* Ensures that mocks are reinstantiated on every test

* Use explicit top-level exports

* Move async search options to a helper function

* Move our workaround to a helper function

This was repeated in five places, time to consolidate.

* Commit documentation changes

We export a few new helper functions.

* Mark our internal methods as such

Updates documentation accordingly.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 11:30:32 -05:00
Liza Katz 5f53d4f34b
[RFC][Search] Background sessions RFC (#73281)
RFC

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2020-10-05 19:18:30 +03:00
Shahzad 897a609c35
Remove resize panels (#79428) 2020-10-05 18:16:21 +02:00
Patryk Kopyciński fd27e5b735
[Security Solution] Align skip logic across SearchStrategy queries (#79085) 2020-10-05 18:10:40 +02:00
Sébastien Loix 0d378e488c
Form lib enhancements (#78588)
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 18:09:50 +02:00
Paul Tavares 1dacabc534
Un-skip endpoint policy details tests (#79460) 2020-10-05 12:02:29 -04:00
Patryk Kopyciński 88ddde817c
[Security Solution] Fix source.ip and destination.ip draggables (#79399) 2020-10-05 17:42:48 +02:00
Sandra Gonzales 53f22dcf36
[Ingest Manager] Upgrade Agents in Fleet (#78810)
* add kibanaVersion context and hook, add upgrade available indications

* add agent upgrade modals and action buttons

* fix import

* add bulk actions api and remove source_uri as required

* add upgrading to AgentHealth status

* buildKueryForUpgradingAgents

* bulk actions UI

* remove source_uri

* add release type to agent details

* don't allow upgrade of unenrolled/unenrolling agent

* hide upgradeable button when not upgradeable

* fix test

* add udpating agent status

* remove upgrade available filter button for now

* update isUpgradeAvailable to use local_metadata upgradeable

* add UPDATING to agent event subtype

* use saved object for updating agent status

* add updating badge type label

* add upgrade available button and update agent list endpoint to accept showUpgradeable

* add schema and type for UPDATING

* fix type

* dont try to upgrade local_metadata

* exclude from AAD upgrade_started_at and upgraded_at

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 11:33:41 -04:00
igoristic f490268a2e
[Monitoring] JVM memory usage alert (#79039)
* Memory usage first draft

* Fixed tests

* CR feedback

* Feedback and tests

* Added size to optimize query

* Removed scheduled check

* Removed globalstate date

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 11:22:17 -04:00
Bhavya RM 14e58fbadb
A11y tests for user page (#79199) 2020-10-05 11:09:14 -04:00
Jean-Louis Leysens f6729dc3f4
[Ingest Pipelines] Processors editor a11y focus states (#79122)
* Fix showing of accessibility border

- fix use of flex items (removed unnecessary use thereof)
- also fixed overflow when tabbing through drop zones (compressed)

* refactor isLast to compressed

* optimize keyboard focus states in move mode

* fix jest test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 17:05:10 +02:00
Alison Goryachev 18a67b68b1
[Ingest pipelines] Clean up component integration tests (#78838) 2020-10-05 10:52:08 -04:00
Vadim Dalecky 59e4e06316
Drilldowns in examples (#75640)
* feat: 🎸 add telemetry for in-chart "Explore underlying data"

* feat: 🎸 add telemetry for in-chart "Explore underlying data"

* refactor: 💡 move all drilldowns into a sub-folder

* feat: 🎸 setup example app section for ui_actions_enhanced

* feat: 🎸 set up Drilldown Manager section

* feat: 🎸 open drilldown manager from example plugin

* refactor: 💡 rename supportedTriggers -> triggers prop

* feat: 🎸 show dev warning if triggers prop is empty

* refactor: 💡 rename "supportedTriggers" -> "triggers" props

* feat: 🎸 open and close drilldown manager from example plugin

* feat: 🎸 add sample ML job trigger

* feat: 🎸 add sample ML URL drilldown

* refactor: 💡 move KibanaURL to share plugin

* refactor: 💡 add index file to ml drilldown

* feat: 🎸 add AbstractDashboardDrilldown

* refactor: 💡 make dashboard drilldown use abstract drilldown

* refactor: 💡 rename dashboard drilldown to embeddable drilldown

* feat: 🎸 add Dashboard drilldown to sample plugin

* feat: 🎸 open dashboard drilldown in list view

* feat: 🎸 add drilldown execute button

* refactor: 💡 move drilldown React hooks into /hooks folder

* test: 💍 fix tests after renaming triggers

* chore: 🤖 populate "requireBundles"

* fix: 🐛 fix TypeScript errors

* fix: 🐛 fix Kibana plugin dependency

* chore: 🤖 remoe unused import

* feat: 🎸 persist drilldown manager state across app navigations

* refactor: 💡 move no-embeddable example into a seprate file

* feat: 🎸 set up example with embeddable

* feat: 🎸 improve embeddable example

* refactor: 💡 rename without embeddable example

* feat: 🎸 set up no-embeddable single click example

* feat: 🎸 add dashboard drilldown to single button example

* fix: 🐛 remove unused margin

* fix: 🐛 make "Get more actions" translation static

* chore: 🤖 remove old dashboard drilldown definition

* refactor: 💡 rename samples to generic names

* refactor: 💡 make app 1 example drilldown "hello world"

* chore: 🤖 remove unused required bundle

* chore: 🤖 add dashboardEnhanced back

* [kbn/optimizer] only build xpack examples when building xpack plugins

* move alerting_example into x-pack/examples

* remove filter for alertingExample plugin in oss plugins CI step

* revert unrelated change

* fix: 🐛 use correct prop name

* test: 💍 fix embeddable-to-dashboard drilldown mock

* test: 💍 fix a test after refactor

* chore: 🤖 remove unused import

* chore: 🤖 add dashboard_enahcned to example plugin

* chore: 🤖 address review comments

* feat: 🎸 add description to UI Actions Enhanced examples

* docs: ✏️ improve docs of example plugin

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 16:31:30 +02:00
Nathan L Smith 13a737e675
Storybook and Jest cleanup (#79305)
* Fix all broken stories
* Get rid of all Jest warnings
* Remove `@ts-expect-error`s added for JSON imports and fix their type errors
* Convert some stories to [Component Story Format](https://storybook.js.org/docs/react/api/csf)
* Replace story for Service Map with many external services with one for the popover with many external services
* Center and fit cytoscape maps in stories
* Rename some files to snake_case
2020-10-05 09:18:24 -05:00
MadameSheema fdc6562350
adds EQL sequence rule test (#79287)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 16:17:48 +02:00
Michail Yasonik a66259aaa1
PR template a11y checklist item improvement (#79243) 2020-10-05 09:16:06 -05:00
Jonathan Buttner cc633a4a91
[Security Solution] Adding tests for dns pipeline in the endpoint package (#79177)
* Adding tests for dns pipeline in the endpoint package

* Adding test to make sure non dns events are ingested correctly

* Bring the docker container with the new endpoint package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 10:11:28 -04:00
Quynh Nguyen e067604d78
[ML] Only adjust the bounds of SMV if annotations are visible (#79210)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-05 09:06:55 -05:00
Mikhail Shustov 5ca87308ea
global search to ts refs (#79446) 2020-10-05 16:00:27 +02:00