Commit graph

36111 commits

Author SHA1 Message Date
Nathan L Smith
036622ca0a
Add TS project references for inspector (#81792) (#81903) 2020-10-28 10:57:12 -05:00
Christos Nasikas
6c263f9cba
[Security Solution][Case] Fix connector's labeling (#81824) (#81878)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 17:38:03 +02:00
Dario Gieselaar
1aa508ec0d
[7.x] [APM] Fix precommit script (#81594) (#81883) 2020-10-28 16:12:22 +01:00
Yulia Čech
e22f2b482d
Add uri decode to es_ui_shared and fix navigation issues with special characters (#80835) (#81897)
* Add uri decode to es_ui_shared and fix data stream issue with % name

* Add a test for data streams tab opened for name with a dollar sign

* Import uri decode function from es_ui_shared and fix navigation issues for filters

* Add tests for data streams with special characters in name

* Revert react router navigate changes (is done in a separate PR)

* Reverting changes to dataManagement es client and get data stream api route

* Fix data stream name filter when activated from a url parameter

* Clean up for better consistency and fixes after
https://github.com/elastic/kibana/pull/81664

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 16:02:21 +01:00
Robert Austin
188635f764
[Resolver] SideEffectContext changes, remove @testing-library uses (#81077) (#81811)
* `getBoundingClientRect` is now accessed through `SideEffectContext`.
* `writeText` from the `Clipboard` API is now accessed through the
`SideEffectContext`
* No longer using `@testing-library/react` and `@testing-library/react-hooks`
* No longer using `jest.spyOn` (mostly) or `jest.clearAllMocks`

The motivation for this PR:
* We already have `SideEffectContext`, which is meant to be an alternative to using `jest.spyOn`. This PR uses the `SideEffectContext` for `getBoundingClientRect` and `navigator.clipboard.writeText`.
* We have been using `enzyme` lately. This removes uses of `@testing-library/react` and `@testing-library/react-hooks` in favor of `enzyme`.
2020-10-28 10:45:26 -04:00
Shahzad
1f40479910
[7.x] [UX] Add median/percentile info in titles (#79824) (#81886)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 15:26:06 +01:00
Nicolas Chaulet
4611c7fd3a
[Fleet] Rename ingestManager translations fleet (#81837) (#81895) 2020-10-28 10:08:46 -04:00
Kerry Gallagher
a395952b88
[User experience] Fix JS error rate (#81512) (#81888)
* Query adjustments for getClientMetrics
* Remove error rate from JS errors section
2020-10-28 14:08:10 +00:00
Sandra Gonzales
542423a79d
check for server enabled (#81818) (#81840)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 09:53:34 -04:00
Alejandro Fernández Gómez
8f2a3e159e
[7.x] [Logs UI] Transmit and render array field values in log entries (#81385) (#81892)
Co-authored-by: Alejandro Fernández Gómez <antarticonorte@gmail.com>

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-10-28 14:35:48 +01:00
Mikhail Shustov
e0704ebc02
Support export for SO with circular refs (#81582) (#81885)
* support export for SO with circular refs

* add a test for export to space

* update test case names

* add test with complex deps tree
2020-10-28 16:16:45 +03:00
Mikhail Shustov
3ffd128e57
Get rid of global types (#81739) (#81884)
* move global typings to packages/kbn-utility-types

* update all imports

* add tests

* mute error

* update docs

* ok

* rename kbn-utility-types/test --> kbn-utility-types/jest
2020-10-28 16:16:27 +03:00
Thomas Neirynck
0c5c8c44fa
[Maps] Fix EMS test (#81856) (#81868) 2020-10-28 09:03:09 -04:00
MadameSheema
1b162b273f
skips overview tests (#81877) (#81880) 2020-10-28 12:43:01 +01:00
Marco Liberati
06278dcdec
[7.x] [Lens] Improved range formatter (#80132) (#81826)
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2020-10-28 12:23:31 +01:00
ymao1
9ed004c697
[Actions] Adding hasAuth to Webhook Configuration to avoid confusing UX (#81778) (#81823)
* Adding hasAuth to server and client

* Adding migration and fixing tests

* Fixing test

* Adding spacing

* Adding functional test

* Fixing migration

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 07:22:24 -04:00
Shahzad
1bfa312b84
[7.x] [UX] Fix search term reset from url (#81654) (#81820)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 11:20:27 +01:00
Joe Reuter
d16d005582
Log reason for 404 in field existence check (#81315) (#81743) 2020-10-28 10:11:37 +01:00
Christos Nasikas
3625350410
[7.x] [Seurity Solution][Case] Create case plugin client (#81018) (#81839)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 10:52:30 +02:00
Yara Tercero
37a619149c
[Security Solutions][Detections] - Fix bug, last response not showing for disabled rules (#81783) (#81867)
## Summary

**Bug fix addressed in this PR:**
- fixes https://github.com/elastic/kibana/issues/63203
- in the backend, we were only fetching status data for enabled rules, changed to fetch status data regardles of whether rule is enabled or disabled
2020-10-27 22:43:03 -04:00
Nathan L Smith
c9bd1a335b
Add tsconfig for url_forwarding (#81177) (#81854)
Also add missing pieces to kibana_react, as a follow-up to #80992.

References #80508
References #81003
2020-10-27 18:21:45 -05:00
Lee Drengenberg
a2b4067d29
[7.x] move apps lower in tree, add metricbeat dashboard screenshot test (#79001) (#81851) 2020-10-27 17:47:21 -05:00
Ahmad Bamieh
bc629f6955
[7.x] [i18n] add get_kibana_translation_paths tests (#81624) (#81822)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 00:30:21 +02:00
Frank Hassanabad
7bacd32b68
[Security Solution] critical pref bug with browser fields reducer (#81830)
## Summary


How to test this performance issue? Ensure that you add extra mappings of mapping-test-1k-block-1, 2, 3,4, etc.. that I have included within your advanced settings like below to a Kibana space:

```ts
apm-*-transaction*, auditbeat-*, endgame-*, filebeat-*, logs-*, packetbeat-*, winlogbeat-*, mapping-test-1k-block-1, mapping-test-1k-block-2, mapping-test-1k-block-3, mapping-test-1k-block-4
```

<img width="1331" alt="Screen Shot 2020-10-26 at 11 35 12 AM" src="https://user-images.githubusercontent.com/1151048/97224071-3a904a00-1796-11eb-8870-6de35fc2f115.png">

Modify these lines to add manual perf lines like so for the before numbers:

file: x-pack/plugins/security_solution/public/common/containers/source/index.tsx
```ts
export const getBrowserFields = memoizeOne(
  (_title: string, fields: IndexField[]): BrowserFields => {
    console.time('getBrowserFields'); // Start time
    const value =
      fields && fields.length > 0
        ? fields.reduce<BrowserFields>(
            (accumulator: BrowserFields, field: IndexField) =>
              set([field.category, 'fields', field.name], field, accumulator),
            {}
          )
        : {};
    console.timeEnd('getBrowserFields'); // End time
    return value;
  },
  // Update the value only if _title has changed
  (newArgs, lastArgs) => newArgs[0] === lastArgs[0]
);
```

Then load any of the SIEM webpages or create a detection engine rule and change around your input indexes.

Perf of this before the fix is going to show up in your dev tools console output like this:

```ts
getBrowserFields: 7875.5009765625 ms
```

Now, checkout this branch and change the code to be like so for the perf test of the mutatious version for after:

file: x-pack/plugins/security_solution/public/common/containers/source/index.tsx
```ts
/**
 * HOT Code path where the fields can be 16087 in length or larger. This is
 * VERY mutatious on purpose to improve the performance of the transform.
 */
export const getBrowserFields = memoizeOne(
  (_title: string, fields: IndexField[]): BrowserFields => {
    console.time('getBrowserFields'); // Start time
    // Adds two dangerous casts to allow for mutations within this function
    type DangerCastForMutation = Record<string, {}>;
    type DangerCastForBrowserFieldsMutation = Record<
      string,
      Omit<BrowserField, 'fields'> & { fields: Record<string, BrowserField> }
    >;

    // We mutate this instead of using lodash/set to keep this as fast as possible
    const value = fields.reduce<DangerCastForBrowserFieldsMutation>((accumulator, field) => {
      if (accumulator[field.category] == null) {
        (accumulator as DangerCastForMutation)[field.category] = {};
      }
      if (accumulator[field.category].fields == null) {
        accumulator[field.category].fields = {};
      }
      if (accumulator[field.category].fields[field.name] == null) {
        (accumulator[field.category].fields as DangerCastForMutation)[field.name] = {};
      }
      accumulator[field.category].fields[field.name] = (field as unknown) as BrowserField;
      return accumulator;
    }, {});
    console.timeEnd('getBrowserFields'); // End time
    return value;
  },
  // Update the value only if _title has changed
  (newArgs, lastArgs) => newArgs[0] === lastArgs[0]
);
```

Re-load any and all pages and you should see this now:

```ts
getBrowserFields: 11.258056640625 ms
```

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 15:48:09 -06:00
Frank Hassanabad
bde6b59766
[Security Solutions][Detection Engine] Changes wording for threat matches and rules (#81334) (#81834)
## Summary

Changes the wording for threat matches and rules

cc @marrasherrier @MikePaquette @paulewing

Before:

<img width="1063" alt="Screen Shot 2020-10-21 at 8 52 44 AM" src="https://user-images.githubusercontent.com/1151048/96737354-ce1ee080-137a-11eb-973f-6a7d96f69117.png">

After:
<img width="1055" alt="Screen Shot 2020-10-26 at 10 10 17 PM" src="https://user-images.githubusercontent.com/1151048/97256235-1fdec500-17d8-11eb-8a8b-4adffd23dbdc.png">

### Checklist

- [x] 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)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 15:47:46 -06:00
Tyler Smalley
4155c1f320 skip flaky suite (#81853) 2020-10-27 14:22:36 -07:00
Robert Austin
84d924c206
[Security Solution] reduce optimizer limits (#80997) (#81809)
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2020-10-27 17:14:25 -04:00
Nathan L Smith
53b4a3d39e
Use Storybook Controls instead of Knobs (#80705) (#81398)
* Change an example in embeddable to use controls instead of knobs
* Add controls to SyncBadge APM story
* Convert both to [CSF](https://storybook.js.org/docs/react/api/csf)
* Remove the Knobs addon from the default Storybook configuration

Do not remove the Knobs addon package, since Canvas is still using it and this does not change anything in Canvas.
2020-10-27 15:20:56 -05:00
Tyler Smalley
b73c39cc31 skip flaky suite (#81844) 2020-10-27 12:58:16 -07:00
Devon Thomson
a6436b1c2b
[Time to Visualize] Update Library Text with Call to Action (#81667) (#81807)
* Added call to action to unlink message
2020-10-27 15:36:06 -04:00
Gidi Meir Morris
fc04417d81
[Task Manager] adds basic observability into Task Manager's runtime operations (#77868) (#81808)
This PR adds an an internal monitoring mechanism in Task Manager which keep track of a variety of metrics and a health api endpoint which makes the monitored statistics accessible.
# Conflicts:
#	x-pack/test/plugin_api_integration/test_suites/task_manager/index.ts
2020-10-27 18:15:26 +00:00
Spencer
4267321681
[7.x] [ftr/menuToggle] provide helper for enhanced menu toggle handling (#81709) (#81800)
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	test/functional/services/common/test_subjects.ts
2020-10-27 10:44:11 -07:00
Yuliia Naumenko
f3e6671d1e
Added functional test for alerts list filters by status, alert type and action type. Did a code refactoring and splitting for alerts tests. (#81422) (#81794)
* Added functional test for alerts list filters by status, alert type and action type. Did a code refactoring and splitting for alerts tests.

* -

* fixed failing tests

* fixed type checks

* minor naming fixes
2020-10-27 10:17:52 -07:00
Matthew Kime
41206e10e4
Index Patterns API - Remove legacy es client usage for field caps (#80116) (#81784)
* remove legacy es client usage
2020-10-27 11:41:40 -05:00
Søren Louv-Jansen
1424fdfffd
[APM] Unskip test (#81574) (#81773) 2020-10-27 17:11:39 +01:00
Larry Gregory
7745a54cb6
[7.x] Doc changes for stack management and grouped feature privileges (#80486) (#81795)
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
# Conflicts:
#	docs/images/intro-spaces.jpg
2020-10-27 11:54:41 -04:00
Lukas Olson
b947f35200
[data.search] Skip async search tests in build candidates and production builds (#81547) (#81705)
* Skip async search tests in build candidates and production builds

* Add log when skipping
2020-10-27 08:51:57 -07:00
Thomas Neirynck
aee72ffa81
[Maps] Use default format when proxying EMS-files (#79760) (#81767) 2020-10-27 11:25:46 -04:00
Tim Roes
080b62aada
Use the displayName property in default editor (#73311) (#81763)
* Use displayName in field list in visualize editor

* Set key in combo box

* Fix jest tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 15:53:23 +01:00
Maja Grubic
61ac72e5ee
[Discover] Deangularize context.html (#81442) (#81765)
* [Discover] Deangularize context.html

* Removing snapshot testing

* Applying PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 14:40:30 +00:00
Walter Rafelsberger
25e102a850
[ML] Transforms: Remove index field limitation for custom query. (#81467) (#81755)
The query bar originally developed for the transforms wizard didn't work with indices with more than 1024 fields. In that case we disabled the query bar and showed an info-callout. Since we moved on to make use of the KQL query bar, this limitation does no longer exist so this PR removes the limitation.
2020-10-27 14:57:06 +01:00
Xavier Mouligneau
786ddfb893
[SECURITY SOLUTIONS] Bugs overview page + investigate eql in timeline (#81550) (#81708)
* fix overview query to be connected to sourcerer

* investigate eql in timeline

* keep timeline indices

* trusting what is coming from timeline saved object for index pattern at initialization

* fix type + initialize old timeline to sourcerer

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 09:31:45 -04:00
Joe Reuter
7f27785fbf
[Lens] Fix URL query loss on redirect (#81475) (#81744) 2020-10-27 14:30:27 +01:00
ymao1
89ec824b3c
[Task Manager] Mark task as failed if maxAttempts has been met. (#80681) (#81750)
* wip

* Adding updateFieldsAndMarkAsFailed function

* Updating UBQ

* Only updating retryAt if marking as claiming

* Updating query

* Updating query to only fail one time tasks that have exceeded max attempts

* Fixing tests

* Fixing tests

* Handling claiming tasks by id

* Removing unused function

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 09:27:03 -04:00
Mike Côté
c87aa132d4
Fix previousStartedAt by not changing when execution fails (#81388) (#81670)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 07:51:45 -04:00
Jean-Louis Leysens
79aa050cd4
[ILM] Migrate Warm phase to Form Lib (#81323) (#81735)
* migrate all fields on warm phase except, data alloc, replicas and shrink

* introduce edit policy context to share original policy and migrate shrink and replicas fields

* Refactored biggest field; data allocation

Copied the entire field for now duplicating all of the components

* remove unused import

* complete migration of new serialization

* Remove last vestiges of legacy warm phase

- also removed policy serialization tests for warm phase

* fix existing test coverage and remove use of "none" for node attribute

* added policy serialization tests

* remove unused translations

* Fix use of useFormData after update

- also minor refactor to use useCallback in policy flyout now
  that getFormData changes when the form data changes.

* fix import path

* simplify serialization snapshot tests

* type phases: string -> phases: Phases

* Addressed some PR review items

- refactor toggle click to take a boolean arg
- refactor selection options in data tier component to use a func
  to get select options.

* updated data tier callout logic after new changes

* getPolicy -> updatePolicy

Also rather deconstruct the validate fn from the form object

* fix detection of migrate false and refactor serialization to pure function

* fix type issue

* fix for correctly detecting policy data tier type

- with jest tests see origin here:
https://github.com/elastic/kibana/pull/81642

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 11:47:39 +01:00
Sébastien Loix
d0528b1347
[7.x] [Mappings editor] Add scaled_float and date_range comp integration tests (#81287) (#81317)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 08:52:31 +01:00
Frank Hassanabad
a9746e1db2
[Security Solutions][Detection Engine] Fixes critical bug with error reporting that was doing a throw (#81549) (#81728)
## Summary

Fixes an error where it was expecting some data structures on an ES error but there wasn't in some cases.

Before:
<img width="2246" alt="Screen Shot 2020-10-22 at 1 04 35 PM" src="https://user-images.githubusercontent.com/1151048/96940994-7d98a780-148e-11eb-93bd-77e4adf42896.png">

After:
<img width="2229" alt="Screen Shot 2020-10-22 at 5 45 31 PM" src="https://user-images.githubusercontent.com/1151048/96941005-84bfb580-148e-11eb-989f-1dae6892e641.png">

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2020-10-27 00:58:52 -06:00
Catherine Liu
3fa4f3b703
[Home] Fixes Kibana app description order on home page and updates Canvas copy (#80057) (#81691)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-26 23:40:21 -07:00
Tyler Smalley
dd49b7ebf7
[CI] Preparation for APM tracking on CI (#80399) (#81694)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-10-26 22:51:06 -07:00