Commit graph

15166 commits

Author SHA1 Message Date
Ester Martí Vilaseca 1d6f61f186
Change top_hits aggregation to top_metrics for snapshot api (#95644)
* Change top_hits aggregations to top_metrics for snapshot api

* Fix typing

* Remove top_hits types

* Add test for top metrics

* Fix functional test

* Add size 1 to top metrics aggregation

* change type for metadata rows

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-06 14:32:16 +02:00
Marta Bondyra 3a4c62dd5b
[Lens] don't use eui variables for zindex (#96117)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-06 10:31:56 +02:00
Pierre Gayvallet 251bd9afc6
Remove /src/legacy (#95510)
* starting removing stuff

* fix jest config

* disable CLI mode until other PR is merged

* fix the schema

* add deprecation for maxPayloadBytes

* fix legacy start logic

* deletes `env` from unknown args

* fix FTR test config

* some legacy service deletion

* move config validation

* remove legacy exports from entrypoint

* preserve legacy logging in core logging config

* try to fix uiSettings integration tests

* fix legacy service tests

* more type fix

* use fromRoot from @kbn/utils

* cleanup kibana.d.ts

* fix unit tests

* remove src/core/server/utils

* fix server script

* add integration test for `/{path*}` route

* add unit tests on legacy config

* adapt uiSetting IT bis

* fix tests

* update generated doc

* address some review comments

* move review comments

* fix some stuff

* fix some stuff

* fix some stuff

* fix some stuff bis

* generated doc

* add test for ensureValidConfiguration
2021-04-06 09:25:36 +02:00
Tiago Costa d05d5634b3
skip flaky suite (#95899) 2021-04-06 02:29:43 +01:00
Nick Partridge d4b0f92c84
[Dashboard] Fix Lens and TSVB chart tooltip positioning relative to global headers (#94247) 2021-04-05 18:02:13 -05:00
Rashmi Kulkarni 7da1b82b7e
fixes a skipped management x-pack test (#96178)
* fixes a skipped management x-pack test

* modified the test to incoroporate the review comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 15:24:22 -07:00
Constance 56d9f3d968
[App Search] API logs: Add log detail flyout (#96162)
* Set up helper for showing JSON request/response bodies

* Set up mock API log obj for tests to use

* Add ApiLogLogic file for flyout handling

* Add ApiLogFlyout component

* Update views to load flyout

* Update table to open flyout

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/api_logs/utils.ts

* PR feedback: comments

Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>

Co-authored-by: Byron Hulcher <byronhulcher@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 16:48:00 -04:00
Clint Andrew Hall 5667435c38
[tech-debt] Remove defunct opacity parameters from EUI shadow functions (#96191)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 15:32:29 -05:00
Nathan Reese 2eae0969cb
[file upload] document file upload privileges and provide actionable UI when failures occur (#95883)
* [file upload] document file upload privileges and provide actionable UI when failures occur

* doc link

* call hasImportPermission

* docs tweeks

* tslint

* Update docs/maps/import-geospatial-data.asciidoc

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

* Update docs/maps/import-geospatial-data.asciidoc

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

* Update docs/maps/import-geospatial-data.asciidoc

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

* Update docs/maps/import-geospatial-data.asciidoc

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

* review feedback

* fix bullet list format

* clean-up i18n ids

* Update docs/maps/import-geospatial-data.asciidoc

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

* documenation review feedback

* add period to last privilege bullet item

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 13:39:15 -06:00
Mikhail Shustov e457f212c4
Revert "TS Incremental build exclude test files (#95610)" (#96223)
This reverts commit b6e582c53e.
2021-04-05 11:59:26 -07:00
Jason Stoltzfus ad5f83a362
[App Search] Added Sample Response section to Result Settings (#95971) 2021-04-05 13:49:54 -04:00
Thomas Neirynck 1fad3175f9
[Maps] Safe-erase text-field (#94873) 2021-04-05 13:42:46 -04:00
Andrew Goldstein bcb72c596a
[RAC][Alert Triage][TGrid] Update the Alerts Table (TGrid) API to implement renderCellValue (#96098)
### [RAC][Alert Triage][TGrid] Update the Alerts Table (TGrid) API to implement `renderCellValue`

- This PR implements a superset of the `renderCellValue` API from [EuiDataGrid](https://elastic.github.io/eui/#/tabular-content/data-grid) in the `TGrid` (Timeline grid) API

- The TGrid API was also updated to accept a collection of `RowRenderer`s as a prop

The API changes are summarized by the following screenshot:

<img width="1239" alt="render-cell-value" src="https://user-images.githubusercontent.com/4459398/113345484-c121f800-92ef-11eb-8a21-2b6dd8ef499b.png">

The following screenshot shows the `signal.rule.risk_score` column in the Alerts table being rendered with a green background color, using the same technique illustrated by `EuiDataGrid`'s [codesandbox example](https://codesandbox.io/s/nsmzs):

<img width="1231" alt="alerts" src="https://user-images.githubusercontent.com/4459398/113349015-a30ac680-92f4-11eb-8518-5c1b7465e76e.png">

Note: In the screenshot above, the values in the Alerts table are also _not_ rendered as draggables.

Related (RAC) issue: https://github.com/elastic/kibana/issues/94520

### Details

The `StatefulEventsViewer` has been updated to accept `renderCellValue` as a (required) prop:

```
renderCellValue: (props: CellValueElementProps) => React.ReactNode;
```

The type definition of `CellValueElementProps` is:

```
export type CellValueElementProps = EuiDataGridCellValueElementProps & {
  data: TimelineNonEcsData[];
  eventId: string; // _id
  header: ColumnHeaderOptions;
  linkValues: string[] | undefined;
  timelineId: string;
};
```

The `CellValueElementProps` type above is a _superset_ of `EuiDataGridCellValueElementProps`. The additional properties above include the `data` returned by the TGrid when it performs IO to retrieve alerts and events.

### Using `renderCellValue` to control rendering

The internal implementation of TGrid's cell rendering didn't change with this PR; it moved to

`x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx` as shown below:

```
export const DefaultCellRenderer: React.FC<CellValueElementProps> = ({
  columnId,
  data,
  eventId,
  header,
  linkValues,
  setCellProps,
  timelineId,
}) => (
  <>
    {getColumnRenderer(header.id, columnRenderers, data).renderColumn({
      columnName: header.id,
      eventId,
      field: header,
      linkValues,
      timelineId,
      truncate: true,
      values: getMappedNonEcsValue({
        data,
        fieldName: header.id,
      }),
    })}
  </>
);
```

Any usages of TGrid were updated to pass `DefaultCellRenderer` as the value of the `renderCellValue` prop, as shown in the screenshot below:

<img width="1239" alt="render-cell-value" src="https://user-images.githubusercontent.com/4459398/113345484-c121f800-92ef-11eb-8a21-2b6dd8ef499b.png">

The `EuiDataGrid` [codesandbox example](https://codesandbox.io/s/nsmzs) provides the following example `renderCellValue` implementation, which highlights a cell green based on it's numeric value:

```
  const renderCellValue = useMemo(() => {
    return ({ rowIndex, columnId, setCellProps }) => {
      const data = useContext(DataContext);
      useEffect(() => {
        if (columnId === 'amount') {
          if (data.hasOwnProperty(rowIndex)) {
            const numeric = parseFloat(
              data[rowIndex][columnId].match(/\d+\.\d+/)[0],
              10
            );
            setCellProps({
              style: {
                backgroundColor: `rgba(0, 255, 0, ${numeric * 0.0002})`,
              },
            });
          }
        }
      }, [rowIndex, columnId, setCellProps, data]);

      function getFormatted() {
        return data[rowIndex][columnId].formatted
          ? data[rowIndex][columnId].formatted
          : data[rowIndex][columnId];
      }

      return data.hasOwnProperty(rowIndex)
        ? getFormatted(rowIndex, columnId)
        : null;
    };
  }, []);
```

The sample code above formats the `amount` column in the example `EuiDataGrid` with a green `backgroundColor` based on the value of the data, as shown in the screenshot below:

<img width="956" alt="datagrid-cell-formatting" src="https://user-images.githubusercontent.com/4459398/113348300-a782af80-92f3-11eb-896a-3d92cf4b9b53.png">

To demonstrate that similar styling can be applied to TGrid using the same technique illustrated by `EuiDataGrid`'s [codesandbox example](https://codesandbox.io/s/nsmzs), we can update the `DefaultCellRenderer` in `x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx` to apply a similar technique:

```
export const DefaultCellRenderer: React.FC<CellValueElementProps> = ({
  columnId,
  data,
  eventId,
  header,
  linkValues,
  setCellProps,
  timelineId,
}) => {
  useEffect(() => {
    if (columnId === 'signal.rule.risk_score') {
      const value = getMappedNonEcsValue({
        data,
        fieldName: columnId,
      });
      if (Array.isArray(value) && value.length > 0) {
        const numeric = parseFloat(value[0]);
        setCellProps({
          style: {
            backgroundColor: `rgba(0, 255, 0, ${numeric * 0.002})`,
          },
        });
      }
    }
  }, [columnId, data, setCellProps]);

  return (
    <>
      {getMappedNonEcsValue({
        data,
        fieldName: columnId,
      })}
    </>
  );
};
```

The example code above renders the  `signal.rule.risk_score` column in the Alerts table with a green `backgroundColor` based on the value of the data, as shown in the screenshot below:

<img width="1231" alt="alerts" src="https://user-images.githubusercontent.com/4459398/113349015-a30ac680-92f4-11eb-8518-5c1b7465e76e.png">

Note: In the screenshot above, the values in the Alerts table are not rendered as draggables.
2021-04-05 13:39:09 -04:00
Thomas Neirynck 8e11e2598e
[Maps] Enable all zoom levels for all users (#96093) 2021-04-05 12:04:20 -04:00
Scotty Bollinger ea03eb1bab
[Enterprise Search] Expose core.chrome.setIsVisible for use in Workplace Search (#95984)
* Hide chrome for Workplace Search by default

The Workplace Search Personal dashboard needs the chrome hidden. We hide it globally here first to prevent a flash of chrome on the Personal dashboard and unhide it for admin routes, which will be in a future commit

* Add core.chrome.setIsVisible to KibanaLogic

* Toggle chrome visibility for Workplace Search

* Add test

* Refactor to set context and chrome when pathname changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 11:27:05 -04:00
Scotty Bollinger 123f3400a8
[Workplace Search] Add sub nav and fix rendering bugs in Personal dashboard (#96100)
* Fix route for private deferated source summary

* Make schema types nullable

Federated sources don’t have counts and the server returns null so our routes have to expect that sometimes these values will be null

* Add SourceSubNav to Personal dashboard

We are able to leverage the existing component with a couple a small change; the existing componet is a subnav in the larger Enterprise Search shared navigation component and does not include its styles. This caused the list items to render with bullet points next to them. Adding this class and displaying the nav items as block elements fixes this issue.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 11:19:32 -04:00
Cauê Marcondes 9cebff1298
[OBS]home page is showing incorrect value of APM throughput (tpm) (#95991)
* fixing obs transaction per minute value

* addressing PR comments

* fixing unit test

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 10:51:56 -04:00
Shahzad a640522140
[Observability] Exploratory View initial skeleton (#94426)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-05 15:26:48 +02:00
Anton Dosov 8c8323abfd
[Search Sessions] fix updating deleting sessions from non-default space (#96123)
* add spaces test

* fix updating and deleting sessions in non-default space

* revert back to batch update

* Add space tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
2021-04-05 15:01:24 +03:00
Constance c97c51876e
Remove incorrect error toast on successful poll (#96159) 2021-04-02 17:28:18 -04:00
Jason Stoltzfus 82f7b2127e
Move trs to be under tbody in ResultSettings (#96132)
This was causing console errors.

I factored out the column headers to their own component, and moved
all table rows to be under a tbody. This alleviates the console
warnings.
2021-04-02 13:24:04 -04:00
Constance 1d58266559
[Enterprise Search] Add toasts support to FlashMessages component (#95981)
* Add toasts to FlashMessagesLogic

+ Tests cleanup:

- Group actions by their reducer blocks (since flashMessages has such specific logic) - recommend viewing with whitespace changes off for this
- Do not reset context between each test, but instead by mount(), which allows tests to maintain state between adding/removing/resetting
- Remove '()' from test names (feedback from previous PRs)

* Add toast message helpers

+ refactor FLASH_MESSAGE_TYPES to constants, so that both callouts & toasts can use it effectively

* Update FlashMessages to display toasts as well as callouts

- This means we can automatically use toasts alongside callouts in all views that already have FlashMessages

+ a11y enhancement! update callouts to also announce new messages to screenreaders

* [Example] Update ApiLogsLogic to flash an error toast on poll

+ update copy to better match EUI guidelines (shorter)

* Fix test caused by new FlashMessages structure

* PR suggestion - destructure

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>

* PR feedback: implicit return

* Fix color types

- adding our own string enum fixes the typescript errors that both EuiCallout & EuiToast emit when passing color props to the base EUI types

* PR feedback: Update flashToast API to match callout helper API

- accepts a string title with optional args, creates a unique ID automatically if missing

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-04-02 09:50:39 -07:00
Scotty Bollinger fb681d9062
[Workplace Search] Fix broken reauthenticate URLs and fix spelling (#96140)
* Remove kebabCase

Kibana routes are snake case, which matches the existing serviceType, so this is no longer needed

* Fix route segment

The word reauthenticate is not hyphenated

* Fix all misspelling of reauthenticate

Renames files too
2021-04-02 12:41:27 -04:00
Melissa Alvarez 8fef5fd9e1
[ML] Data Frame Analytics: adds support for runtime fields (#95734)
* add runtime mapping editor in wizard

* ensure depVar is updated correctly with RF changes

* remove old RF from includes

* ensure cloning works with RF as depVar

* ensure indexPattern RF work

* scatterplot supports RTF. depVar options have indexPattern RTF on first load

* remove unnecessary types

* ensure supported fields included by default

* update types in editor

* use isRuntimeMappings

* fix translations. ensure runtimeMappings persist when going back to step 1

* ensure histograms support runtime fields

* update types
2021-04-02 11:06:31 -04:00
Constance 3237fd0637
[Enterprise Search] Fix eslint import rule not ordering sibling mocks with parent mocks (#96070)
* Enterprise Search eslint import order rule fix
- mocks in current folder should be grouped with mocks from parent folders

* Run --fix/update instances of importing ./__mocks__
2021-04-02 09:05:53 -04:00
Xavier Mouligneau f042ec8945
[SECURITY SOLUTIONS][Timeline] correlation bug (#96099)
* fix pagination bug with correlation

* fix close resolver to go back to prev tab
2021-04-02 09:00:51 -04:00
Constance 7db838e0b8
[App Search] API Logs: Add ApiLogsTable and NewApiEventsPrompt components (#96008)
* Set up getStatusColor util for upcoming EuiHealth components

* Add ApiLogsTable component

* Add NewApiEventsPrompt component

* Update ApiLogs view with new components

+ add EuiPageContent wrapper (missed this originally)

* Update EngineOverview with new components

* PR feedback: Comments + mock FormattedRelative

* Fix type error
2021-04-02 08:49:12 -04:00
James Rodewig eae160c419
Remove unneeded articles from button text (#96045)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 18:52:07 -04:00
Constance df8166f20e
[App Search] Update instances of EuiPanel/EuiPageContent to bordered or filled panels (#96090)
* Add hasBorder to all EuiPageContent panels

* EngineCreation: switch EuiPageBody to EuiPageContent
+ add hasBorder

* Credentials: update EuiPanels w/ hasBorder

* ApiCodeExample: switch to hasBorder

* DataPanel: update to take & pass hasBorder prop

* Analytics & EngineOverview: use hasBorder

* Relevance Tuning: update EuiPanels

- switch to hasBorder for top level panels
- switch to color="subdued" for boost accordion
- tweak padding of boost panel
- CSS cleanup

* Role Mappings: switch to hasBorder

+ remove unused class - `euiPanel--disabled` was not applying any styles
+ remove random 'export' string

* Sample engine CTA: switch to subdued panel
+ fix sizing - when loading button pops in, it was causing text to overflow
2021-04-01 17:54:53 -04:00
Tiago Costa f424b9cbb2
chore(NA): moving @elastic/datemath into bazel (#94665)
* chore(NA): majority of the changes needed to build elastic-datemath with bazel

* chore(NA): add missing bits on elastic-datemath package

* chore(NA): add missing build and watch scripts

* chore(NA): remove build scripts for elastic datemah

* chore(NA): remove typo from build baze production projects logs

* chore(NA): force install on CI

* chore(NA): introduce custom preserve symlinks resolver for jest

* chore(NA): update jest integration snapshot

* chore(NA): fix build for bazel packages

* chore(NA): correctly copy bazel built packages into final distributable build

* chore(NA): update kbn pm dist

* chore(NA): experimental new logic to handle bazel yarn rule rerun using yarn-integrity file

* chore(NA): update snapshots

* refact(NA): ensure yarn integrity exists into two methods

* chore(NA): fix ts error

* chore(NA): update snapshots

* chore(NA): update elastic-datemath build file to include ts_project rule

* chore(NA): update basic optimization test snapshots

* chore(NA): merge and solve conflicts cherry-pick from #96066

* chore(NA): update package.json and yarn.lock file

* chore(NA): update bazel/bin into bazel-bin on kbn-pm build bazel packages

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 22:51:32 +01:00
Gabriel Landau 9683d32fa5
Standardize process fields in Endpoint Security Telemetry (#95836)
* Standardize process fields across process and Target.process

* Lint

* Bug fix

* Typo fix

* Add new fields to unit test, fix 0 truthiness bug, and exercise 0 truthiness bug in unit test

* Add a PR-requested unit test case

* Use Yoda Conditions, Kibana does not

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 15:43:37 -04:00
Alison Goryachev 91b7770b3a
[Rollups] Update API integration test (#96071) 2021-04-01 15:36:05 -04:00
Bhavya RM 39d1e62c7d
Test Export and Import saved objects between versions (#91908) 2021-04-01 15:22:14 -04:00
Nathan Reese a70bd991ab
[Maps] top hits layer wizard (#95678)
* [Maps] top hits source

* add icon

* top hits form

* clean up icon

* create descriptor

* add update editor

* update docs

* tslint and i18n fixes

* update jest test

* add sort inputs to create UI

* review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 13:21:14 -06:00
Nicolas Chaulet 39ebc8068c
[Fleet] Invalidate fleet API keys as internal user (#96054) 2021-04-01 15:20:55 -04:00
Joe Portner 574391985b
Fix and unskip functional test (#96004) 2021-04-01 14:06:17 -04:00
Oliver Gupte 2abd628f26
[APM] Correlations support for progressively loading sections (#95743)
* [APM] Correlations support for progressively loading sections (#95059)

* fixes type consistency

* - Adds progressive section loading for errors tab in correlations
- code improvements

* Tests for latency correlations and overall distribution APIs

* adds API test for error correlations endpoints

* renamed 'getOverallErrorDistribution' to 'getOverallErrorTimeseries'

* Code improvements

* fix whitespace
2021-04-01 10:54:05 -07:00
Thomas Neirynck 35ba996e84
[Maps] Add suggest EMS layer utility (#94969) 2021-04-01 12:21:29 -04:00
Zacqary Adam Xeper 6e9e6e5cfd
[Fleet] Correctly parse falsy YAML fields in agent policy integrations (#95966) 2021-04-01 10:39:54 -05:00
Kaarina Tungseth 1aa6a140dd
Ui changes (#95989) 2021-04-01 09:09:11 -05:00
Madison Caldwell 9c5641dbd7
[Security Solution][Detections][Threshold Rules] Add threshold_result to alert notification context (#95354)
* Don't remove threshold_result from _source prematurely

* Fix type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 09:58:54 -04:00
Paul Tavares 6238ef7bad
[Security Solution][Artifacts] Refactor endpoint Artifact manifest processing (#95846)
* Remove references to class `ArtifactClient` and replace with EndpointArtifactClientInterface
* refactor artifact client tests to use new class
* Added additional test to Fleet Artifacts create service
* remove SavedObject type wrapper from getArtifact response
2021-04-01 09:31:17 -04:00
Nathan Reese 7fe316562d
[Maps] fix fit to data doesn't work in TMS (#95980) 2021-04-01 06:45:18 -06:00
Mikhail Shustov b6e582c53e
TS Incremental build exclude test files (#95610)
* add base config for all the TS projects

* all the project use new tsconfig.project.json

* compile test files in the high-level tsconfig.json

* fix TS error in maps plugin

* fix TS error in infra plugin

* exclude mote test and test until folders

* uptime. do not import test code within prod code

* expressions. do not import test code within prod code

* data: export mocks from high level folder

* task_manager: comply with es client typings

* infra: remove unused enzyme_helpers

* check_ts_project requires "include" key

* ts_check should handle parent configs

* all ts configs should extend base one

* exclude test folders from plugins

* update patterns to fix ts_check errors

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* uptime: MountWithReduxProvider to test helpers

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 14:40:47 +02:00
Walter Rafelsberger a1c36e7a06
[ML] Refactor imports using 'elasticsearch' to '@elastic/elasticsearch'. Extend 'isPopulatedOjbect()'. (#95651)
- Gets rid of imports from 'elasticsearch' and replaces them with '@elastic/elasticsearch'.
- Extends isPopulatedObject() to allow an optional array of attributes to check if they exist. Allows us to get rid of the manual and inconsistent usages of hasOwnProperty().
2021-04-01 11:46:17 +02:00
spalger 5a9cff2644 skip suite failing es promotion (#96000) 2021-03-31 18:23:46 -07:00
Aaron Caldwell 5db8027657
[Maps] Show empty list when all saved maps in list deleted (#95126)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 21:15:42 -04:00
Søren Louv-Jansen e0a1fe18be
[APM] Fix spaces issue for static index patterns (#95799) 2021-04-01 00:43:20 +02:00
spalger 0cdf445718 skip suite failing es promotion (#96002) 2021-03-31 15:24:17 -07:00
spalger c66937d4c6 skip suite blocking es promotion (#96001) 2021-03-31 15:19:58 -07:00
spalger aa81dc52f6 skip flaky suite (#96000) 2021-03-31 15:13:06 -07:00
Spencer 16a176af98
never run webpack with --progress on CI (#95967)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-03-31 14:04:42 -07:00
Phillip Burch 96ccd31477
Add anomaly detection telemetry (#95802)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 15:55:46 -05:00
Tim Sullivan 0fce2427e5
[Reporting] CSV Export: fix and unskip failing test (#95824)
* [Reporting] CSV Export: fix and unskip failing test

* fix snapshot extra records

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 13:12:19 -07:00
spalger 2a3edb0adb skip flaky suite (#95591) 2021-03-31 13:06:04 -07:00
Nicolas Chaulet b13181a539
[Fleet] Fleet server invalidate api keys for agent < 7.13 (#95789) 2021-03-31 15:53:28 -04:00
Kevin Qualters 03b104cc61
[Security Solution][RAC][Timeline] Timeline plugin skeleton and test plugin harness (#95683)
* [RAC][Security Solution] Initial timeline and test plugin harness

* Change plugin name from timeline to timelines
2021-03-31 15:33:19 -04:00
Devon Thomson fe17879ae3
[Time to Visualize] Allow By Value Flow Without Visualize Save Permissions (#95951)
* Made sure users can use by value workflow without visualize save permissions
2021-03-31 15:30:50 -04:00
CJ Cenizal b531d28364
Add "Include aliases" toggle to the Restore Snapshot Wizard (#95882)
* Add support for includeAliases to restore API endpoint, with unit tests.
* Remove unused deserializeRestoreSettings function.
* Add 'Include aliases' option to the UI, with default value of true.
* Add client integration test.
2021-03-31 12:29:07 -07:00
Zacqary Adam Xeper f7caf44876
[Fleet] Match telemetry key names to UI agent states (#95567) 2021-03-31 15:10:46 -04:00
Thomas Neirynck d2e2209cf2
[Maps] Make bundle smaller (#95881) 2021-03-31 14:43:24 -04:00
Aleksandr Maus 524ce98805
Add user to .fleet-actions mapping (#95935)
* Add user to .fleet-actions mapping

* Leave only user.id, remove the rest of added fields

* Flatten to user_id
2021-03-31 14:04:41 -04:00
Ece Özalp 178c2de5fd
[Security Solution] Populates threat.indicator.event with _source.event (#951) (#95697)
* [Security Solution] Add event data to threat.indicator (elastic/security_team/#951)

* fixes mappings, updates tests

* refactor mappings
2021-03-31 11:37:24 -04:00
Nicolas Chaulet 9e55b8b6c8
[Fleet] Create Fleet server indices with auto_expand_replicas (#95924) 2021-03-31 11:25:18 -04:00
Nathan Reese 5f487292fb
[Maps] convert ToolbarOverlay to TS (#95368)
* [Maps] convert ToolbarOverlay to TS

* remove getDerivedStateFromProps

* remove unused function

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 08:50:40 -06:00
spalger 73109fb3ab Revert "[Time to Visualize] Allow By Value Flow Without Visualize Save Permissions (#93846)"
This reverts commit cfe5f9c016.
2021-03-31 07:25:57 -07:00
Joe Reuter 53584c694d
[Lens] Introduce single percentile and make it filterable in Lens (#95439) 2021-03-31 16:19:31 +02:00
Joe Reuter 50d21dad8c
[Lens] Fix runtime field test flakiness (#95650) 2021-03-31 15:59:41 +02:00
Devon Thomson cfe5f9c016
[Time to Visualize] Allow By Value Flow Without Visualize Save Permissions (#93846)
* Made sure users can use by value workflow without visualize save permissions
2021-03-31 09:44:56 -04:00
Marco Liberati 004a9a14c8
[Lens] Unskip a11y test in Lens (#95904) 2021-03-31 15:31:29 +02:00
Ryan Keairns b301d416b7
Update Cloud plugin to handle new config in kibana.yml (#95569)
* Handle cloud urls from kibana.yml

* Add types to utils params

* Update utils

* address nits

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 07:49:50 -05:00
ymao1 7ef8be6031
Fixes Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list·ts - Actions and Triggers app alerts list should unmute single alert (#95808)
* Unskipping test

* Adding retries

* Adding retries

* Adding retries
2021-03-31 07:43:48 -04:00
Jean-Louis Leysens 44a46358c2
[Snapshot Restore] Migrate to new ES client (#95499)
* wip, migrated routes and plugins

* refactored all ES error handling to use handleEsError and new isEsError detection

* - fixed Jest tests for new es client
- updated routes in light of new responses

* remove unused import

* remove unecessary isEsError check in rest api route handlers

* mute all incorrect types from client lib using @ts-expect-error

* reordered and clean up imports, removed legacy client code

* update legacy test runner

* updated use of legacyES

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 11:55:41 +02:00
Joe Reuter a9d0b6f478
Simplify date histogram meta and apply interval scaling to all levels (#95206) 2021-03-31 11:31:48 +02:00
Pierre Gayvallet ddac0e9501
add per space configuration to custom header banner (#94449)
* restore the banners ui settings

* fix banner init logic

* fix unit tests

* update telemetry schema

* add basic server-side plugin tests

* add FTR tests for banners plugin

* use keyword for sensitive setting

* update snapshots

* setting name consistency with configuration properties

* fix setting names in telemetry files

* open banner links in new tab

* add config.disableSpaceBanners property

* fix types

* add descriptions to banner settings

* change label and value header->top

* finishing header->top replacement

* doc nits

* add banners section to advanced options doc

* feedback on advanced options doc

* adapt deprecation to new format
2021-03-31 10:57:06 +02:00
Yulia Čech ae1014bdd8
[ILM] Integer validator for timing and rollover fields (#95438)
* Added decimals validation for phase timing field and rollover age and docs number fields

* Refactored min age field validator

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 10:45:15 +02:00
István Zoltán Szabó e5e68ecff1
[ML] Clarifies label vs class terminology in DFA UI text. (#95770) 2021-03-31 10:17:35 +02:00
Bryan Clement e365396810
[Asset Management] Osquery agent picker (#94541)
* first pass of osquery host picker

* passes type checking and linting

* reworked everything

* fixed the policy query and pill colors

* fix i18n test failures

* refactor server side logic

* more clean up

* address pr comments

* fix types, await the parsed agents on the server side

* primitive is spelled with an i

* agents come in as list rather than agents

* added more helpers tests, added some edge case guarding

* unwrap agents off response in useAllAgents

* used proper types for aggregations

* translations for more ui text

* fix linting errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 04:13:19 -04:00
Jean-Louis Leysens 97c96104b9
[Ingest pipelines] Prepare processors editor for EUI v8 (Amsterdam theme) (#95310)
* remove shadows from eui panel at all levels

* added "hasBorder" to support nested panels

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 10:06:19 +02:00
Tiago Costa 50313f75f6
chore(NA): enable preserve symlinks for ts without breaking packages development (#95433)
* chore(NA): move elastic-datemath into a ts package

* chore(NA): finish elastic-datemath

* chore(NA): finish elastic-datemath

* chore(NA): source folder for elastic-datemath

* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages

* chore(NA): add sourcemaps to packages on typescript

* chore(NA): move test fixtures within source

* chore(NA): correct exclusions on packages

* chore(NA): correct package.json on all packages

* chore(NA): correct package.json on all packages

* chore(NA): complete kbn pm

* chore(NA): default export on elastic-datemath

* chore(NA): include logs on kbn-logging

* chore(NA): update bundle ref module to last code used in the webpack upstream

* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored

* chore(NA): remove override method for exportsArgument

* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package

* fix(NA): typescript projects check

* fix(NA): run optimizer integration tests from source

* chore(NA): fix usage from target for kbn optimizer

* chore(NA): path on tsconfig

* chore(NA): move tsignore into ts-expect-error

* chore(NA): include souce maps on kbn cli dev

* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools

* chore(NA): add issue links into the ts-expect-error comments
2021-03-31 00:02:22 +01:00
Quynh Nguyen cd4483f391
[ML] Fix runtime type import from data/common (#95841) 2021-03-30 16:58:31 -05:00
Jason Stoltzfus 80a19a86d7
[App Search] Result settings form (#95462) 2021-03-30 17:07:16 -04:00
Quynh Nguyen a1bc9a57bd
[ML] Fix Anomaly Detection wizard full time range chart blank with saved search containing runtime fields (#95700)
* [ML] Fix AD wizard full time range chart broken with saved search

* [ML] Update runtimeMappingsSchema to be its own thing for better reuse

* [ML] Remove undefined check
2021-03-30 14:35:23 -05:00
Bryan Clement d6370f4e51
updated osquery autocomplete to v4.7.0 schema (#95741)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 12:09:23 -07:00
Kevin Logan 9c21f41da9
add linux and mac diagnostics switches (#95819)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 14:52:02 -04:00
Constance 53d4fa7052
[App Search] API logs: Server route + ApiLogsLogic + useEffects (#95732)
* Set up API route

* Set up API types

* Set up date util needed by filters dates

* Add ApiLogsLogic

* Update ApiLogs and EngineOverview views with polling behavior

* Add API type notes - maybe serves as a TODO to clean up our API data some day
2021-03-30 14:35:54 -04:00
Angela Chuang f21417660a
[SecuritySolution] Reorganize files for timeline / notes / pinnedEvents (#94358)
* re-organize files

* fix unit tests

* fix unit test

* fix types

* fix types

* fix unit test

* reorganize files

* update dependency

* fix unit test

* rename filders

* unit test

* update prepackaged timelines path

* fix integration tests

* check if lastSeen is an array

* rename Note to Notes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 14:20:46 -04:00
Diana Derevyankina 78b16fd5d3
[TSVB] Show an indicator when using Last Value mode (#91977)
* [TSVB] Show an indicator when using Last Value mode

* Extended some TSVB types, remove unused translations and do some refactoring

* Fix some functional tests and label displaying for Last value

* Fix some functional tests and label displaying for Last value

* Refactor data_time_range_mode_label and change some types

* fix CI

* Refactor timeseries_visualization seriesData

* Remove unused re export

* Replace "href" prop with "onClick" in EuiLink and refactor tooltip content

* Change link to text and add pointer style to it

* FIx import in kibana_framework_adapter

* Remove label for entire time range mode and add an icon for last value mode label

* Add action to show last value label for TSVB embeddables

* Fix TimeseriesVisParams import

* Revert "Add action to show last value label for TSVB embeddables"

This reverts commit 15f16d6f72.

* Put the "Last value" badge on the top of visualization and add an option to hide it

* Fix failing _tsvb_markdown test and refactor timeseries_visualization

* Move I18nProvider frim timeseries_visualization to timeseries_vis_renderer

* Add condition to hide gear button when entire time range mode is enabled, fix gauge scroll issue

* Change text in the popover, add condition to indicator if series data is empty, create migration script to hide last value label for previously created visualizations and a test for that

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-03-30 19:41:52 +03:00
Ahmad Bamieh a67aa97989
[Core] create deprecations service (#94845)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 19:20:23 +03:00
Joe Reuter ceb4c9a160
do not re-render embeddable so often (#95653) 2021-03-30 18:01:41 +02:00
Shahzad a154d92d6f
update mock and types (#95771) 2021-03-30 17:51:52 +02:00
Paul Tavares c8bc57257b
[FLEET][Artifacts] Use artifact information to generate a unique ID when creating a new Artifact (#95705)
* Change id generation for artifact create
2021-03-30 11:50:54 -04:00
Aleksandr Maus 1bfa719d29
Disable indexing for .fleet-agents action_seq_no field (#95584)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 11:40:07 -04:00
renovate[bot] 47761eed5d
Update vega related modules (master) (#92651)
* Update vega and vega-lite

* Update specs for vega-lite

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
2021-03-30 17:27:33 +03:00
David Sánchez 1f033f3786
[Security Solution] User can filter Trusted Applications by Hash, Path, Signer, or Trusted App name (#95532)
* Allows filter param. Empty by default

* Uses KQL for filter from Ui

* Adds search bar to dispatch trusted apps search. Fixes some type errors. Added filter into the list View state

* Fix tests and added a new one. Also split query on array to improve readability

* Decouple query parser to be used outside the middleware

* Reuse code using a map

* Filter by term using wildcards. Updates test

* Adds useCallback to memoize function
2021-03-30 16:09:34 +02:00
Nathan Reese 81b46931f8
[file_upload] add has_import_permission route (#95190)
* [file_upload] add has_import_permission route

* remove ml hasImportPermissions

* fix tsconfig path

* tslint

* review feedback

* make pipeline check optional since geojson upload does not use pipeline

* ts cleanup

* make geojson permission failure message actionable

* revert privilege change in functional test

* add global_index_pattern_management_all permission to functional test

* rename hasPipeline to checkHasManagePipeline

* add api integration test

* tslint

* revert change to es_search_source

* simpilify error message when users can't create index pattern

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 07:48:07 -06:00
Shahzad 9d8a2f183e
[Lens] Expose events from lens for lens embeddable (#94670)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 15:19:35 +02:00
Scotty Bollinger c6b37dec70
[Workplace Search] Add download diagnostics button to source settings (#95726)
* Add routes

* Add button to UI
2021-03-30 10:07:58 -03:00
Tiago Costa 01bf004193
skip flaky suite (#95707) 2021-03-30 14:01:07 +01:00
Mike Côté 3abb79a179
Create new alerting HTTP APIs that use the new terminology (#93977)
* Move current alert HTTP APIs to legacy folder (#93943)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Create new rule HTTP APIs (#93980)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Move current alert HTTP APIs to legacy folder (#93943)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Add necessary files

* Create rule route

* Get rule API

* Update rule API

* Delete rule route

* Aggregate rules API

* Disable rule API

* Enable rule API

* Find rules API

* Fix Update API

* Get rule alert summary API

* Get rule state API

* Health API

* Rule types API

* Mute all API

* Mute alert API

* Unmute all API

* Unmute alert route

* Update API key API

* corrected tpye by making it much more complicated

* removed unneeded cocde

* Fixes

* Add back health route

* mutedInstanceIds -> mutedAlertIds

* lastRun -> last_run

* alert_type_state -> rule_type_state & alert_instances -> alerts

Co-authored-by: Gidi Meir Morris <github@gidi.io>

* Create docs for new rule HTTP APIs, deprecate old docs (#94745)

* Create docs for new APIs, deprecate old docs

* Remove connector_type_id

* Update docs

* Add link to legacy APIs from rules API docs

* Remove connector_type_id references

* [DOCS] Add legacy APIs to index.asciidoc

* Fix camel case

Co-authored-by: lcawl <lcawley@elastic.co>

* Make alerting tests use new rules APIs (#95159)

* Make API integration tests use new HTTP APIs

* Fix end to end tests

* Fix test failures

* Fix more test failures

* Rename some files

* Add tests for legacy APIs (#95333)

* Initial commit (#95457)

* Move some new alerting APIs to /internal (#95461)

* Initial commit

* Update README.md

* Use internal API

* Merge deprecated warning w/ alternative solution

* Update API docs

Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2021-03-30 08:27:28 -04:00
Liza Katz b58dd3efe8
[Sessions] Extract search abort controllers logic into a separate class (#95688)
* simplify abort controller logic and extract it into a class

* docs

* delete unused tests

* code review

* code review

* code review
2021-03-30 15:24:30 +03:00
Byron Hulcher e91d0d4a76
[App Search] Add a Sample Engine CTA panel to the engines table when empty (#94647)
* Added new onboarding complete route for App Search

* Allow responses without JSON bodies in Enterprise Search

* New SampleEngineCreationCtaLogic

* New SampleEngineCreationCta component

* Add SampleEngineCreationCTA to engines EmptyState

* Improve SampleEngineCreationCta

* Fix spelling error in Enterprise Search request handler test

* Improve SampleEngineCreationCtaLogic

* Fix types

* Fix tests after origin/master merge

* Turns out I 'fixed' my tests by removing this test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 06:49:02 -04:00
Mikhail Shustov 5b6927863a
Better error serialization for error provided to HTTP response factory (#95671)
* pass error reason for ES responses provided in HTTP response body

* add a test

* ML: update functional tests when index does not exist

* transform: fix integration test for error message
2021-03-30 12:46:17 +02:00
Angela Chuang 643760dfec
[SecuritySolution] Unskip uncommon_processes·ts (#95343)
* wrap with retry

* wrap with retry

* wrap tests with retry

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 11:20:52 +01:00
David Sánchez 41e247f29f
Fix unit test. Get rid of snapshots and use query element instead (#95656) 2021-03-30 12:12:33 +02:00
Alejandro Fernández Gómez 9931b8bc1d
[Fleet] Expose permissions as part of the agent policy (#94591) 2021-03-30 11:46:41 +02:00
Robert Oskamp 3e4af77d5a
[ML] Functional tests - stabilize anomaly explorer tests for slow network (#95628)
This PR stabilizes the ML anomaly explorer functional tests for slow network environments.
2021-03-30 10:51:00 +02:00
James Rucker 4c89da2b45
[Workplace Search] Send kibana_host when calling /reauth_prepare (#95529)
* WIP almost there?

* Fix server route validation

* fix account route

* Fix test expectations

Co-authored-by: scottybollinger <scotty.bollinger@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 21:49:16 -04:00
Zacqary Adam Xeper 28410539b5
[Fleet] Configure Fleet packages and integrations through endpoint (#94509) 2021-03-29 21:41:27 -04:00
Scotty Bollinger 73f60e132d
[Enterprise Search] Fix bug in indexing status (#95719)
* Add interface

The component was already passing the props the logic file needed, they just aren’t listed in the interface

* Pass props to logic file

Also destructures from props to prevent collision with the local logic values that are repopulated when data is fetched.

* Update logic file to use props for default values

* Fix test and use spy

* Remove resetContext

No longer needed!
2021-03-29 20:59:21 -04:00
igoristic caec3d4749
[DOC] Updated documentation for newly added monitoring alerts (#91272)
* Documentation for recently added alerts

* [DOCS] Fixes broken link

* Addressed review feedback

Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 18:26:09 -04:00
Søren Louv-Jansen 0defebd649
[APM] Improve api tests (#95636)
* [APM] Improve api tests

* Fix typo
2021-03-30 00:12:46 +02:00
Pierre Gayvallet 683d140229
fix globalSearchBar jest env (#95640) 2021-03-29 22:23:29 +02:00
Paul Tavares c5e24f65b4
[Security Solution][Endpoint] Migration of user generated Artifacts to Fleet (#95481)
* Migration of artifacts from SO to fleet index
* Better errors out of fleet server setup
* Expose `fleetSetupComplete()` out of FleetStartContract
* Ensure that ManifestTask only runs after `.start()` is called
2021-03-29 14:19:51 -04:00
Constance 35d0ac8d1c
[App Search] Remove API logs/Analytics-specific unavailable logic (#95601)
* EngineOverview: Remove apiLogsUnavailable logic & UnavailablePrompt

* Analytics: Remove analyticsUnavailable logic & AnalyticsUnavailable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 14:00:32 -04:00
Larry Gregory f35e291e8d
Increase timeout for user management tests (#95661) 2021-03-29 13:57:48 -04:00
Constance 04340d3ad1
[Enterprise Search] DRY out various repeated action button copy (#95114)
* DRY out repeated button/table/modal actions copy to a shared file

* DRY out 'Edit' copy

* DRY out 'Delete' copy

* DRY out 'Save' copy

* DRY out 'Cancel' copy

* DRY out 'Continue' copy

* DRY out 'Close' copy

* DRY out 'Manage' copy

* DRY out 'Update' copy

* [WS] DRY repeated 'Update'/'Save'/'Cancel' copy

* [AS] DRY out 'Restore defaults' button

- used on 2 pages so far, and will also be used on result settings

* PR feedback: Add _BUTTON_LABEL specificity
2021-03-29 13:57:25 -04:00
Chandler Prall f667aa2d29
Upgrade EUI to v31.10.0 (#93796)
* Upgraded eui version, updated jest snaapshots

* Upgrade EUI to v31.10.0 & update tests

* increase expected histogram brush size result

* revert dev_server snap

* update baseline dashboard reporting png

* avoid multiple acton menu openings when verified that the action exists and is enabled

* update dashboard table expand button

* update dashboard tsvb baseline

* Adjust 2 cypress tests

* snapshot update

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 11:20:30 -06:00
Quynh Nguyen 587f83a859
[ML] Add search time runtime support for index based Data Visualizer (#95252)
* [ML] Add runtime support from index pattern for data viz

* [ML] move runtime mappings outside of aggregatableFields loop

* [ML] Change arg name to runtimeMappings

* [ML] Fix dv full time range broken

* [ML] Fix dv broken with time range

* [ML] Add better error handling/transparency

* [ML] Update to using estypes.RuntimeField

* [ML] Update to use some shared common functions between ml and transform

* Revert "[ML] Update to use some shared common functions between ml and transform"

This reverts commit ce813f01

* [ML] Disable context menu if no charts
2021-03-29 12:10:08 -05:00
Jason Stoltzfus 3f86bab334
[App Search] Refactor Result Settings logic (#95531) 2021-03-29 12:54:20 -04:00
Wylie Conlon fe66162ef2
[Lens] Fully unmount React when flyout closes (#95359)
* [Lens] Fully unmount React when flyout closes

* Fix bug with editor frame unmounting

* Fix type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 12:33:05 -04:00
igoristic f9ca6dca65
[Monitoring] Removed timefilter refresh override (#94648)
* Removed refresh override

* Changed default behavior

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 12:21:15 -04:00
Anton Dosov 92af812c82
[Search Sessions] Display time labels in search session popover (#95082) 2021-03-29 17:45:08 +02:00
Adam Locke f92381eca9
Update link for enabling security (#95519)
* Update link for enabling security

This change updates the `elasticsearchEnableSecurity` link to the new page for [Configuring security for the Elastic Stack](https://www.elastic.co/guide/en/elasticsearch/reference/master/configuring-stack-security.html).

Closes #84337

* Updating test to use expected doc link.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 11:34:04 -04:00
James Gowdy 478ad3bad5
[Fleet] Adding ML module asset type (#94950)
* [Fleet] Adding ML module asset type

* adding test

* guessing asset ids

* better guess at IDs

* renaming asset ids

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 16:21:49 +01:00
Uladzislau Lasitsa 0e40b94348
[TSVB] Change the default mode from last value to entire timerange (#93608)
* Make 'enter time range' value as default and add telemetry for 'last value' mode

* Fix telemetry schema

* Fix test

* Add possibility count timeseries created from dashboard

* Fix remark

* Fix remark

* Fix problem with time_range_mode

* Fix tests

* Fix tests

* Fix tests for markdown and table

* exclude TSVB which have type as timeseries

* Add description for field in schema in telemetry

* Fix telemetry schema

* Fix some remarks

* Added check for hits

* fix CI

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-03-29 17:31:01 +03:00
Georgii Gorbachev d16101f377
[Event Log] Extend ECS event schema with fields needed for Detection Engine (#95067)
**Related to:** https://github.com/elastic/kibana/pull/94143

## Summary

This PR adds new fields to the schema (`EventSchema`, `IEvent`):

- standard ECS fields: `error.*`, `event.*`, `log.level`, `log.logger`, `rule.*`
- custom field set `kibana.detection_engine`

We need these fields on the Detections side to implement detection rule execution log. See the related proposal (https://github.com/elastic/kibana/pull/94143) for more details.

Also, this PR bumps ECS used in Event Log from `1.6.0` to the current `1.8.0` version. They are 100% same in terms of fields used in Event Log, so no changes in the schema were caused by this version increment.
2021-03-29 14:59:36 +02:00
Marta Bondyra a1748cb3a7
[Lens] remove warnings when running tests (#95637) 2021-03-29 14:25:08 +02:00
Tiago Costa cf8ebe619b
skip flaky suite (#92358) 2021-03-29 13:11:33 +01:00
Marta Bondyra 755c186c28
[Lens] Multiple drop targets (#93616) 2021-03-29 14:07:39 +02:00
Tiago Costa a10e3d4f2b
skip flaky suite (#91450) 2021-03-29 13:05:33 +01:00
Alexey Antonov 4342f26eaf
[TSVB] Enable dual mode, support index patterns and strings (#92812)
* [TSVB] Enable `dual mode`, support index patterns and strings

* modify UI

* add migration script

* refactoring

* fix CI

* prefill the index pattern name

* modify UI

* modify UI

* update UI

* fix functional test

* some work

* remove callouts

* fix rollup test

* update UI

* fix typo

* add some unit tests

* add functional test

* fix CI

* correct labels

* fix ci group 12

* cleanup interface

* fix CI

* cleanup API

* fix some of PR comments

* move index patterns into so references

* remove wrong logic

* fix JEST

* fix some ui issues

* update sample data

* indexPatternObject -> indexPatternValue

* fix comments

* I have a dashboard with two TSVB viz. One with the default (haven't applied it to the combobox) and one with the logs. The filter contains fields only from the logs index pattern

* When I am on the string mode and try to write my index, sometimes some of the chars are not added or they are deleted while typing, something with the denounce maybe?

* fix merge conflicts

* Does this PR also supports runtime fields? I created one from the editor and I see that I can select it

* fix UI issue

* If I create a viz with the string mode and a wildcard e.g. kibana_sample*, the index patterns are not communicated correctly to the dashboard.

* fix import/export refs for dashboard

* remove MigrationPopover

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 04:32:01 -04:00
Søren Louv-Jansen 84adfe551b
[APM] Add elasticsearch queries to api response (#95146) 2021-03-29 07:50:27 +02:00
Yara Tercero 17d3907730
[Security Solution][Exceptions] - Moves ExceptionItem component to lists plugin (#95246)
## Summary

Moves part of the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I am moving single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.

The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the `BuilderExceptionItem` which deals with rendering the individual exception items.
2021-03-26 20:59:49 -07:00
Yuliia Naumenko 80fdcde813
[Alerts][Actions] Added missing telemetry mapping for a new alert and action types: geo-containment, es-query, teams (#95464)
* [Alerts][Actions] Added missing telemtry mapping for a new alert and action types: geo-containment, es-query, teams

* fixed mappings

* fixed ML alert type telemetry mappings

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 19:45:24 -07:00
Marshall Main 533a7bb56f
[Security Solution] Split rule executor by rule type and validate type specific rule params (#94857)
* Split rule executors into different files

* Pass type-specific rule SOs to rule executor functions

* Genericize function to narrow ruleSO type

* Remove undefined return type from getExceptions

* Remove unintentional change to SIGNALS_TEMPLATE_VERSION

* Remove extra validation now covered by schemas

* Remove extra validation from ML rule executor

* Fix types

* syncs schemas

* Revert "syncs schemas"

This reverts commit b1dd59e3f0.

* Fix api test and move threshold executor test

* kinda adds eql test

* Refactor and fix unit tests

* fixes marshalls mistake

Co-authored-by: Davis Plumlee <davis.plumlee@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 19:44:46 -07:00
Brian Seeders b94e2338d1 skip failing suite (#95596) 2021-03-26 20:36:06 -04:00
John Dorlus 10713fcc52
Add Component Integration Test For Byte Processor (#95130)
* Addded test for Bytes processor.

* Broke out processor not selected section of tests to its own test and made edits per feedback in PR.

* Broke out processor data fetching to a separate reusable helper function.

* Broke out processor data fetching to a separate reusable helper function.

* Added functionality for toggling the ignore missing switch.

* ES lint fix.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 19:09:19 -04:00
liza-mae b7d8ada65a
Fix reporting test (#95586) 2021-03-26 16:33:29 -06:00
Brian Seeders b95e5a996a skip failing suite blocking ES promotion (#95594) 2021-03-26 17:46:20 -04:00
Brian Seeders 1362561a03 skip flaky suite (#95592) 2021-03-26 17:40:01 -04:00
John Schulz 7f15931725
[Fleet] /bulk_unenroll response matches other bulk action APIs (#95571)
## Summary
`/agents/bulk_unenroll` should return a response with a result for each agent given; including invalid or missing ids. It currently returns an empty object. https://github.com/elastic/kibana/issues/90437


[TS type diff for response](dd34e4c5ef/x-pack/plugins/fleet/common/types/rest_spec/agent.ts (L124-L130))

```diff
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface PostBulkAgentUnenrollResponse {}
+ export type PostBulkAgentUnenrollResponse = Record<
+   Agent['id'],
+   {
+     success: boolean;
+     error?: string;
+   }
+ >;
```

### Checklist

- [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
2021-03-26 17:36:39 -04:00
Brian Seeders 173731b342 skip flaky suite (#95590) 2021-03-26 17:23:12 -04:00
Oliver Gupte 86d4054930
[APM] Fix for correlations inconsistent loading errors in Errors tab (#93443) (#95437) 2021-03-26 13:22:32 -07:00
Candace Park 4ff9bfd113
[Security Solution][Endpoint][Admin] Match endpoint list host status with fleet agent status (#95243) 2021-03-26 16:17:12 -04:00
Yara Tercero 2aae753c54
[Security Solution][Exceptions][Builder] -Move exception builder entry item exceptions ui over to lists (#94515)
## Summary

Beginning to move the exceptions UI out of the security solution plugin and into the lists plugin. In order to keep PRs (relatively) small, I plan to move single components at a time. This should also then help more easily pinpoint the source of any issues that come up along the way.

The next couple PRs will focus on the exception builder. This one in particular is focused on moving over the `BuilderEntryItem` which deals with rendering the individual exception item entries. An entry can be of type `match`, `match_any`, `list`, `exists`, or `nested`. The component makes use of the autocomplete fields which use the index patterns to display possible fields and field values. 

One of the decisions made in this PR was to have consumers of the `BuilderEntryItem` pass through the autocomplete service as opposed to the `lists` plugin adding it as a dependency. The reason being that it is likely that plugins using the lists plugin will already be consuming either the data plugin or if alerting takes exceptions in, then they'll be consuming alerting. In an effort to avoid some possible icky circular dependency issues, though it best to make the service passed in, as we had already been doing with the hooks in the `lists` plugin.
2021-03-26 13:05:27 -07:00
Larry Gregory 31ea160fc7
Move production dependencies out of devDependencies (#93997)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 15:23:45 -04:00
Aleksandr Maus 5518b04eed
Add policy_output_permissions_hash field to .fleet-agents mapping (#95410) 2021-03-26 15:09:58 -04:00
John Barrier Wilson 593b03fc60
[Workplace Search] Design polish: overview page (#95363)
* Rework panels to subdued style

* Fix button when source has been onboarded

* Update content_section test for EuiSpacer

* Update content_section test for EuiSpacer Length

* Lint fix for onboarding_card

* Remove spacer size due to default

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>

* Remove test line for Spacer now that size=default

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-26 14:09:45 -05:00
Nicolas Chaulet db7da2238e
[Fleet] add support for fleet server urls (#94364) 2021-03-26 14:53:35 -04:00