Commit graph

37824 commits

Author SHA1 Message Date
Joe Portner fb1c7d7048
Fix saved object share UI bugs regarding read-only privileges (#81828) 2020-11-03 23:07:39 -05:00
Tyler Smalley 286dbcae3a
[test] Updates rollup test to allow incoming doc_count field mapper (#82547)
* [test] Updates rollup test to allow incoming doc_count field mapper

A doc_count field mapper was added in
https://github.com/elastic/elasticsearch/pull/64503

This is currently failing the ES promotion. After this promotion, we can
go back and update this test to be an exact match on the body if we
think that is the desired assertion.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-03 18:00:14 -08:00
Quynh Nguyen b8307b498c
[ML] Add probability values in decision path visualization for classification data frame analytics (#80229)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 18:47:21 -06:00
Garrett Spong 74463a42f1
[Security Solution][Detections] Fixes bulk alert status update to only update alerts within the defined daterange (#82071)
## Summary

Addresses https://github.com/elastic/kibana/issues/82004 where updating an alerts status would result in all alerts being updated as the request is sent without the necessary daterange filter.

##### Before:
<details><summary>Query</summary>
<p>

``` json
  {
    "conflicts": "proceed",
    "status": "open",
    "query": {
      "bool": {
        "must": [],
        "filter": [
          { "match_all": {} },
          { "term": { "signal.status": "closed" } }
        ],
        "should": [],
        "must_not": [
          { "exists": { "field": "signal.rule.building_block_type" } }
        ]
      }
    }
  }
```
</p>
</details>
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/97628470-5db73580-19f2-11eb-8e51-61e428e7804f.gif" />
</p>


##### After:
<details><summary>Query</summary>
<p>

``` json
  {
    "conflicts": "proceed",
    "status": "closed",
    "query": {
      "bool": {
        "must": [],
        "filter": [
          {
            "bool": {
              "filter": [
                {
                  "bool": {
                    "should": [
                      {
                        "range": {
                          "@timestamp": { "gte": "2020-10-29T20:17:23.357Z" }
                        }
                      }
                    ],
                    "minimum_should_match": 1
                  }
                },
                {
                  "bool": {
                    "should": [
                      {
                        "range": {
                          "@timestamp": { "lte": "2020-10-29T20:17:40.097Z" }
                        }
                      }
                    ],
                    "minimum_should_match": 1
                  }
                }
              ]
            }
          },
          { "term": { "signal.status": "open" } }
        ],
        "should": [],
        "must_not": [
          { "exists": { "field": "signal.rule.building_block_type" } }
        ]
      }
    }
  }
```
</p>
</details>
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/97628955-0796c200-19f3-11eb-9ec3-2a6ace17160b.gif" />
</p>



### 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-11-03 16:34:07 -07:00
Justin Ibarra 4323357ef8
[Detection Rules] Add 7.10 rules - v3 (#82214) 2020-11-03 14:33:39 -09:00
Frank Hassanabad 0bf7e32c40
Fixes ui strings around threat matching/mapping (#82510)
## Summary

Fixes the UI strings around the threat matching feature.

* Changes the wording in area of `threat query` to `Indicator index query`
* Uses sentence casing according to the [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing) instead of capitals on each word which was inconsistent.

Before in the about box:
<img width="1188" alt="Screen Shot 2020-11-03 at 1 57 06 PM" src="https://user-images.githubusercontent.com/1151048/98040659-dd237b00-1ddd-11eb-9750-7cf316deddd0.png">

After:
<img width="1212" alt="Screen Shot 2020-11-03 at 2 02 31 PM" src="https://user-images.githubusercontent.com/1151048/98040684-e6144c80-1ddd-11eb-90b4-853b97678618.png">

Before when creating/editing a threat match where I was using capital letters that were inconsistent:
<img width="1165" alt="Screen Shot 2020-11-03 at 2 08 33 PM" src="https://user-images.githubusercontent.com/1151048/98040774-18be4500-1dde-11eb-8c83-b7562191644b.png">

After where I use sentence case:
<img width="1054" alt="Screen Shot 2020-11-03 at 2 02 20 PM" src="https://user-images.githubusercontent.com/1151048/98040820-2c69ab80-1dde-11eb-96fb-c04644e90e3a.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-11-03 16:07:39 -07:00
John Schulz 13dae5e5fa
Switch to new 'as const' + typeof + ValueOf approach (#82499)
## Summary

Follow pattern from #82188. Same behavior as now. Stronger type safety.

 * `installationSources` is runtime value (JS object)
 * `InstallationSource` is TS type (`typeof installationSources`)
 * `ValueOf<InstallationSource>` is TS union type `'installed' | 'not_installed'`
 * Can access values directly as `installationSources.Installed` (JS) or `InstallationSource['Installed']` (TS)
2020-11-03 17:56:06 -05:00
Spencer 0fec6cbc00
[ci] run server integration tests (#81698)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 15:50:01 -07:00
CJ Cenizal 25f680e85b
Add more prompts to 8.0 breaking change issue template. (#82184) 2020-11-03 14:20:00 -08:00
Tyler Smalley 9f776a2342 skip flaky suite (#75127) 2020-11-03 13:52:30 -08:00
Tyler Smalley eeb314e2db
Prevent incompatable upgrade of crypto-policies (#82475)
An upgrade of crypto-policies is incompatible with libnss as it removes
`/usr/bin/update-crypto-policies` being used.

A follow-up issue has been created to track removing this pinning https://github.com/elastic/kibana/issues/82474

Signed-off-by: Tiago Costa <tiago.costa@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-03 13:00:35 -08:00
Scotty Bollinger 39ce0cdd11
[Enterprise Search] Migrate shared CredentialItem component (#82471) 2020-11-03 14:30:28 -06:00
Marta Bondyra 6689167b64
[Lens] Drag within dimension group to reorder (#80547) 2020-11-03 21:18:44 +01:00
John Schulz e54d2c0f11
[Ingest Manager] Replace logs/metrics strings with const (#82424)
## Summary

Use new runtime & type values added in https://github.com/elastic/kibana/pull/82231 (related to #82188 ) instead of strings. Same results. Stronger type safety.

Some before/after pics below:

<img width="680" alt="Screen Shot 2020-11-03 at 6 40 04 AM" src="https://user-images.githubusercontent.com/57655/97989501-9ff2c500-1dac-11eb-8a2d-96ddadfe2477.png">
<img width="525" alt="Screen Shot 2020-11-03 at 6 40 19 AM" src="https://user-images.githubusercontent.com/57655/97989503-a08b5b80-1dac-11eb-97ee-371a0487fbd3.png">

<img width="790" alt="Screen Shot 2020-11-03 at 7 47 42 AM" src="https://user-images.githubusercontent.com/57655/97989505-a08b5b80-1dac-11eb-9db9-54a2719a85b2.png">
<img width="738" alt="Screen Shot 2020-11-03 at 7 47 34 AM" src="https://user-images.githubusercontent.com/57655/97989504-a08b5b80-1dac-11eb-8d1d-692feafd5fe3.png">


<img width="778" alt="Screen Shot 2020-11-03 at 7 54 17 AM" src="https://user-images.githubusercontent.com/57655/97989507-a123f200-1dac-11eb-879d-ab9be4e060eb.png">
<img width="813" alt="Screen Shot 2020-11-03 at 7 54 45 AM" src="https://user-images.githubusercontent.com/57655/97989508-a123f200-1dac-11eb-8725-c44068d6b233.png">
2020-11-03 15:06:48 -05:00
Patryk Kopyciński 1117800c8e
[Security Solution] Fix host details query when missing IP (#78912) 2020-11-03 20:50:38 +01:00
Robert Austin f2aad1201f
[Resolver] Screenshot the nodes of the test plugin. (#81405)
This PR adds screenshot comparison tests for the nodes in the graph on the test plugin.
Run the tests using this command:
`yarn test:ftr --config x-pack/test/plugin_functional/config.ts --grep Resolver`
2020-11-03 14:49:37 -05:00
Mike Côté eb43158bdd
Add descriptions to alert types (#81850)
* Initial attempt at adding descriptions to alert types

* Fix typecheck failures

* Fix i18n check

* Fix failing jest test

* Fix i18n check again

* Apply changes for Uptime

* Update x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Update x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Fix jest test

* Update geo threshold description

* Update description of some alert types based on feedback from Gail

* Update description of some alert types based on feedback from Gail

* Fix i18n

* Fix i18n

* Fix ESLint

* Update some copy

* Update uptime alert description

* Fix typos

Co-authored-by: Casper Hübertz <casper@formgeist.com>
2020-11-03 14:09:41 -05:00
Tyler Smalley ca53f774ba skip flaky suite (#82445) 2020-11-03 11:00:46 -08:00
CJ Cenizal b770e82106
[Remote clusters] Reorganize test files (#82362)
* Refactor Remote Clusters client integration tests for readability.
- Colocate helpers with test files.
- Remove default API responses from HTTP response mocking functions to make behavior clearer at call sites.
2020-11-03 10:57:43 -08:00
Constance adf0e249c7
[Enterprise Search] Telemetry: refactor to Kea logic file (#81926)
* Add new TelemetryLogic helpers

- DRYs out need to import/pass http lib
- adds product-specific helpers which DRYs out an extra line

* Update all previous sendTelemetry fns to use new logic actions

* Update unit tests for updated components

- Create reusable mocks
- Update overview_logic.ts to use new Kea mock helpers (required for recent_activity.test to pass)

* Cleanup: Remove old sendTelemetry fn
+ update tests

* [PR feedback] Correctly assert the async thrown error
2020-11-03 10:48:44 -08:00
gchaps ac331482aa
[DOCS] Updates index patterns docs (#81864)
* [DOCS] Updates index patterns docs

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Update docs/management/index-patterns.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* [DOCS] Incorporates review comments

* [DOCS] Incorporated edits

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-11-03 10:17:55 -08:00
Jason Stoltzfus 9259b1f61a
[Enterprise Search] Added App Search log settings routes (#82162) 2020-11-03 12:57:50 -05:00
Scotty Bollinger 77f56a239f
[Workplace Search] Migrate shared LicenseBadge component (#82372)
* [Enterprise Search] Migrate shared LicenseBadge component

* Move files to Workplace Search dir

I mistakenly thought these were shared at the Enterprise Search level
2020-11-03 11:28:48 -06:00
Clint Andrew Hall c974f56e1c
Team:Presentation Code Owners and automation changes (#82343)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 10:32:47 -06:00
Matthias Wilhelm 82ee8ae6c4
[Discover] Unskip functional sidebar test (#81188) 2020-11-03 17:24:55 +01:00
Stratoula Kalafateli 593a607be0
[TableListView] Fix table scope issues (#82105)
* [TableListView] Fix table scope issues

* Replace the default tableCaption with another one that describes what the table does

* Make the accessibility props required in order to always add them in the future

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 18:21:24 +02:00
Shahzad 6f6c2cf042
[Uptime] Add-aria-labels-for-filter-inputs (#82249) 2020-11-03 16:43:07 +01:00
James Gowdy a0fded52eb
[ML] Adding space aware jobs (#77916)
* [ML] Adding space aware jobs

* adding mlClient

* switching to type includes

* adding additional job checks

* fixing conflict

* adding dfa checks

* refactoring jobs in spaces checks

* filtering calendars

* adding initial job object status and repair endpoints

* enabling repair endpoint

* fixing listed jobs in status

* adding datafeed repair

* updating shared services

* adding results job id check

* fixing conflicts

* don't remove SO on delete

* fixing non-ml plugins

* filtering job audit messages

* fixing types

* fixing tests

* adding job ids wildcard support

* removing empty migration test

* fixing tests and disabling spaces test user

* adding saved objects all permission

* fixing calendars

* updating job 404

* updating job wildcard search

* renaming services

* fixing conflicts

* fixing log tests

* disabling apm test

* skipping more apm tests

* optimzing repair

* fixing types

* updating apm test archive to include ML saved objects

* enabling disabled test

* removing comment

* adding space assigning endpoints

* adding saved object default permissions

* removing commented code

* loading all jobs for all spaces for status check

* adding spaces list endpoint

* adding job spaces to management page

* adding trained model fltering

* fixing trained model id check and job wildcard check

* fixing types

* fixing bug when adding new job to calendar

* changes based on review

* updating schema

* changes based on review

* fixing types

* rolling back http service injection

* fixing http service injection

* adding errrors to repair endpoint response

* updating api doc

* improving types

* disabling id check on ad get endpoints

* fixing tests

* fixing group requests

* adding comments

* using filter in saved object search

* fixing fake request issue

* removing console log

* making job saved object hidden

* removing acccidentally included file

* renaming saved object client

* updating apidoc

* unhiding ml saved objects

* moving route guard

* improving error when SOC is null

* fixing types after merge with master

* fixing tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 15:34:35 +00:00
Robert Oskamp 2db4244efc
Fix report name of api_integration_basic test suite (#82422)
This PR fixes a copy/paste mistake in the report name of the api_integration_basic test suite.
2020-11-03 15:58:41 +01:00
Tyler Smalley 19ab542c4f skip flaky suite (#82035) 2020-11-03 06:57:06 -08:00
Stratoula Kalafateli 2f0fcddbcd
[Visualizations] Fix Moving Avg help link in Vis Editor (#82423) 2020-11-03 16:56:33 +02:00
Jason Stoltzfus 0317fd8137
Added Settings page to App Search (#82061) 2020-11-03 09:45:48 -05:00
John Schulz 58a5b1f5b9
[IngestManager] Convert AgentPolicyStatus from enum to type (#82186)
## Summary

Expands on pattern added in https://github.com/elastic/kibana/pull/82188

Split `enum AgentPolicyStatus` into `type AgentPolicyStatus` and JS value `agentPolicyStatuses`. Still have type safety

<img width="604" alt="Screen Shot 2020-11-02 at 6 05 29 PM" src="https://user-images.githubusercontent.com/57655/97929572-7ba8d100-1d37-11eb-88db-3785381ebfbf.png">
<img width="931" alt="Screen Shot 2020-11-02 at 6 08 41 PM" src="https://user-images.githubusercontent.com/57655/97929574-7ba8d100-1d37-11eb-8db5-ee5d07d171c6.png">
<img width="605" alt="Screen Shot 2020-11-02 at 6 09 02 PM" src="https://user-images.githubusercontent.com/57655/97929575-7c416780-1d37-11eb-8297-e90ffe695161.png">
2020-11-03 09:43:21 -05:00
Thomas Watson bbfcebd4bd
Sort and clean up dependencies in package.json (#82404) 2020-11-03 15:22:48 +01:00
Tiago Costa 3c075d5d44
chore(NA): hard code @kbn/ui-framework in the create package json task (#82399) 2020-11-03 14:09:04 +00:00
John Schulz a49473b05e
[Ingest Manager] Replace AgentAssetType enum with new approach (#82387)
## Summary

Expands on pattern added in #82188

`AgentAssetType` `enum` is only used as part of a single type definition
2020-11-03 08:37:31 -05:00
Joe Reuter d8c37fe890
[Lens] Reload on change via history object (#81753) 2020-11-03 14:29:56 +01:00
Matthias Wilhelm 677b373ade
[Discover] Remove visualize dependency (#82248) 2020-11-03 14:22:18 +01:00
Alison Goryachev 77264074ad
Add best practices section to test_utils readme (#82393) 2020-11-03 08:16:09 -05:00
Georgii Gorbachev 1c4cd33c3e
[Security Solution][Detections] Fix "Severity override" dropdowns in "Create new rule" -> "About rule" (#82271)
We use `EuiComboBox` in all "Severity override" dropdowns (which are called `FieldComponent` and `AutocompleteFieldMatchComponent`). The issue with `EuiComboBox` is that it doesn't handle long text in the placeholder properly. In the https://github.com/elastic/kibana/issues/81284 you can see the placeholders' text being split into multiple lines that gives this messy effect.
2020-11-03 14:05:12 +01:00
ymao1 ae007c2e8a
[Alerting] Return alert execution status rollup from _find API (#81819)
* wip

* wip

* Adding aggregation option to find function and using those results in UI

* Requesting aggregations from client instead of hard-coding in route

* alert_api test

* i18n fix

* Adding functional test

* Adding unit test for filters

* Splitting into two API endpoints

* Fixing test

* Fixing test

* Adding comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 07:26:44 -05:00
John Schulz c2af3aa5d3
[Ingest Manager] Add code required for APM (#68043)
# Using APM for server traces
Kibana ships with the [Elastic APM Node.js Agent](https://github.com/elastic/apm-agent-nodejs) built-in for debugging purposes.  We don't currently merge this to release builds, but it can be very helpful to diagnose or confirm the flow & timing of a request traveling through multiple services. 

To use it in Fleet, 
  1. Import the shared apm instance as needed (HTTP handler, service layer, etc)
    `import { apm } from '../path/to/ingest_manager/server'`
  1. add <code>apm.startTransaction</code> and/or <code>apm.startSpan</code></summary>
      - One example from `reporting` plugin: 
      a537f9af50/x-pack/plugins/reporting/server/export_types/png/execute_job/index.ts (L30-L31)
      - <details><summary>an example for <code>startTransaction</code></summary> <a href="https://www.elastic.co/guide/en/apm/agent/nodejs/current/transaction-api.html"><code>Transaction</code> docs</a><p><img width="700" alt="Screen Shot 2020-11-02 at 9 06 50 AM" src="https://user-images.githubusercontent.com/57655/97877262-e7b11800-1cea-11eb-9883-aeb4fb6b4554.png"></details>
      - <details><summary>an example for <code>startSpan</code></summary><a href="https://www.elastic.co/guide/en/apm/agent/nodejs/current/span-api.html"><code>Span</code> docs</a><p><img width="1008" alt="Screen Shot 2020-06-02 at 9 15 42 PM" src="https://user-images.githubusercontent.com/57655/83584866-590b5580-a516-11ea-8133-286353000d5c.png"></details>
  1. start Kibana with APM enabled (as described in [Instrumenting with Elastic APM](https://github.com/elastic/kibana/blob/master/docs/developer/getting-started/debugging.asciidoc#instrumenting-with-elastic-apm))
      - <details><summary>via env variable or <code>config/apm.dev.js</code></summary>
        <code>ELASTIC_APM_ACTIVE=true yarn start</code>
        <p>or <code>module.exports = {
          active: true,
        };</code>
        </details>
      - By default traces are sent to a remote server, but you can send to a local APM by setting the <code>serverUrl</code> value in  <code>config/apm.dev.js</code>
  1. Run the code where you added the annotations e.g. make an HTTP request
  1. Go to `/app/apm#/traces` and see your trace
    search filter by host, transaction result, etc
      <details><summary>example screenshot</summary><img width="1932" alt="Screen Shot 2020-05-14 at 11 00 30 AM (1)" src="https://user-images.githubusercontent.com/57655/97907678-a123e380-1d13-11eb-93bf-bb22d189fb25.png"></details>
### Checklist

Delete any items that are not applicable to this PR.

- [x] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-11-03 06:18:29 -05:00
John Schulz e916a1d70c
[Ingest Manager] Replace OutputType enum with separate type and runtime object (#82230)
## Summary

Expands on pattern added in https://github.com/elastic/kibana/pull/82188

### rutime value is now `outputType.Elasticsearch` (lowercase b/c JS value)

```diff
-  type: OutputType.Elasticsearch,
+  type: outputType.Elasticsearch,
```

<img width="821" alt="Screen Shot 2020-11-02 at 4 46 24 PM" src="https://user-images.githubusercontent.com/57655/97923244-ae4ccc80-1d2b-11eb-9cc9-d98636ca9a40.png">
<img width="594" alt="Screen Shot 2020-11-02 at 4 46 35 PM" src="https://user-images.githubusercontent.com/57655/97923245-aee56300-1d2b-11eb-917e-483a68280e8e.png">
<img width="429" alt="Screen Shot 2020-11-02 at 4 46 47 PM" src="https://user-images.githubusercontent.com/57655/97923246-aee56300-1d2b-11eb-964a-37b496211167.png">

### TS type is `OutputType`
#### Can get union type of values with `ValueOf<OutputType>`
<img width="455" alt="Screen Shot 2020-11-02 at 4 47 31 PM" src="https://user-images.githubusercontent.com/57655/97923247-aee56300-1d2b-11eb-8492-40a9367ad90e.png">

#### Or access as `OutputType['Elasticsearch']`
2020-11-03 06:15:45 -05:00
Alexey Antonov ffc4ba2514
[Step 2] Use Observables on server search API (#80709)
* [Step 2] Use Observables on server search API

* apply some suggestions

* use concatMap instead of expand

* update docs

* cleanup

* fix PR comments

* remove AsyncOptions

* remove $config from eql_search_strategy

* remove $config from es_search_strategy

* remove DoSearchFnArgs, SearchMethod

* some work

* fix docs

* remove waitForCompletion param

* cleanup

* some work

* fix circular imports

* Update src/plugins/data/server/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update src/plugins/data/common/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update src/plugins/data/common/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Update x-pack/plugins/data_enhanced/common/search/es_search/es_search_rxjs_utils.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* fix PR comments

* update docs

* apply suggestions

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 12:43:32 +03:00
Pierre Gayvallet d4b2a5145a
SavedObjects tagging MVP (#79096)
* create xpack plugin skeleton, start to implement management section

* add tag creation modal

* first implementation of the tags table

* use InMemoryTable

* add edit modal and delete action

* update plugin list

* add tag list, fix types

* add capabilities check on client-side

* add tag combo box component

* add missing i18n keys

* fix privilege FTR tests

* add base structure for FTR tests

* fix feature ftr test

* use string literals for i18n

* create savedObjectsTaggingOss plugin, move API types to oss plugin, start to wire to SO management page.

* update plugin list

* fix types

* allow to use `_find` with multiple references

* add FTR test for _find API on references fields

* add _find integration tests

* update generated doc

* start to implement tag filtering on SO management section

* update generated docs

* wire tagging API to dashboard listing page

* fix i18n namespace

* fix type & tests

* update dashboard listing snapshots

* adapt FTR listingTable service to search for parsable queries

* wite tagging API to visualize listing

* update tagging plugin limits

* add server-side and client-side validation for tag create/edit

* rename title field to name

* fix types

* fix types bis

* add removeReferencesTo API to SOR/SOC

* update generated doc

* add server-side unit test for `savedObjectsTagging` plugin

* move tagging API types to its own file

* add savedObjectsTaggingOss mock

* add tags_cache tests

* add tests for client-side tag client

* extract uiApi to distinct files

* various API improvements

* add more tests

* add link between tag and so management sections + add connection counts

* add base functional test suite for tagging

* add more FTR tests

* improve feature control func test

* update codeowners

* update generated doc

* fix access to proxy modal

* adapt SO save modal to allow to add tag field

* add SO decorator registry and tag implementation

* add unit tests for SO tag decorator

* add functional tests for visualize integration

* add tag SO read permission for vis/dash feature

* add RBAC api integ tests

* add API integration tests

* add test for getTagConnectionsUrl

* add SOM test suite

* add dashboard integration suite

* remove test line

* add missing unit tests

* improve API types doc

* fix create modal save button label

* remove console.log

* improve doc

* self review

* add refresh interval for tag cache

* improve page object doc

* minor cleanup

* address review comments

* small layout fixes

* add initial focus

* use lazy accessor for tag request handler context

* adapt SOM export and export route to handle references

* remove icon from feature config due to master changes

* fix SO table tests

* update generated docs

* sort tags by name in filter dropdown and listing component

* wire SO tagging to dashboard save modal

* fix types

* - add 'create tag' action in tag selector
- add notifications on update/create/delete from management
- delete modal wording

* add description max length validation

* remove real-time validation

* fix i18n bundle id

* update expected size of savedObjectsTagging plugin

* use own useIfMounted

* update limit again, contract components cannot be lazy loaded atm.

* math is hard

* remove single usage of lodash for bundle size

* add async imports for create/edit modal

* add FTR test for 'create tag' action from tag selector

* allow 'create new' option to prepopulate name field

* extract savedObjectToTag

* add advancedSettings read user for security api_integ suite

* add audit login for security client wrapper

* use import type when possible

* wire SO tagging to lens visualization

* fix lens jest test

* Fix `create tag` option being selected when closing the selector dropdown

* add sorting to tag column from getTableColumnDef

* address some of restrry comments

* rename tag selector's setSelected option to onTagsSelected

* fix audit logging even type for saved_object_remove_references

* update plugin size limit to current size

* adapt maxlength validation wording

* remove selection column until we have batch action menu

* remove connections link when user lack read privilege to savedObjectManagement

* forbid registering multiple SO decorators with the same priority

* add so decorator test

* extract getTagFindReferences and create API mock

* update audit-logging ascidoc

* doc nit

* throw conflict error if update returns any failure

* use refresh=true as default

* wording nits

* export: rename `references` to `hasReference`

* update generated doc

* set description max length to 100

* do not initialize tag cache on anonymous pages

* split fetchObjectsToExport into two distinct functions

* change tag client `delete` call order

* tsdoc nits

* more nits

* add README for oss plugin

* add oss plugin start tests

* SavedObject.find: rename `references` to `hasReference`

* change section description label

* remove url prefix constants

* last nits and comments

* update generated doc
2020-11-03 10:33:18 +01:00
Mikhail Shustov 1de0296c4b
add a script to find ready to migrate to ts project refs plugins (#82305) 2020-11-03 08:38:57 +01:00
Andrew Cholakian e94db6329d
Always use summary events for monitor info (#82376)
* Always use summary events for monitor info

Fixes https://github.com/elastic/kibana/issues/81942

With synthetics we no longer are guaranteed to have the URL or other
monitor info fields in every single event. This PR patches the monitor
status API to only query summary fields for this info.

As an added benefit, this is a bit more consistent as well because we
tend to only show data from completed, not partial checks, in most
places.

This also removes the status check parameter from this API, which
otherwise would need to be refactored. Checking the codebase it appears
unused.

* Remove unneeded params
2020-11-02 20:10:01 -06:00
Brandon Morelli 5b6e94bbad
[APM] docs: Add xpack.apm.searchAggregatedTransactions (#82379) 2020-11-02 17:21:38 -08:00
John Schulz 15e446d4e3
Replace DataType enum with type & add runtime dataTypes (#82231)
## Summary

Expands on pattern added in https://github.com/elastic/kibana/pull/82188

Replace `enum DataType` with TS type `DataType` & runtime JS `dataTypes`
```diff
- export enum DataType {
-  logs = 'logs',
-  metrics = 'metrics',
-}
+ export const dataTypes = {
+  Logs: 'logs',
+  Metrics: 'metrics',
+ } as const;
+ export type DataType = typeof dataTypes;
```

<img width="513" alt="Screen Shot 2020-11-02 at 5 13 56 PM" src="https://user-images.githubusercontent.com/57655/97926339-f5898c00-1d30-11eb-8935-92aad936aeea.png">
<img width="774" alt="Screen Shot 2020-11-02 at 5 14 05 PM" src="https://user-images.githubusercontent.com/57655/97926341-f5898c00-1d30-11eb-8d68-b39e2904cf85.png">
<img width="780" alt="Screen Shot 2020-11-02 at 5 19 50 PM" src="https://user-images.githubusercontent.com/57655/97926342-f5898c00-1d30-11eb-9799-95d77bfc1757.png">
2020-11-02 19:09:55 -05:00
Catherine Liu d9eef77355
[Usage Collection] Home Page UI Metrics (#81827)
* Added telemetry for the home page

* Added check for click handlers in overview page footer

* Fixed ts error

* Updated snapshots

* Applied feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-02 16:32:37 -07:00