Commit graph

34602 commits

Author SHA1 Message Date
spalger
8d86a74ba8 Revert "Bump lodash package version (#71392)"
This reverts commit 60032b81ca.
2020-07-13 13:17:42 -07:00
Jen Huang
1d23a48f98
Fix create agent config flyout being covered by bottom bar (#71502) 2020-07-13 12:56:57 -07:00
Jonathan Budzenski
b3c6ce9aea
rm index: false from binary mappings (#71343)
* rm index: false from binary mappings

* test against unverified snapshot

* two more

* Mapping adjustments

* Revert "Mapping adjustments"

This reverts commit 52d68dcd6d.

* Revert "test against unverified snapshot"

This reverts commit 4284ac37f1.

Co-authored-by: Madison Caldwell <madison.caldwell@elastic.co>
2020-07-13 14:47:16 -05:00
Jen Huang
7282597a29
[Ingest Manager] Rename settings.monitoring to agent.monitoring (#71467)
* Rename settings.monitoring to agent.monitoring; simplify default file name for downloaded agent yaml

* Fix test
2020-07-13 12:46:00 -07:00
Spencer
ec43d45b51
[scripts/report_failed_tests] fix report_failed_tests integration on CI (#71131)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 12:29:29 -07:00
Mikhail Shustov
0ea414c13a
[KP] Separate onPreAuth & onPreRouting http interceptors (#70775)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
2020-07-13 13:26:34 -06:00
Jen Huang
e51b92de32
Fix fleet back link copy (#71488) 2020-07-13 12:17:16 -07:00
Nathan Reese
f95ab33cbe
[Maps] use EuiColorPalettePicker (#69190)
* [Maps] use EuiColorPalettePicker and Eui palettes

* use new ramps to create mb style

* update ColorMapSelect to use EuiColorPalettePicker

* move color_utils test to color_palettes

* clean up heatmap constants

* tslint

* fix test expects

* fix merge mistake

* update jest expects

* remove .chromium folder

* another jest expect update

* remove charts from kibana.json

* remove unneeded jest.mock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 12:53:00 -06:00
Jen Huang
3031ff7447
Allow enrollment flyout to load well on slow networks (#71487) 2020-07-13 11:40:21 -07:00
Madison Caldwell
649a16bd88
[Security Solution][Endpoint][Ingest Manager] Improved testing for user manifest consistency (#71381)
* Test user artifacts for all OSes. Test unicode.

* Test hashes and sizes pre- and post- decoding

* Clean up types in ingestManager common mocks

* Fix type in package config mock

* Add test for conflict on dispatch

* Test package config conflict resolution
2020-07-13 14:25:04 -04:00
Jonathan Buttner
cd43bbc365
Increasing limits for resolver (#71483) 2020-07-13 14:22:17 -04:00
Ryland Herrick
1afb0c476b
[Security Solution][Detections] Adoption telemetry (#71102)
* style: sort plugin interface

* WIP: UsageCollector for Security Adoption

This uses ML and raw ES calls to query our ML Jobs and Rules, and parse
them into a format to be consumed by telemetry.

Still to come:
* initialization
* tests

* Initialize usage collectors during plugin setup

* Rename usage key

The service seems to convert colons to underscores, so let's just use an
underscure.

* Collector is ready if we have a kibana index

* Refactor collector to generate options in a function

This allows us to test our adherence to the collector API, focusing
particularly on the fetch function.

* Refactor usage collector in anticipation of endpoint data

We're going to have our usage data under one key corresponding to the
app, so this nests the existing data under a 'detections' key while
allowing another fetching function to be plugged into the
main collector under a separate key.

* Update our collector to satisfy telemetry tooling

* inlines collector options
* inlines schema object
* makes DetectionsUsage an interface instead of a type alias

* Extracts telemetry mappings via scripts/telemetry_extract

* Refactor detections usage logic to perform one loop instead of two

We were previously performing two loops over each set of data: one to
format it down to just the data we need, and another to convert that
into usage data. We now perform both steps within a single loop.

* Refactor detections telemetry to be nested

* Extract new nested detections telemetry mappings

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 13:18:47 -05:00
Tiago Costa
fd510ca303
skip flaky suite (#71501) 2020-07-13 19:13:38 +01:00
Scotty Bollinger
41c4f18b89
Workplace Search in Kibana MVP (#70979)
* Add Workplace Search plugin to app

- Adds telemetry for Workplace Search
- Adds routing for telemetry and overview
- Registers plugin

* Add breadcrumbs for Workplace Search

* Add Workplace Search index

* Add route paths, types and shared assets

* Add shared Workplace Search components

* Add setup guide to Workplace Search

* Add error state to Workplace Search

* Add Workplace Search overview

This is the functional MVP for Workplace Search

* Update telemetry per recent changes

- Remove saved objects indexing
- add schema definition
- remove no_ws_account
- minor cleanup

* Fix pluralization syntax

- Still not working but fixed the syntax nonetheless

* Change pluralization method

- Was unable to get the `FormattedMessage` to work using the syntax in the docs. Always added ‘more’, even when there were zero (or one for users). This commit uses an alternative approach that works

* Update readme

* Fix duplicate i18n label

* Fix failing test from previous commit

🤦

* Update link for image in Setup Guide

* Remove need for hash in routes

Because of a change in the Workplace Search rails code, we can now use non-hash routes that will be redirected by rails so that we don’t have users stuck on the overview page in Workplace Search when logging in

* Directly link to source details from activity feed

Previously the dashboard in legacy Workplace Search linked to the sources page and this was replicated in the Kibana MVP. This PR aligns with the legacy dashboard directly linking to the source details

https://github.com/elastic/ent-search/pull/1688

* Add warn logging to Workplace Search telemetry collector

* Change casing to camel to match App Search

* Misc security feedback for Workplace Search

* Update licence mocks to match App Search

* PR feedback from App Search PR

* REmove duplicate code from merge conflict

* Fix tests

* Move varible declaration inside map for TypeScript

There was no other way 🤦

* Refactor last commit

* Add punctuation

Smallest commit ever.

* Fix actionPath type errors

* Update rebase feedback

* Fix failing test

* Update telemetry test after AS PR feedback

* DRY out error state prompt copy

* DRY out telemetry endpoint into a single route + DRY out

DRY out endpoint
- Instead of /api/app_search/telemetry & /api/workplace_search/telemetry, just have a single /api/enterprise_search/telemetry endpoint that takes a product param
- Update public/send_telemetry accordingly (+ write tests for SendWorkplaceSearchTelemetry)

DRY out helpers
- Pull out certain reusable helper functions into a shared lib/ folder and have them take the repo id/name as a param
- Move tests over
- Remove misplaced comment block

+BONUS
- pull out content type header that's been giving us grief in Chrome into a constant

* Remove unused telemetry type

* Minor server cleanup - DRY out mockLogger

* Setup Guide cleanup

* Clean up Loading component

- use EUI vars per feedback
- remove unnecessary wrapper
- adjust vh for Kibana layout
- Actually apply loadingSpinner styles

* Misc i18n fixes

+ minor newline reduction, because prettier lets me

* Refactor Recent Activity component/styles

- Remove table markup/styles - not semantically correct or accessible in this case - replace w flex
- Fix link colors not inheriting
- Add EuiPanel, error colors looked odd against page background
- Fix prop/type definition
- CSS cleanup - EUI vars, correct BEM, don't target generic selectors

* [Opinionated] Refactor RecentActivity component

- Pull out iterated activity items into a child subcomponent
- Move constants/strings closer to where they're being used, instead of having to jump around the file
- Move IActivityFeed definition to this file, since that's primarily where it's used

@scottybollinger - if you're not a fan of this commit no worries, just let me know and we can discuss/roll back as needed

* Refactor ViewContentHeader

- remove unused CSS
- fallback cleanup
- refactor tests

* Refactor ContentSection

- Remove unused CSS classes
- Refactor tests to include all props/more specific assertions

* Refactor StatisticCard

- Prefer using EuiTextColor to spans / custom classes
- Prefer using EuiCard's native `href` behavior over using our own wrapping link/--isClickablec class
- Note that when we port the link/destination over to React Router, we should instead opt to use React Router history, which will involve creating a EuiCard helper
- Make test a bit more specific

* Minor OrganizationStats cleanup

- Use EuiFlexGrid

* Refactor OnboardingSteps

- i18n
    - Compact i18n newlines (nit)
    - Convert FormattedMessage to i18n.translate for easier test assertions
- Org Name CTA
    - Move to separate child subcomponent to make it easier to quickly skim the parent container
    - Remove unused CSS class
    - Fix/add responsive behavior

- Tests refactor
    - Use describe() blocks to break up tests by card/section
    - Make sure each card has tests for each state - zero, some/complete, and disabled/no access
    - Assert by plain text now that we're using i18n.translate()
    - Remove ContentSection/EuiPanel assertions - they're not terribly useful, and we have more specific elements to check
    - Add accounts={0} test to satisfy yellow branch line

* Clean up OnboardingCard

- Remove unused CSS class
- Remove unnecessary template literal

Tests
- Swap out check for EuiFlexItem - it's not really the content we're concerned about displaying, EuiEmptyPrompt is the primary component
- Remove need for mount() by dive()ing into EuiEmptyPrompt (this also removes the need to specify a[data-test-subj] instead of just [data-test-subj])
- Simplify empty button test - previous test has already checked for href/telemetry
- Cover uncovered actionPath branch line

* Minor Overview cleanup

- Remove unused telemetry type
- Remove unused CSS class
- finally
- Remove unused license context from tests

* Feedback: UI fixes

- Fix setup guide CSS class casing
- Remove border transparent (UX > UI)

* Fix Workplace Search not being hidden on feature control

- Whoops, totally missed this 🤦

* Add very basic functional Workplace Search test

- Has to be without_host_configured, since with host requires Enterprise Search
- Just checks for basic Setup Guide redirect for now
- TODO: Add more in-depth feature/privilege functional tests for both plugins at later date

* Pay down test render/loading tech debt

- Turns out you don't need render(), shallow() skips useEffect already 🤦
- Fix outdated comment import example

* DRY out repeated mountWithApiMock into mountWithAsyncContext

+ Minor engines_overview test refactors:
    - Prefer to define `const wrapper` at the start of each test rather than a `let wrapper` - this better for sandboxing / not leaking state between tests
    - Move Platinum license tests above pagination, so the contrast between the two tests are easier to grok

* Design feedback

- README copy tweak + linting
- Remove unused euiCard classes from onboarding card

Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
2020-07-13 13:10:35 -05:00
Paul Tavares
c82ccfedc6
[SECURITY_SOLUTION][ENDPOINT] Sync up i18n of Policy Response action names to the latest from Endpoint (#71472)
* Added updated Policy Response action names to translation file
* `formatResponse` to generate a user friendly value for action name if no i18n
* test case to cover formatting unknown actions
2020-07-13 13:41:49 -04:00
Brent Kimmel
6eeff6bfb4
[Security_Solution][GTV] Add lineage limit warnings to graph (#70097)
* [Security Solution][GTV] Add lineage limit warnings to graph

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: oatkiller <robert.austin@elastic.co>
2020-07-13 13:36:24 -04:00
Kerry Gallagher
4db5816459
[Logs UI] Add category anomalies to anomalies page (#70982)
* Add category anomalies to anomalies page

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 18:09:10 +01:00
Chris Cowan
1a65900e8e
[TSVB] Add support for histogram type (#68837)
* [TSVB] Add support for histogram type

* Merge branch 'master' of github.com:elastic/kibana into issue-52426-tsvb-support-for-histograms

* Adding support to filter ratio; updating test

* Limist aggs for filter_ratio and histogram fields; add test for AggSelect; Fixes #70984

* Ensure only compatible fields are displayed for filter ratio metric aggs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 09:51:43 -07:00
Michael Hirsch
c5729b87d6
[ML] Adds siem_cloudtrail Module (#71323)
* adds siem_cloudtrail module

* updates logo to logoSecurity

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 12:35:04 -04:00
Tiago Costa
3a52eaf7ee
skip flaky suite (#70928) 2020-07-13 17:31:08 +01:00
Liza Katz
56794718c7
Resolve range date filter bugs and improve usability (#71298)
* improve test stability

* Filter date range improvements

* Make onBlur optional

* i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 19:21:34 +03:00
Tiago Costa
e082719870
skip flaky suite (#68400) 2020-07-13 17:12:25 +01:00
Alison Goryachev
105afbce3d
[Component templates] Address feedback (#70912) 2020-07-13 12:10:01 -04:00
Pierre Gayvallet
eac0f8d98d
preserve 401 errors from legacy es client (#71234)
* preserve 401 errors from legacy es client

* use exact import to resolve mocked import issue
2020-07-13 18:03:49 +02:00
Madison Caldwell
ced0023ef9
Mapping adjustments (#71449) 2020-07-13 12:02:29 -04:00
Jonathan Budzenski
94ef03dbd3
Move kibana-keystore from data/ to config/ (#57856)
* Move kibana-keystore from data/ to config/

This is a breaking change to move the location of kibana-keystore.
Keystores in other stack products live in the config directory, so this
updates our current path to be consistent.

Closes #25746

* add breaking changes

* update comment

* wip

* fix docs

* read from both keystore locations, write priority to non-deprecated

* note data directory fallback

* add tests for get_keystore

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 10:56:25 -05:00
Thomas Neirynck
c44f019790
[Maps] Show joins disabled message (#70826)
Show feedback in the layer-settings when the scaling-method does not support Term-joins.
2020-07-13 11:55:36 -04:00
Jonathan Budzenski
2c19feb55f
[os packages] local permission adjustments (#66614)
* outline permissions

* rm keystore setup

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 10:51:30 -05:00
Tiago Costa
b435d46080
skip flaky suite (#71361) 2020-07-13 16:43:40 +01:00
Nicolas Chaulet
17dc0439e2
[Ingest Manager] Add UI to enroll standalone agent (#71288) 2020-07-13 11:33:51 -04:00
Tiago Costa
24edc804c9
Node options from cfg file for production (#62468)
* chore(NA): load NODE_OPTIONS from options files across environments

* chore(NA): move node.ci.options to config folder

* docs(NA): update docs to explain how to set node options from the cfg fil

* chore(NA): removed test npm scripts

* fix(NA): typo on setup script for CI

* chore(NA): add debug info

* chore(NA): export options on CI

* chore(NA): remove debug info

* chore(NA): support for configurable config folder using env var

* chore(NA): add node.options file into docker img

* fix(NA): use calculated config dir on node options for ci

* chore(NA): node bin scripts bootstrap and node_with_options implementation for bash

* chore(NA): complete node_with_options scripts with bat version

* chore(NA): add bin/node dev script and remove cli for run_with_node_options

* chore(NA): increase default maxBuffer

* chore(NA): remove run with options script from package.json

* chore(NA): include kbn-node script and underlying usage of it

* chore(NA): remove change on eslint

* chore(NA): correct typo on kbn node script comment

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): correct typo on kbn node script comment

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): add line to describe each option should be specified in a separated line

* chore(NA): remove node options from dev and ci env

* chore(NA): remove changes from package.json

* chore(NA): fix docker image build

* chore(NA): change value for example of --max-old-space-size in the node.options file

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): remove --no-warnings from node.options and force it in the bin scripts

* chore(NA): prevent 'The system cannot find the file' error message

* chore(NA): introduce slash when building path for %DIR%

* chore(NA): read options from file only if it exists

Co-authored-by: Jonathan Budzenski <jbudz@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
2020-07-13 16:30:03 +01:00
Søren Louv-Jansen
327fed87bb
[APM] Improvements to the ML Settings page (#71309) 2020-07-13 17:21:22 +02:00
spalger
8a4d0d06a5 add old .chromium to gitignore to prevent it from being accidentally committed 2020-07-13 08:16:26 -07:00
Jen Huang
82f6c6a1df
[Ingest Manager] Simplify add/edit package config (integration) form (#71187)
* Match add integration page with designs

* Clean up package config layout code

* Match edit integration config page with designs

* Fix typing and i18n issues

* Add back data test subj

* Add loading UI for second step; code clean up

* Fix limited packages incorrect response

* Add ability to create agent config when selecting config to add integration to

* Add error count to input-level panel; memoize children components

* Add error count next to all advanced options toggles

* Move general form error to bottom bar

* #69750 Auto-expand inputs with required & empty (invalid) vars

* #68019 Enforce unique package config names, per agent config

* Fix typing

* Fix i18n

* Fix reloading when new agent config _wasn't_ created

* Memoize edit integration and fix fields not collapsing on edit

* Really fix types
2020-07-13 08:12:53 -07:00
Luke Elmers
4925a4983a
Ensure Other bucket works on scripted fields. (#71329) 2020-07-13 09:11:11 -06:00
Oliver Gupte
ae231feef7
[APM] Anomaly detection setup link with alert if job doesn't exist (#71229)
* Closes #70440 by adding a setup link to anomaly detection setting in the home header

* PR feedback and type error fix

* Code cleanup and PR feedback

* Modified getEnvironmentUiFilterES return type from `ESFilter | undefined` to `ESFilter[]` for ease of use.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:09:55 -07:00
Oliver Gupte
f0c9915280
[APM] Anomaly detection integration with transaction duration chart (#71230)
* Reintroduces the previous anomaly detection ML integration back into the
transaction duration chart in the service details screen. Support the
latest APM anoamly detection by environment jobs.

* PR feedback

* Code improvements from PR feedback

* handle errors thrown when fetching ml job for current environment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:09:04 -07:00
Jean-Louis Leysens
f0d744e865
inclusive language (#71438) 2020-07-13 17:03:41 +02:00
Nicolas Chaulet
a906c732b0
[Ingest Manager] During fleet setup create an enrollment for every config (#71308) 2020-07-13 11:00:58 -04:00
Stacey Gammon
0a516cfbb9
Improvements to our developer guide (#67764)
* contributing guide -> asciidoc

* Update docs/developer/contributing/index.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* Update docs/developer/best-practices/stability.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* Update docs/developer/contributing/index.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* address code review comments

* Update docs/developer/contributing/development-documentation.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* review comment updates

* fix bad ref

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>
2020-07-13 10:47:01 -04:00
MadameSheema
ddd3a9defd
[SIEM][Detections] Fixes index patterns order (#71270)
* fixes alphabetical order for index patterns

* fixes cypress tests adding the new index pattern

* fixes jest tests

* fixes jest tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 16:03:54 +02:00
Phillip Burch
4bdd31e9c9
[Metrics + Logs UI] Add test for logs and metrics telemetry (#70858)
* Add test for logs and metrics telemetry

* wait before you go

* Remove kubenetes

* Fix type check

* Add back kubernetes test

* Remove kubernetes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:57:42 -05:00
Jorge Sanz
4b9902987f
[Maps] Inclusive language (#71427) 2020-07-13 15:46:07 +02:00
Felix Stürmer
ba195bad36
[Logs UI] Unskip log highlight api integration test (#71058)
This unskips one log highlighting API test, which was skipped due to changes in the Elasticsearch highlighting behavior.
2020-07-13 15:37:10 +02:00
Brent Kimmel
0f9c80d590
[Security_Solution][Resolver] Style adjustments per UX (#71179)
* SQUASH

* WIP 2

* add block formatting on time to related list as well

* M. Sherrier review: untranslate timestamp / remove top border on panel

* redo dep

* CI: replace missing import with type

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 09:26:43 -04:00
Stratoula Kalafateli
06847519f1
[Functional test] Increase the timeout to click new vis function (#71226)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 16:26:33 +03:00
Matthias Wilhelm
84edc361f1
[Discover] Migrate async import of embeddable factory to actual embeddable (#70920) 2020-07-13 15:22:21 +02:00
Joe Reuter
b4737e8185
fix overflow (#70723) 2020-07-13 14:59:16 +02:00
Anton Dosov
f4b4dc5faa
[uiActions] Improve context menu keyboard support (#70705)
* Improves position resolution logic by also tracking last clicked element.
* Adds ownFocus prop, so can pick menu item with keyboard.
* Also track if target element was removed from DOM. In that case tries to use previous element. won't work all the time, but works nicely in case context menu trigger by item in other context menu.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 14:55:11 +02:00
Paul Tavares
a7d3b6d344
[Security Solution][Endpoint] Policy Details handling saving over version changes (http 409) (#71386)
* Handle applying update on latest Package Config if 1st update generated 409
* Unit Tests to cover the handling of http 409
2020-07-13 08:51:36 -04:00