Commit graph

37698 commits

Author SHA1 Message Date
ymao1
e7f425a8ab
Fixing flaky test (#81901) 2020-10-28 14:21:41 -04:00
Zacqary Adam Xeper
6272f4e0fd
[Metrics UI] Fix a Chrome bug with Inventory View flickering at certain sizes (#81514)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 13:03:36 -05:00
MadameSheema
d7a78229e4
[Security Solution] Unskips Alerts and Persistent timeline cypress tests (#81898)
* unskips alerts tests

* unskips persistent timeline tests
2020-10-28 17:35:56 +01:00
Constance
eb30e9513d
[Enterprise Search] Add missing Enterprise Search Overview telemetry collectors/schema (#81858)
* Add Enterprise Search cannot connect telemetry event

* Add missing server-side telemetry collectors & schema
2020-10-28 09:23:35 -07:00
Jean-Louis Leysens
ac70e1e944
[ILM] Migrate Cold phase to Form Lib (#81754)
* use form lib fields and start updating deserializer

* delete legacy data tier allocation field

* finished deserialization

* delete legacy serialization, validation and deserialization

* fix type issue and remove propertyOf for now

* fix legacy tests and create another number validator

* added serialization test coverage

* fix https://github.com/elastic/kibana/issues/81697

* clean up remaining legacy tests and slight update to existing test

* remove legacy unused components

* fix copy to be clearer for more scenarios

* remove remaining coldphase interface use and clean up unused i18n

* update default index priority for cold phase

* updated cold phase index priority to 0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 17:10:49 +01:00
Nathan L Smith
333f8732de
APM Experiments settings (#81554)
* Add advanced settings for APM

* Register advanced settings in server startup that show in the Kibana advanced settings UI. (Fixes #81396.)
* Format settings pages to be more consistent.
2020-10-28 10:38:23 -05:00
Robert Austin
2ce942488b
[Resolver] Enable resolver test plugin tests (#81339)
Resolver has a test plugin. It can be found in `x-pack/tests/plugin_functional`. You can try it out like this:
```
yarn start --plugin-path x-pack/test/plugin_functional/plugins/resolver_test/
```
This PR enables automated tests for the test plugin. This ensures that the test plugin will render.
2020-10-28 10:44:25 -04:00
Nathan L Smith
2c1bc50ec0
Add TS project references for inspector (#81792) 2020-10-28 09:01:40 -05:00
Yulia Čech
2a94139d30
Add uri decode to es_ui_shared and fix navigation issues with special characters (#80835)
* 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>
2020-10-28 14:04:32 +01:00
Nicolas Chaulet
415a90fb69
[Fleet] Rename ingestManager translations fleet (#81837) 2020-10-28 08:27:20 -04:00
Felix Stürmer
756c3f16e3
[Logs UI] Transmit and render array field values in log entries (#81385)
Co-authored-by: Alejandro Fernández Gómez <antarticonorte@gmail.com>
2020-10-28 12:53:02 +01:00
Thom Heymann
7e0b9ffad0
Audit Logging: use the original url (#81282) 2020-10-28 11:37:40 +00:00
Kerry Gallagher
3a505a7ed3
[User experience] Fix JS error rate (#81512)
* Query adjustments for getClientMetrics
* Remove error rate from JS errors section
2020-10-28 11:17:34 +00:00
Shahzad
e3f96496a0
[UX] Add median/percentile info in titles (#79824)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 12:16:15 +01:00
Mikhail Shustov
82cf8fd1b3
Support export for SO with circular refs (#81582)
* 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 11:43:07 +01:00
Mikhail Shustov
2782204cc1
Get rid of global types (#81739)
* 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 11:03:04 +01:00
Dario Gieselaar
e160d54970
[APM] Fix precommit script (#81594) 2020-10-28 10:56:51 +01:00
MadameSheema
fb28424b39
skips overview tests (#81877) 2020-10-28 10:50:01 +01:00
Christos Nasikas
44b75685f5
[Security Solution][Case] Fix connector's labeling (#81824)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-28 10:52:55 +02:00
Thomas Neirynck
d869f558c3
[Maps] Fix EMS test (#81856) 2020-10-27 20:32:22 -04:00
Yara Tercero
2788dca390
[Security Solutions][Detections] - Fix bug, last response not showing for disabled rules (#81783)
## 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 20:28:48 -04:00
Tyler Smalley
07930895cf skip flaky suite (#81853) 2020-10-27 14:22:33 -07:00
Nathan L Smith
d1827dc461
Add tsconfig for url_forwarding (#81177)
Also add missing pieces to kibana_react, as a follow-up to #80992.

References #80508
References #81003
2020-10-27 15:18:30 -05:00
Tyler Smalley
5996bc3e3b skip flaky suite (#81844) 2020-10-27 12:58:12 -07:00
Sandra Gonzales
b1aa93f931
check for server enabled (#81818) 2020-10-27 15:08:43 -04:00
Christos Nasikas
30a0323d7a
[Seurity Solution][Case] Create case plugin client (#81018) 2020-10-27 21:01:36 +02:00
Frank Hassanabad
1066602ab7
[Security Solutions][Detection Engine] Changes wording for threat matches and rules (#81334)
## 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)
2020-10-27 12:28:33 -06:00
Frank Hassanabad
59af44bf17 [Security Solution] critical pref bug with browser fields reducer
## 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
2020-10-27 12:11:22 -06:00
ymao1
8b1ff4ca59
[Actions] Adding hasAuth to Webhook Configuration to avoid confusing UX (#81778)
* 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>
2020-10-27 13:34:23 -04:00
Ahmad Bamieh
dab3d394d4
[i18n] add get_kibana_translation_paths tests (#81624)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 19:31:20 +02:00
Shahzad
c0fea3abd9
[UX] Fix search term reset from url (#81654) 2020-10-27 18:23:30 +01:00
Marco Liberati
8f92de860c
[Lens] Improved range formatter (#80132)
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-27 18:08:01 +01:00
Robert Austin
161972ef2c
[Resolver] SideEffectContext changes, remove @testing-library uses (#81077)
* `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-27 12:41:02 -04:00
Devon Thomson
6b1409bc98
[Time to Visualize] Update Library Text with Call to Action (#81667)
* Added call to action to unlink message
2020-10-27 12:39:30 -04:00
Rudolf Meijering
d2a5ebd1fc
[docs] Resolving failed Kibana upgrade migrations (#80999)
* Resolving failed Kibana upgrade migrations

* Move warning against rolling upgrades into upgrade-standard and call out stopping all instances in specific upgrade steps

* Add preventing migration failures section

* Add incompatible xpack.tasks.index: .tasks setting to preventing migration failures

* Fix link

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 17:31:36 +01:00
Spencer
441890ccb3
[ftr/menuToggle] provide helper for enhanced menu toggle handling (#81709)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-27 09:09:41 -07:00
Gidi Meir Morris
5dfa45d666
[Task Manager] adds basic observability into Task Manager's runtime operations (#77868)
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.
2020-10-27 15:58:04 +00:00
Larry Gregory
8fa93bc669
Doc changes for stack management and grouped feature privileges (#80486)
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-10-27 11:41:31 -04:00
Yuliia Naumenko
313c026853
Added functional test for alerts list filters by status, alert type and action type. Did a code refactoring and splitting for alerts tests. (#81422)
* 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 08:39:47 -07:00
Candace Park
8c07eb94e7
[Security Solution][Endpoint][Admin] Malware Protections Notify User Version (#81415) 2020-10-27 09:58:50 -04:00
Ying Mao
9d602e364e Revert "[Actions] Adding hasAuth to Webhook Configuration to avoid confusing UX (#81390)"
This reverts commit fd7f6b5716.
2020-10-27 09:38:36 -04:00
Thomas Neirynck
2d0106d66d
[Maps] Use default format when proxying EMS-files (#79760) 2020-10-27 09:23:07 -04:00
Maja Grubic
3228f7192d
[Discover] Deangularize context.html (#81442)
* [Discover] Deangularize context.html

* Removing snapshot testing

* Applying PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 12:57:15 +00:00
Tim Roes
b3af2e9508
Use the displayName property in default editor (#73311)
* 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>
2020-10-27 13:55:04 +01:00
MadameSheema
7ab5967eb7
adds bug label to Bug report for Security Solution template (#81643) 2020-10-27 13:42:42 +01:00
Walter Rafelsberger
5c40c20585
[ML] Transforms: Remove index field limitation for custom query. (#81467)
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 13:06:42 +01:00
ymao1
fd7f6b5716
[Actions] Adding hasAuth to Webhook Configuration to avoid confusing UX (#81390)
* Adding hasAuth to server and client

* Adding migration and fixing tests

* Fixing test

* Adding spacing

* Adding functional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-27 07:45:02 -04:00
ymao1
e6ab812891
[Task Manager] Mark task as failed if maxAttempts has been met. (#80681)
* 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>
2020-10-27 07:40:44 -04:00
Joe Reuter
db0816f4a1
[Lens] Fix URL query loss on redirect (#81475) 2020-10-27 11:43:56 +01:00
Joe Reuter
2dcfe2a99f
Log reason for 404 in field existence check (#81315) 2020-10-27 11:43:42 +01:00