Commit graph

41041 commits

Author SHA1 Message Date
ymao1 cad26537a9
[Alerting] Improving health status check (#93282)
* wip

* Moving catchError so observable stream does not complete. Adding retry on failure

* Using retryWhen. Updating unit tests

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 11:58:20 -05:00
Matthias Wilhelm 51b416b23f
[Discover] Restore context documentation (#90784)
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-03-04 17:24:13 +01:00
Christiane (Tina) Heiligers 70daf8098c
[core-docs] Edits core-intro section for the new docs system (#93540) 2021-03-04 09:18:58 -07:00
Mikhail Shustov 0a33e583cf
add missed codeowners (#89714)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 08:13:20 -08:00
Joe Reuter 1882b82531
fetch node labels via script execution (#93225) 2021-03-04 17:08:26 +01:00
Ece Özalp 3d374e2686
[Security Solution] Adds getMockTheme function (#92840)
Closes elastic/security-team#866.
2021-03-04 10:31:39 -05:00
Thomas Watson 00bad90676
Sort dependencies in package.json correctly (#93590) 2021-03-04 09:54:00 -05:00
Liza Katz f5351e67b6
[Bug] missing timepicker:quickRanges migration (#93409)
* timepicker:quickRanges

* code review

* Change into a 7.12 migration
2021-03-04 16:50:26 +02:00
Wylie Conlon 6512e5ad04
Undo change that added histogram to sample data (#93491)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-04 09:49:52 -05:00
Gidi Meir Morris 79134b3b6d
[Alerting][Docs] Adds Alerting & Task Manager Scalability Guidance & Health Monitoring (#91171)
Documentation for scaling Kibana alerting, what configurations can change, what impacts they have, etc.
Scaling Alerting relies heavily on scaling Task Manager, so these docs also document Task manager Health Monitoring and scaling.
2021-03-04 14:11:53 +00:00
Joe Reuter 462fe0829e
stabilize waiting for visualization (#93469) 2021-03-04 14:56:56 +01:00
Anton Dosov fe1ae92957
Fix wrong import in data plugin causing 100kB bundle increase (#93448) 2021-03-04 05:42:36 -05:00
Alejandro Fernández Gómez a050b7af79
[Fleet] Correctly track install status of an integration (#93464) 2021-03-04 11:01:23 +01:00
István Zoltán Szabó 284a77c7c0
Reviews data frame analytics UI text (#93033)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-03-04 09:09:43 +01:00
Kevin Qualters 89373490d0
Display multiple copyable fields for process.args in resolver node detail panel (#93280) 2021-03-04 00:24:58 -05:00
Davis Plumlee 3316fb43fd
[Security Solution][Detections] ML Popover overflow fix (#93525)
Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
2021-03-03 21:22:05 -05:00
Tiago Costa 2a8e4b260f
chore(NA): do not use execa on bazel workspace status update script (#93532) 2021-03-03 20:16:37 -05:00
Joe Portner 40a3386553
Bump dependencies (#93511) 2021-03-03 19:56:37 -05:00
Spencer 3ba17f284e
[dev/build_ts_refs] support disabling the ts-refs build completely (#93529)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-03-03 19:47:52 -05:00
Angela Chuang a953e90dd4
[Security Solution] fix data provider cypress test (#93465)
## Summary
This PR is to fix data_provider's cypress test: displays the data provider action menu when Enter is pressed.

When I ran it locally, I couldn’t reproduce it every time. There’s a chance that the timeline was opened but the filter we put wasn’t there, this happen when I simulate slow 3G with Chrome or once out of my 10-time-trial with `loop_cypress_tests.js`

[failure 1](https://kibana-ci.elastic.co/job/elastic+kibana+security-cypress/4313/testReport/junit/(root)/displays%20the%20data%20provider%20action%20menu%20when%20Enter%20is%20pressed/timeline_data_providers_displays_the_data_provider_action_menu_when_Enter_is_pressed/)
[failure 2](https://kibana-ci.elastic.co/job/elastic+kibana+security-cypress/4313/testReport/junit/(root)/displays%20the%20data%20provider%20action%20menu%20when%20Enter%20is%20pressed/timeline_data_providers_displays_the_data_provider_action_menu_when_Enter_is_pressed_2/)

How to run this test several times automatically:
1. Go to the file and mark your case with .only
2. Copy the relative path of the file
3. Go to x-pack/plugins/security_solution/package.json Line 13, change —spec to the path you just copied (e.g: ./cypress/integration/timelines/data_providers.spec.ts)
4. Go to Kibana/ and run node x-pack/plugins/security_solution/scripts/loop_cypress_tests.js 1 (1 means run it once, you can put more to check flakiness)
5. After it finishes, it generates you a report under: kibana/target/loop-cypress-tests.txt
6. Search for `displays the data provider action menu when Enter is pressed.` and see if all passes.
2021-03-03 17:27:29 -07:00
Nathan L Smith 4e21faeeb6
Fix service map for All environment single service (#93517)
Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes #93385.
2021-03-03 17:30:08 -06:00
Nicolas Chaulet a61e1dd9fa
[Fleet] Fix package version comparaison in the UI (#93498) 2021-03-03 17:04:52 -05:00
Patrick Mueller 60adc73afa
[alerting] adds doc on JSON-expanded action variables and task manager max_workers (#92720)
resolves https://github.com/elastic/kibana/issues/90006

For task manager, adds a note about the fact that the max_workers will be
limited to 100 starting in 8.0.  Currently we allow any value (because we
always have), but do print a "deprecation" warning that the limit cannot
be exceeded starting in 8.0

For alerting, adds note about the JSON expansion of action variables which are objects.
2021-03-03 16:48:30 -05:00
Spencer ef0931219f
[dev/build_ts_refs] ignore type checking failures when building ts refs (#93473)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-03-03 13:40:07 -07:00
Christiane (Tina) Heiligers c2bfa87664
[core-new-docs] Adds a dev-doc for core documentation (#92976) 2021-03-03 13:37:20 -07:00
Thomas Neirynck a620179151
remove opacity from maps legacy style (#93456) 2021-03-03 15:04:38 -05:00
Marshall Main 4c893985e3
[Security Solution][Lists] Escape quotes in list ids and quote the id in KQL query (#93176)
* Escape quotes in list ids and quote the id in KQL query

* Remove decodeURIComponent because too many KQL queries don't handle quotes

* Add quotes to user supplied IDs for other KQL queries

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 15:02:08 -05:00
Tiago Costa 2d17821f08
Revert "Make tests deterministic by providing unique timestamps (#93350)"
This reverts commit 3ce614fe46.
2021-03-03 19:48:54 +00:00
Wylie Conlon 799c05e0b8
[Discover] Fix link from dashboard saved search to Discover (#92937)
* [Discover] Fix link from dashboard saved search to Discover

* Fix tests that weren't fully testing the navigation

* Fix snapshot

* Fix test navigation to context app by reverting to previous

* Unskip functional test and fix issue in data grid

* Respond to review comments
2021-03-03 14:47:53 -05:00
spalger ef4611d621 update public api docs 2021-03-03 12:29:50 -07:00
Davey Holler c0aa199759
App Search - Polishing Analytics Views (#92939)
* WIP analytics polish

* Working on tests.

* Finishing up tests.

* Updating the engine overview page.

* eslint fixes

* i18n fixes

* Icons feedback

- Remove unused svg file
- Add TODO comment
- Add test coverage

* linting - unnecessary ternaries

* EnginesOverview feedback

TotalCharts
- adjust chart height
- tests: simplify / convert back to shallow

RecentApiLogs
- switch to DataPanel

* DataPanel feedback

Component
- move CSS table bg override out from being an AnalyticsTable concern to a DataPanel concern
  + bem naming, todo comment
- add responsive={false} for better mobile UX
- add className and data-test-subj prop passing
- change title to pass full heading tags rather than a string
- move subtitle below title for better screen reader order
- add index.ts export

Tests
- capitalization for consistency, ordering/describe
- remove data-test-subjs on source code (simpler to grab & inspect tags directly so we can more easily call .text() on passed content)
- add new tests for props (fliled/className/data-test-subj)

Usage
- update other files using DataPanel to start passing heading tags + use index export
- fix RecentApiLogs tests
- change RecentQueries section to use a DataPanel (per Davey)

* Analytics tags - updates & responsive tweaks

Tags
- Rename to more general tags.tsx file
- Add CSS limiting width of variable length tags
- Break up into two separate components for easier readability & testing
- Split up tags column constants so that the wider tables can use the old tags list component

Tables
- add isSmall flag to AnalyticsTable to use new tag count  component
- reduce actions column width
- revert unnecessary table test changes

Analytics
- add custom CSS that switches tables/panels into full-width earlier

* AnalyticsSection fixes

- fix responsive behavior with icon
- add missing AnalyticsSection branch coverage

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
2021-03-03 11:26:05 -08:00
Jonathan Budzenski 294db1086a
[build] Add task skips intended for partial builds (#92679)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:15:17 -06:00
Mikhail Shustov 83023ea992
add a note JSON is in ECS format (#93450) 2021-03-03 20:10:11 +01:00
John Schulz b5522ed30c
[Fleet] Add lint rule/fix for import order groups (#93300)
## Problem
Blocks of 10-15 `import`s are common in the plugin and there a few places which have ~50 lines of `import`s. It makes it more difficult to understand the where/why of what's being imported.

We've had instances while files import from the same module in different lines. i.e.

```ts
import { a } from './file';
... 5-10 lines later
import { b } from './file';
```

## Proposed solution
Add a lint rule to enforce a convention on the module `import` order. This can help in the same way Prettier & ESLint help to format type signatures or other code. It makes it easier to understand or notice any changes in the code. It's also able to be fixed automatically (`node scripts/eslint.js --fix` or any existing "format on save" in an editor).

## This PR
replaces #92980 (based on https://github.com/elastic/kibana/pull/92980#pullrequestreview-601070556)

### Lint rule
f9be98d Add eslint rule to enforce/autofix import group order. Use the same rule as a few other plugins. Groups `import` statements by type as shown in the [lint rule docs](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#importorder-enforce-a-convention-in-module-import-order
). The order is:

  1. node "builtin" modules
  2. "external" modules
  3. "internal" modules
  4. modules from a "parent" directory
  5. "sibling" modules from the same or a sibling's directory, "index" of the current directory, everything else

e.g.

```typescript
import fs from 'fs';
import path from 'path';

import _ from 'lodash';
import chalk from 'chalk';

import foo from 'src/foo';

import foo from '../foo';
import qux from '../../foo/qux';

import bar from './bar';
import baz from './bar/baz';
import main from './';
```
The [lint rule](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#importorder-enforce-a-convention-in-module-import-order) is relatively light handed. It only ensures  the `imports` are groups together in the given order. It doesn't alphabetize or otherwise sort the order of the files.


e.g. imports aren't rewritten to be in alphabetical order. This is fine

```ts
import from './c';
import from './a';
import from './b';
```

The [docs show other options](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md#options) and 2831f02bc7/.eslintrc.js (L1138-L1168) uses many of them

### Newlines option
The newlines settings means a change from something like

```typescript
import fs from 'fs';
import path from 'path';
import _ from 'lodash';
import chalk from 'chalk';
import foo from 'src/foo';
import foo from '../foo';
import qux from '../../foo/qux';
import bar from './bar';
import baz from './bar/baz';
import main from './';
```

to 

```typescript
import fs from 'fs';
import path from 'path';

import _ from 'lodash';
import chalk from 'chalk';

import foo from 'src/foo';

import foo from '../foo';
import qux from '../../foo/qux';

import bar from './bar';
import baz from './bar/baz';
import main from './';
```



Added it as a separate commit 2831f02 in case we want to avoid it, but I believe it's an improvement overall. Especially on the files with 25+ lines of imports. Even the "worst case" of something like this isn't bad (IMO). Especially since it's an automatic reformat like anything else in prettier


```typescript
import fs from 'fs';

import _ from 'lodash';

import foo from '../foo';

import main from './';
```
2021-03-03 13:58:20 -05:00
Jonathan Buttner 9dd395b452
[Security Solution][Case][Bug] Only update alert status in its specific index (#92530)
* Writing failing test for duplicate ids

* Test is correctly failing prior to bug fix

* Working jest tests

* Adding more jest tests

* Fixing jest tests

* Adding await and gzip

* Fixing type errors

* Updating log message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:28:59 -05:00
Devon Thomson 7cf2284580
fixed getIsDirty, used function for disabling save button (#93328) 2021-03-03 13:17:50 -05:00
Wylie Conlon cae9ca4c19
[Field formats] Correctly format numeric histograms outside Discover (#91576)
* [Field formats] Correctly format numeric histograms outside Discover

* Fix types

* Fix types

* Fix failures

* Fix merge issue

* Fix tests

* Fix i18n

* Fix i18n

* Add doc and fix integration

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 13:13:57 -05:00
Wylie Conlon eec777b7ef
[Index patterns] Guarantee order of fields in flattenHits (#93344)
* [Discover] Guarantee order of fields in table preview

* Remove comments

* Fix test that relied on discover ordering

* Fix ordering of test
2021-03-03 13:12:36 -05:00
Jonathan Budzenski 3ad68c1025
[build] Set rpm digest algorithm to sha256 (#93230)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-03 12:07:16 -06:00
Ryland Herrick 3ce614fe46
Make tests deterministic by providing unique timestamps (#93350)
The threat intel data that we are loading for these tests was previously
copy/pasted, resulting in all docs having the same @timestamp value.
This resulted in nondeterministic ordering which manifested as test
failures.

This fixes the issue by giving a unique timestamp to each indicator
document, and then unskips/updates tests according to this new ordering.
2021-03-03 11:53:47 -06:00
Tiago Costa 86f1684076
chore(NA): manage npm dependencies within bazel (#92864)
* chore(NA): full WORKSPACE.bazel logic plus manage yarn dependencies with Bazel

* chore(NA): update BUILD.bazel files comments on root and packages

* chore(NA): add workspace file with useful data

* chore(NA): install deps through bazel

* chore(NA): update workspace file

* chore(NA): update into last rules nodejs

* chore(NA): ensure bazel always run yarn install

* chore(NA): support offline mode

* chore(NA): remove elastic-datemath

* chore(NA): restore bazel 4.0.0

* chore(NA): update kbn pm dist

* chore(NA): introduce force-install command

* docs(NA): update docs with new yarn kbn bootstrap flags

* chore(NA): use path.resolve on kbn bootstrap integrity check verification

* chore(NA): update .yarnrc

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

* chore(NA): change cli argument typo

* chore(NA): fix spacing on kbn pm cli

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
2021-03-03 12:37:20 -05:00
Dima Arnautov a8d45e7457
[ML] fix alert instance key for the single metric job (#93442) 2021-03-03 12:23:10 -05:00
Rashmi Kulkarni a0881f90e2
Test huge fields functional test (#93334)
* fixes https://github.com/elastic/kibana/issues/74449

* fix for unskipping test huge fields functional test

* fix eslint
2021-03-03 09:01:54 -08:00
Joe Reuter 73f8b335e1
[Lens] Add retry and remove unused test (#93233) 2021-03-03 17:56:26 +01:00
Ece Özalp 6467afa615
[Security Solution] Updates redirect route upon rule creation (#92715)
* [Security Solution] Updates redirect route upon rule creation

Closes #82562.
2021-03-03 11:55:11 -05:00
Zacqary Adam Xeper dc6d0b7910
[Metrics UI] Fix removing warning threshold from alert expressions (#93338) 2021-03-03 10:39:38 -06:00
Mikhail Shustov f5e8b108da
Attempt to reduce Core bundle size with type exports. (#92221)
* compile core files as isolated modules

* fix export problems for isolated modules

* apply changes to kbn-test as core imports from it

* fix some exports

* fix lint errors

* update new exports

* fix eslint error

* expand export * where it is possible

* update docs

* update docs

* fix eslint error
2021-03-03 17:21:49 +01:00
Melissa Alvarez ccc70b4960
[ML] Data Frame Analytic: adds api integration tests for _start and _stop endpoints (#92532)
* add start and stop endpoint tests

* add start and stop within spaces endpoint tests

* move start and start_spaces tests to separate files

* wip: move stop and stop_spaces to separate files

* use slow running job config so job is still running when stop request happens

* check started job state is actually started

* check job is stopped after stopping

* add debug logs

* ensure jobs are created/started before stopping attempt

* remove unnecessary debug logs
2021-03-03 11:17:05 -05:00
Spencer bf8417ed1a
[ci] separate checks done in bootstrap as individual tasks (#93329)
(cherry picked from commit b790f4ca1761bc1fab7818318213833a9c7d092f)

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-03-03 08:45:55 -07:00
Marta Bondyra c42b994193
[Lens] Fix unintentional switching to pie (#93219) 2021-03-03 15:39:51 +01:00