Commit graph

34835 commits

Author SHA1 Message Date
Matthias Wilhelm 24d29a31b8
[Discover] Add caused_by.type and caused_by.reason to error toast modal (#70404) 2020-07-14 07:43:02 +02:00
Candace Park b7a6cff74d
[Security Solution] Add 3rd level breadcrumb to admin page (#71275)
[Endpoint Security] Add 3rd level (hosts / policies) breadcrumb to admin page
2020-07-14 00:00:29 -04:00
Pedro Jaramillo f4091df289
[Security Solution][Exceptions] Exception modal bulk close alerts that match exception attributes (#71321)
* progress on bulk close

* works but could be slow

* clean up, add tests

* fix reduce types

* address 'event.' fields

* remove duplicate import

* don't replace nested fields

* my best friend typescript
2020-07-13 23:39:58 -04:00
Marshall Main c86ad7bbec
Change signal.rule.risk score mapping from keyword to float (#71126)
* Change risk_score mapping from keyword to float

* Change default alert histogram option

* Add version to signals template

* Fix test

* Undo histogram order change

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 23:06:48 -04:00
Yuliia Naumenko 2009447ab8
Added help text where needed on connectors and alert actions UI (#69601)
* Added help text where needed on connectors and alert actions UI

* fixed ui form

* Added index action type examples, fixed slack link

* Fixed email connector docs and links

* Additional cleanup on email

* Removed autofocus to avoid twice link click for opening in the new page

* Extended documentation for es index action type

* Fixed tests

* Fixed doc link

* fixed due to comments

* fixed due to comments

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/actions/README.md

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/actions/README.md

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update x-pack/plugins/triggers_actions_ui/README.md

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/email.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/index.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Update docs/user/alerting/action-types/slack.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fixed due to comments

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-07-13 19:53:37 -07:00
Ryland Herrick 835c13dd6a
[SIEM][Detections] Value Lists Management Modal (#67068)
* Add Frontend components for Value Lists Management Modal

Imports and uses the hooks provided by the lists plugin. Tests coming
next.

* Update value list components to use newest Lists API

* uses useEffect on a task's state instead of promise chaining
* handles the fact that API calls can be rejected with strings
* uses exportList function instead of hook

* Close modal on outside click

* Add hook for using a cursor with paged API calls.

For e.g. findLists, we can send along a cursor to optimize our query. On
the backend, this cursor is used as part of a search_after query.

* Better implementation of useCursor

* Does not require args for setCursor as they're already passed to the
hook
* Finds nearest cursor for the same page size

Eventually this logic will also include sortField as part of the
hash/lookup, but we do not currently use that on the frontend.

* Fixes useCursor hook functionality

We were previously storing the cursor on the _current_ page, when it's
only truly valid for the _next_ page (and beyond).

This was causing a few issues, but now that it's fixed everything works
great.

* Add cursor to lists query

This allows us to search_after a previous page's search, if available.

* Do not validate response of export

This is just a blob, so we have nothing to validate.

* Fix double callback post-import

After uploading a list, the modal was being shown twice. Declaring the
constituent state dependencies separately fixed the issue.

* Update ValueListsForm to manually abort import request

These hooks no longer care about/expose an abort function. In this one
case where we need that functionality, we can do it ourselves relatively
simply.

* Default modal table to five rows

* Update translation keys following plugin rename

* Try to fit table contents on a single row

Dates were wrapping (and raw), and so were wrapped in a FormattedDate
component. However, since this component didn't wrap, we needed to
shrink/truncate the uploaded_by field as well as allow the fileName to
truncate.

* Add helper function to prevent tests from logging errors

https://github.com/enzymejs/enzyme/issues/2073 seems to be an ongoing
issue, and causes components with useEffect to update after the test is
completed.

waitForUpdates ensures that updates have completed within an act()
before continuing on.

* Add jest tests for our form, table, and modal components

* Fix translation conflict

* Add more waitForUpdates to new overview page tests

Each of these logs a console.error without them.

* Fix bad merge resolution

That resulted in duplicate exports.

* Make cursor an optional parameter to findLists

This param is an optimization and not required for basic functionality.

* Tweaking Table column sizes

Makes actions column smaller, leaving more room for everything else.

* Fix bug where onSuccess is called upon pagination change

Because fetchLists changes when pagination does, and handleUploadSuccess
changes with fetchLists, our useEffect in Form was being fired on every
pagination change due to its onSuccess changing.

The solution in this instance is to remove fetchLists from
handleUploadSuccess's dependencies, as we merely want to invoke
fetchLists from it, not change our reference.

* Fix failing test

It looks like this broke because EuiTable's pagination changed from a
button to an anchor tag.

* Hide page size options on ValueLists modal table

These have style issues, and anything above 5 rows causes the modal to
scroll, so we're going to disable it for now.

* Update error callbacks now that we have Errors

We don't display the nice errors in the case of an ApiError right now,
but this is better than it was.

* Synchronize delete with the subsequent fetch

Our start() no longer resolves in a meaningful way, so we instead need
to perform the refetch in an effect watching the result of our delete.

* Cast our unknown error to an Error

useAsync generally does not know how what its tasks are going to be
rejected with, hence the unknown.

For these API calls we know that it will be an Error, but I don't
currently have a way to type that generally. For now, we'll cast it
where we use it.

* Import lists code from our new, standardized modules

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 21:11:08 -05:00
Tiago Costa 683fb42df7
[test] Skips test preventing promotion of ES snapshot #71582 2020-07-14 02:33:00 +01:00
Tiago Costa 8555ecbcf4
[test] Skips test preventing promotion of ES snapshot #71555 2020-07-14 02:14:29 +01:00
Yulia Čech 56a2437a6c
[ILM] Fix alignment of the timing field (#71273) 2020-07-13 21:10:07 -04:00
Frank Hassanabad 473806c3c8
[SIEM][Detection Engine][Lists] Adds the ability for exception lists to be multi-list queried. (#71540)
## Summary

* Adds the ability for exception lists to be multi-list queried 
* Fixes a bunch of script issues where I did not update everywhere I needed to use `ip_list` and deletes an old list that now lives within the new/lists folder
* Fixes a few io-ts issues with Encode Decode while I was in there.
* Adds two more types and their tests for supporting converting between comma separated strings and arrays for GET calls.
* Fixes one weird circular dep issue while adding more types.

You now send into the find an optional comma separated list of exception lists their namespace type and any filters like so:

```ts
GET /api/exception_lists/items/_find?list_id=simple_list,endpoint_list&namespace_type=single,agnostic&filtering=filter1,filter2"
```

And this will return the results of both together with each filter applied to each list. If you use a sort field and ordering it will order across the lists together as if they are one list. Filter is optional like before. If you provide less filters than there are lists, the lists will only apply the filters to each list until it runs out of filters and then not filter the other lists.

If at least one list is found this will _not_ return a 404 but it will _only_ query the list(s) it did find. If none of the lists are found, then this will return a 404 not found exception.

**Script testing**

See these files for more information:
* find_exception_list_items.sh
* find_exception_list_items_by_filter.sh 

But basically you can create two lists and an item for each of the lists:

```ts
./post_exception_list.sh ./exception_lists/new/exception_list.json
./post_exception_list_item.sh ./exception_lists/new/exception_list_item.json

./post_exception_list.sh ./exception_lists/new/exception_list_agnostic.json
./post_exception_list_item.sh ./exception_lists/new/exception_list_item_agnostic.json
```

And then you can query these two lists together:
```ts
./find_exception_list_items.sh simple_list,endpoint_list single,agnostic
```

Or for filtering you can query both and add a filter for each one:
```ts
./find_exception_list_items_by_filter.sh simple_list,endpoint_list "exception-list.attributes.name:%20Sample%20Endpoint%20Exception%20List,exception-list-agnostic.attributes.name:%20Sample%20Endpoint%20Exception%20List" single,agnostic
```

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
2020-07-13 19:07:35 -06:00
Michael Olorunnisola 8325222c0a
initial telemetry setup (#69330) 2020-07-13 20:52:25 -04:00
Tim Sullivan 2340f8a59b
[Reporting] Formatting fixes for CSV export in Discover, CSV download from Dashboard panel (#67027)
* [Reporting] Data formatting fixes for CSV export in Discover, CSV download from Dashboard panel

commit e195964deaa3e7e8d94704d6514e01498c913a81
Author: Timothy Sullivan <tsullivan@elastic.co>
Date:   Mon Jul 13 10:17:36 2020 -0700

    Squashed commit of the following:

    commit 87c9c496a6cccaf7a60a44b496f7c0c0423cd2ea
    Merge: d531101ab3 ed749eb5ad
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 10:17:02 2020 -0700

        Merge branch 'data/allow-custom-formatting' into reporting/csv-date-format-consistency

    commit d531101ab3c2f12628287bd5ad4a02bbf8b5c990
    Merge: 400e2ffba4 17dc0439e2
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 10:15:38 2020 -0700

        Merge branch 'master' into reporting/csv-date-format-consistency

    commit ed749eb5ad
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 10:12:28 2020 -0700

        move shared code to common

    commit 4e5eebd93b
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 09:07:32 2020 -0700

        3td time api doc chagens

    commit 34df3318bf
    Merge: 54fa2fe97f 17dc0439e2
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Mon Jul 13 08:50:21 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 400e2ffba4546cf78c53ce96b45a59878f0df076
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Sun Jul 12 21:29:34 2020 -0700

        [Reporting] Data formatting fixes for CSV export in Discover, CSV download from Dashboard panel

    commit 54fa2fe97f
    Merge: 1b6e9e8719 e1253ed047
    Author: Elastic Machine <elasticmachine@users.noreply.github.com>
    Date:   Sun Jul 12 22:18:38 2020 -0600

        Merge branch 'master' into data/allow-custom-formatting

    commit 1b6e9e8719
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Fri Jul 10 15:03:08 2020 -0700

        weird api change needed but no real diff

    commit fc9ff7be61
    Merge: 736e9eecdd 66c531d903
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Fri Jul 10 14:51:51 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 736e9eecdd
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 17:43:10 2020 -0700

        fix path for tests

    commit 1bebcc83e6
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 17:25:09 2020 -0700

        re-use public code in server, add test

    commit 1e1d3c58ab
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 16:35:30 2020 -0700

        rerun api changes

    commit 231f793943
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 16:31:55 2020 -0700

        fix src/plugins/data/public/field_formats/constants.ts

    commit d42275cfeb
    Merge: 206aed6210 8e2277a667
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 16:01:40 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 206aed6210
    Merge: 5aa2d802ec 09da11047d
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 9 15:03:12 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 5aa2d802ec
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Wed Jul 8 12:12:31 2020 -0700

        api doc changes

    commit 76e2c307e7
    Merge: 1789afcdc9 595e9c2d8d
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Wed Jul 8 12:04:12 2020 -0700

        Merge branch 'master' into data/allow-custom-formatting

    commit 1789afcdc9
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Fri Jul 3 11:23:03 2020 -0700

        simplify changes

    commit 6428455873
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 2 16:05:57 2020 -0700

        add more to tests - need help though

    commit 6aacfbd25d
    Author: Timothy Sullivan <tsullivan@elastic.co>
    Date:   Thu Jul 2 12:04:28 2020 -0700

        [Data Plugin] Allow server-side date formatters to accept custom timezone

        When Advanced Settings shows the date format timezone to be "Browser,"
        this means nothing to field formatters in the server-side context. The
        field formatters need a way to accept custom format parameters. This
        allows a server-side module that creates a FieldFormatMap to set a
        timezone as a custom parameter. When custom formatting parameters exist,
        they get combined with the defaults.

* comments
2020-07-13 17:22:01 -07:00
Larry Gregory 692db4f172
Search across spaces (#67644)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 20:10:17 -04:00
Caroline Horn ddd8fa8947
[Lens] 7.9 design cleanup (#71444)
* Fix dimension popover layout and color picker “Auto”

* Created ToolbarButton

* Move disabled help text to tooltip for missing values

* Darker side panel backgrounds

* Adding to .asciidoc about where to put the SASS import

* Moving `SASS` guidelines to STYLEGUIDE.md

* Fix keyboard focus of XY settings popover

* Fix dark mode
2020-07-13 20:06:58 -04:00
Henry Harding 82562a8e25
Add tooltips to Ingest manager overview section and update text to say Beta (#71373)
* add tooltips and beta label to Ingest Manager overview page

* updated footer messaging and about-this-release flyout

* forgot to remove commented out code

* fixed responsive issue with tooltip

* removed unused import

* fix i18n

* update link to docs

* update text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 20:05:45 -04:00
Kevin Logan 00f03fbf34
[SECURITY_SOLUTION] add onboarding logo (#71471) 2020-07-13 19:36:29 -04:00
Jen Huang 3d5afa90d2
[Ingest Manager] Remove epm config options (#71542)
* Remove `epm.enabled`, flatten `epm.registryUrl`

* Update docs
2020-07-13 16:21:33 -07:00
Paul Tavares 9e99f739a8
[SECURITY_SOLUTION][ENDPOINT] Fix Policy Details Name to ensure it truncates the value when its too long (#71526)
* Fix title not truncated on policy details
2020-07-13 19:03:34 -04:00
Tyler Smalley b217cb3f96 [test] Skips Alerting test preventing ES snapshot promotion
https://github.com/elastic/kibana/issues/71559

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-07-13 15:26:34 -07:00
Tyler Smalley 0194f8c149 [test] Skips test preventing promotion of ES snapshot
https://github.com/elastic/kibana/issues/71555

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-07-13 15:24:28 -07:00
Tyler Smalley 439f2dd047 [skip test] Skips Alerting API test due to failing ES promotion
https://github.com/elastic/kibana/issues/71558

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-07-13 15:19:50 -07:00
Spencer 42cb6a4a26
[ftr] don't require the --no-debug flag to disable debug logging (#71535)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-13 15:16:11 -07:00
Ryland Herrick 5c3f8b9941
[Security Solution][Detections] Create value list indexes if they do not exist (#71360)
* Add API functions and hooks for reading and creating the lists index

* Ensure KibanaApiError extends the Error interface

It has a name, so we should type it as such. This way, we can use it
anywhere that an Error is accepted.

* Return an Error from validationEither and thus from our useAsync hooks

Because an io-ts pipeline needs a consistent type across its left value,
and validateEither was returning a string, we were forcing all our
errors to strings. In the case of an API error, however, this meant a
loss of data, since the original error's extra fields were lost.

By returning an Error from validateEither, we can now pass through Api
errors from useAsync and thus use them directly in kibana utilities like
toasts.addError.

* WIP: implements checking for and consequent creation of lists index

This adds most of the machinery that I think we're going to need. Not
featured here:

* lists privileges (stubbed out currently)
* handling when lists is disabled
* tests

* Add frontend plugin for lists

We need this to deteremine in security_solution whether lists is enabled
or not. There's no other functionality here, just boilerplate.

* Fix cross-plugin imports/exports

Now that lists has a client plugin, the optimizer cares about code
coming into and out of it.

By default, you cannot import another plugin's common/ folder into your
own common/ nor public/ folders. This is fixed by adding 'common' to
extraPublicDirs, however: extraPublicDirs need to resolve to modules.

Rather than adding each folder from which we export modules to
extraPublicDirs, I've added common/index.ts and exporting everything
through there.

By convention, I'm adding shared_exports.ts as an index of these exported modules,
and shared_imports.ts is used to import on the other end.

For now, I've left the ad hoc _deps files so as to limit the changes
here, but we should come back through and remove them at some point. NB
that I did remove lists_common_deps as it was only used in one or two
spots.

* Fix test failing due to lack of context

This component now uses useKibana indirectly through useListsConfig.

* Lists and securitySolution require each other's bundles

Without lists being a requiredBundle of securitySolution, we cannot
import its code when the plugin is disabled. The opposite is also true,
but there's no lists "app" to break.

* Fix logic in useListsConfig

Lists needs configuration if the index explicitly does not exist. If it
is true (already exists) or null (lists is disabled or we could not read
the index), we're good.

* useList* behavior when lists plugin is disabled

When the lists plugin is disabled, our calls in useListsIndex become no-ops so that:

* useListsIndex state does not change
* useListsConfig.needsConfiguration remains false as indexExists is
never non-null

This also removes use of our `useIsMounted` hook. Since the effects
we're consuming come from useAsync hooks, state will (already) not be
updated if the component is unmounted.

* Fix warning due to dynamic creation of a styled component

* Revert "Fix warning due to dynamic creation of a styled component"

This reverts commit 7124a8fbd9.

(This was already fixed on master)

* Check user's lists index privileges when determining configuration status

If there is no lists index and the user cannot create it, we will
display a configuration message in lieu of Detections

* Adds a lists hook to read privileges (missing schemae)
* Adds security hook useListsPrivileges to perform and parse the
privileges request
* Updates useListsConfig to use useListsPrivileges hook

* Move lists hooks to their own subfolder

* Redirect to main detections page if lists needs configuration

If:

* lists are enabled, and
* lists indexes DNE, and
* user cannot manage the lists indexes

Then they will be redirected to the main detections page where they'll
be instructed to configure detections. If any of the above is false,
things work as normal.

* Lock out of detections when user cannot write to value lists

Rather than add conditional logic to all our UI components dealing with
lists, we're going the heavy-handed route for now.

* Mock lists config hook in relevant Detections page tests

* Disable Detections when Lists is enabled

This refactors useListsConfig.needsConfiguration to mean:

* lists plugin is disabled, OR
* lists indexes DNE and can't be created, OR,
* user can't write to the lists index

In any of these situations, we want to disable detections, and so we
export that as a single boolean, needsConfiguration.

* Remove unneeded complexity exception

We refactored this to work 👍

* Remove outdated TODO

We link to our documentation, which will describe the lists aspects of
configuration.
2020-07-13 17:05:31 -05:00
Clint Andrew Hall b3d7539475
Inclusive Language Refactor (#71522) 2020-07-13 17:57:48 -04:00
Tim Sullivan 3222951db1
[Data Plugin] Allow server-side date formatters to accept custom timezone (#70668)
* [Data Plugin] Allow server-side date formatters to accept custom timezone

When Advanced Settings shows the date format timezone to be "Browser,"
this means nothing to field formatters in the server-side context. The
field formatters need a way to accept custom format parameters. This
allows a server-side module that creates a FieldFormatMap to set a
timezone as a custom parameter. When custom formatting parameters exist,
they get combined with the defaults.

* add more to tests - need help though

* simplify changes

* api doc changes

* fix src/plugins/data/public/field_formats/constants.ts

* rerun api changes

* re-use public code in server, add test

* fix path for tests

* weird api change needed but no real diff

* 3td time api doc chagens

* move shared code to common

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 14:50:49 -07:00
Felix Stürmer ff7b736cc3
[Logs UI] Show log analysis ML jobs in a list (#71132)
This modifies the ML job setup flyout of the anomalies tab to offer a list of the two available modules. Via the list each of the modules' jobs can be created or re-created.
2020-07-13 23:29:55 +02:00
Alison Goryachev 29580bee4e
fix console example (#71515) 2020-07-13 17:12:33 -04:00
Nicolas Chaulet 3ac8e367f8
[Ingest Manager] Log a warning if registryUrl is set in non gold (#71514) 2020-07-13 17:02:09 -04:00
nnamdifrankie f86c0792a1
[SecuritySolution-Endpoint]: add filter of default Elastic Agent ids for Endpoint Agent initial state (#71478)
[SecuritySolution-Endpoint]: add filter of default Elastic Agent ids for Endpoint Agent initial state
2020-07-13 16:57:04 -04:00
Melissa Alvarez 1b1962f18c
[ML] DF Analytics creation and update: adds max_num_threads (#71318)
* add max_num_threads to edit flyout

* add maxNumThreads setting to job wizard

* add maxNumThreads to cloning
2020-07-13 16:51:22 -04:00
Poff Poffenberger 4d6ad89194
[Canvas] Add simple variables to workpads (#66139)
* Add simple variables to Canvas workpads

* Fix type for workpad variable action and clarify comment

* Fix types in fixtures and templates

* Fixing type check errors on actions

* Addressing pr feedback and refactoring canvas sidebar accordions

* Render true/false instead of Yes/no on variables

* add warning callout when editing a variable

* Address review feedback

* More feedback

* updating storyshot with new edit mode callout

* Some animation tweaks for the panel

* one more panel tweak

* Removing the slide transition for now

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 15:45:36 -05:00
Ross Wolf 85d42535ea
[SIEM][Detection Rules] Add 7.9 rules (#71332) 2020-07-13 14:44:14 -06:00
Aaron Caldwell d7a679ba8c
[Maps] Fix proxy handling issues (#71182) 2020-07-13 14:27:19 -06:00
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