Commit graph

885 commits

Author SHA1 Message Date
Matt Bargar
65258a4ed8
Put filters back in the filter context where they belong (#42095) (#42496)
Filters were never really meant to take part in scoring in the first place. This PR puts filters back in the filter context where they were in 4.x so they can benefit from the filter cache.
2019-08-02 10:36:00 -04:00
Aleh Zasypkin
7ded0b6f2e
[7.x][@kbn/es] Add a predefined list of Elasticsearch secure settings to be added into keystore. Re-enable OIDC tests. (#42424) 2019-08-01 10:40:54 +02:00
Ahmad Bamieh
980ec8caa3
[7.x] [telemetry] Analytics Package (#41113) (#41774) 2019-07-24 17:16:24 +03:00
Tiago Costa
1332b359e5
chore(NA): enable @typescript-eslint/explicit-member-accessibility rule (#41422) (#41579) 2019-07-19 17:48:47 +01:00
Spencer
5ebce78600
[7.x] [Kibana Plugin Generator]target branch → version (#3020… (#41516)
A version error will occur each time the following procedure is executed.
Changing「6.6」 from 「6.6.1」 will succeed.
So I changed branch (6.6) to version(6.6.1).

1.Execute「node scripts/generate_plugin my_plugin_name」with [Kibana Plugin Generator][Quick Start]
2.Answer「6.6」to the question 「What Kibana version are you targeting?(6.x)」
3.Execute「yarn start」
2019-07-18 15:30:13 -07:00
Spencer
68f14413a7
[7.x] [jest] disallow invalid describe calls (#41378) (#41483)
* [jest] disallow invalid describe calls

* correct other describe calls

* remove unnecessary glob

* cast decribe names to strings

* remove new async describe function

# Conflicts:
#	x-pack/legacy/plugins/index_management/__jest__/client_integration/home.test.ts
#	x-pack/test/functional/apps/uptime/monitor.ts
2019-07-18 15:25:50 -07:00
Vadim Dalecky
ce3c46584b
[7.x] chore: 🤖 forbid import from ui/** (#40537) (#41514)
* chore: 🤖 forbid importing from ui/** from within shims

* chore: 🤖 allow importing platfrom in dashboard embeddable sihm

* chore: 🤖 use np_ready folder, improve rule

* chore: 🤖 update ESLint error message

* feat: 🎸 improve eslint plugin rule

* test: 💍 add tests for restricted paths linter rule

* test: 💍 add ESLint package to CI testing suite

* chore: 🤖 fix linter errors
2019-07-18 23:55:21 +02:00
Spencer
614af05967
[7.x] [autoprefixer] upgrade to 9.6.1, unify browserslist hand… (#41145)
* [autoprefixer] upgrade to 9.6.1, unify browserslist handling

* remove debug option from datemath babel config
2019-07-15 13:01:17 -07:00
Aleh Zasypkin
935876eb44
[7.x] Make Kerberos authentication provider work with Elastic anonymous access. (#41137) 2019-07-15 18:57:07 +02:00
Brandon Kobel
b89231d119
Updating lodash (#40702) (#41025)
* Updating to @elastic/lodash to 3.10.1-npm-kibana2

* Updating lodash to 4.17.13

There's a stray dependency to lodash 4.17.11 via cypress which doesn't
use "^". This is a dev dependency, so we can ignore it for a bit while
they update their package.json

* Updating some forgotten references to @elastic/lodash@3.10.1-kibana1

* Updating lodash-es to 4.17.13

* Updating to @elastic/lodash to 3.10.1-npm-kibana3

* Using the root resolutions to update cypress's version of lodash.

Thanks @spalger!!!
2019-07-12 11:42:06 -07:00
Spencer
1591c25148
[7.x] [ts] upgrade to 3.5.3 (#40228) (#40795)
* [ts] upgrade to 3.5.3 (#40228)

* [ts] upgrade to 3.5.2

* [ts] run from cwd so that relative paths are correct

* move eslint-disable-line comment into jsx attribute

* autofix eslint violations

* avoid generic type, it's not necessary and problematic

* make elasticsearch.cluster optional, many instances don't have them

* remove invalid prop

* expand AllowUnknownProperties to cleanly handle arrays

* esfilter values can sometimes be an array of strings

* allow exception objects to have unknown properties

* define accumulator as a boolean

* fix return type

* return a 404 if beat isn't found after update

* use Object.values for better types

* define return type of get() call

* define value type for Set

* define return value of get()

* define State property type

* use less get(), so ts can infer types

* define Set item type

* map state type

* make default_operator optional, since it's not always defined

* remove seemingly unused prop

* define return type of get() fn

* define inner type for state

* don't define base types are objects with index signatues

* regenerate public api docs

* make indices privileges optional too

* remove unnecessary index-signature from Exception interface

* use variadic _arg instead

* [core/plugin] use Record<string, any> rather than {}

* replace a couple more instances of {}

* revert some unnecessary changes

* remove unused types

* [reporting] output, payload, and meta are required properties

* bump to latest patch version

# Conflicts:
#	x-pack/legacy/plugins/canvas/server/usage/custom_element_collector.ts
#	x-pack/legacy/plugins/canvas/server/usage/workpad_collector.ts

* define inner type for Set

* default `config.get()` to any instead of unknown
2019-07-10 15:22:35 -07:00
Spencer
95658050cf
[kbn/es] add command to build es snapshots for each license an… (#40331) (#40453) 2019-07-08 23:21:47 -07:00
Greg Thompson
4a4d29eee2
[7.x] Upgrade EUI to v10.0.1 (#35112) (#40533)
* Upgrade EUI to v10.0.1 (#35112)

* eui@10.0.0; tsconfig update

* limit key lookups to strings

* Search Profiler hightlight details flyout classes

* bump

* snapshot updates

* x-pack snapshot updates

* keyofstringsonly update
2019-07-08 16:41:44 -05:00
Ahmad Bamieh
daaefbafb5
[7.x] [Core] Remove lock file from packages/kbn-spec-to-consol… (#40460)
* remove lock file from packages/kbn-spec-to-console and update jest

* update handlebars to 4.1.0

* update jest-cli
2019-07-06 14:15:56 +03:00
Mikhail Shustov
f16b50a8d2
Extend @kbn/config-schema (#40118) (#40341)
* support null for literal type

* support schemas withing right operand of conditional type

* add never type to ban usage

* remove never options. add when needed

* add tests for Reference.isReference
2019-07-04 12:24:37 +02:00
Spencer
6fda5bf3bf
force snapshot artifact if KBN_ES_SNAPSHOT_URL is set (#40317)
* force snapshot artifact if `KBN_ES_SNAPSHOT_URL` is set

* override the snapshot to a specific build at a custom url
2019-07-03 18:39:09 -07:00
spalger
f663e18cb8 [7.x] [prettier] upgrade to 1.18.2 (#40229)
* [prettier] upgrade to 1.18.2

* autofix prettier violations

(cherry picked from commit a95ae8c037)
2019-07-03 13:00:44 -07:00
Sébastien Loix
2f63d5fed5 Console update autocomplete definitions (#39508) (#40178) 2019-07-02 16:46:14 -07:00
Spencer
e87bbe0307
[7.x] Update dependency eslint-plugin-import to v2.18.0 (#3993… (#39965)
* Update dependency eslint-plugin-import to v2.18.0

* fix new import order violations
2019-06-29 02:19:54 -07:00
Spencer
26806fb1eb
[7.x] Update dependency babel-eslint to v10.0.2 (#39932) (#39951) 2019-06-28 15:40:22 -07:00
Spencer
8bd948743e [kbn/babel-preset] add readme (#39854)
(cherry picked from commit 066cd55a65)
2019-06-28 11:09:48 -07:00
Andrew Goldstein
c61fe5d68c
[SIEM] Bootstrap Cypress Tests (#39588) (#39868)
# Cypress Tests

The `siem/cypress` directory contains end to end tests (specific to the `SIEM` app) that execute via [Cypress](https://www.cypress.io/).

At present, these tests are only executed in a local development environment; they are **not** integrated in the Kibana CI infrastructure, and therefore do **not** run automatically when you submit a PR.

See the `Server and Authentication Requirements` section below for additional details.

## Organizing Tests and (Mock) Data

- Code and CSS selectors that may be re-used across tests should be added to `siem/cypress/integration/lib`, as described below
- Smoke Tests are located in `siem/cypress/integration/smoke_tests`
- Mocked responses from the server are located in `siem/cypress/fixtures`

### `cypress/integration/lib`

The `cypress/integration/lib` folder contains code intended to be re-used across many different tests.

- Files named `helpers.ts` (e.g. `siem/cypress/integration/lib/login/helpers.ts`) contain functions (e.g. `login`) that may be imported and invoked from multiple tests.

- Files named `selectors.ts` export CSS selectors for re-use. For example, `siem/cypress/integration/lib/login/selectors.ts` exports the following selector that matches the Username text area in the Kibana login page:

```
export const USERNAME = '[data-test-subj="loginUsername"]';
```

## Server and Authentication Requirements

The current version of the Smoke Tests require running a local Kibana server that connects to an instance of `elasticsearch`. A file named `config/kibana.dev.yml` like the example below is required to run the tests:

```yaml
elasticsearch:
  username: 'elastic'
  password: '<password>'
  hosts: ['https://<server>:9200']
```

The `username` and `password` from `config/kibana.dev.yml` will be read by the `login` test helper function when tests authenticate with Kibana.

See the `Running Tests Interactively` section for details.

## Running Tests Interactively

To run tests in interactively via the Cypress test runner:

1. Create and configure a `config/kibana.dev.yml`, as described in the `Server and Authentication Requirements` section above.

2. Start a local instance of the Kibana development server:

```
yarn start --no-base-path
```

3. Launch the Cypress interactive test runner:

```sh
cd x-pack/legacy/plugins/siem
yarn cypress:open
```

4. Click the `Run all specs` button in the Cypress test runner

![cypress](https://user-images.githubusercontent.com/4459398/60113545-39c54f00-972f-11e9-9c0c-5d28aecdf212.gif)

https://github.com/elastic/ingest-dev/issues/515
2019-06-28 11:27:08 -06:00
Jonathan Budzenski
0774415e40
Init @kbn/es readme (#39850)
* init kbn-es readme

* formatting
2019-06-28 10:21:56 -05:00
Peter Pisljar
5341d11005
updating metricvis interpreter func arguments (#34532) (#39872) 2019-06-28 08:16:09 +02:00
Peter Schretlen
475e0b2e8e
upgrade prop-types to an MIT-licensed version (#39526) (#39607) 2019-06-26 12:00:34 -04:00
Spencer
33512feef8
[7.x] Only report the mocha tests once, as "Mocha tests" (#395… (#39582) 2019-06-25 09:02:30 -07:00
Jonathan Budzenski
73f7956fb4
[kbn-es] unset JAVA_HOME when using snapshot bundled jdk (#37316)
* [kbn-es] unset JAVA_HOME when using snapshot bundled jdk

* set explicitly
2019-06-24 13:02:02 -05:00
Mikhail Shustov
0e72b32425
support unknown keys for object type in @kbn/schema-config (#39448) (#39514)
* support unknown keys for object type in @kbn/schema-config

* add test for children objects

* update snapshot test

* allowUnknowns as TypeOptions
2019-06-24 17:21:34 +02:00
Spencer
76599cfefd
[7.x] [kbn/es] support minor version numbers (#39353) (#39409) 2019-06-20 16:27:55 -07:00
Court Ewing
a973cbc7a9 Fix path references into and out of x-pack/legacy 2019-06-20 13:35:00 -04:00
Mikhail Shustov
2466399929
New Platform and Legacy platform servers integration (#39047) (#39263)
* New and Legacy platforms share http server instance.

Required to use a common security interceptor for incoming http requests

* generate docs

* remove excessive contract method

* add test for New platform compatibility

* address comments part #1

* log server running only for http server

* fix test. mutate hapi request headers for BWC with legacy

* return 503 on start

* address @eli comments

* address @joshdover comments
2019-06-19 17:41:50 +02:00
spalger
db0919ebc6 remove tests completely to avoid outdated snapshot errors
(cherry picked from commit 40fc31de46)
2019-06-18 22:14:12 -07:00
spalger
4acb9c3f8f disable flaky tests (#25077) (#36579) 2019-06-18 20:52:22 -07:00
Tim Roes
95bf5c067d
Improve jest mocking infrastructure (#38760) (#39033)
* Always mock metadata/chrome in OSS

* Enable jest env in jest mocks

* Exclude jest mocks in karma bundles

* Use setupFilesAfterEnv in config

* Remove chrome/metadata mock from x-pack

* Remove kuery mock

* Add missing mock to SIEM test

* Fix typo in mock import

* Remove top level capabilities x-pack mock

* Move kfetch mock to ui/public

* Move moment-timezone to mocks file

* Unmock kfetch in kfetch specific tests

* Make kfetch mock manual

* Removed unnecessary jest.mock

* Remove kfetch unmocks
2019-06-15 09:45:40 +02:00
Spencer
5d54189ace
[7.x] [kbn/es] auto retry snapshot download on unexpected errors (#38944) (#38992)
* [kbn/es] auto retry snapshot download on unexpected errors

* missed an await

* pass log to retry()
2019-06-14 13:10:38 -07:00
liza-mae
9ce96bc567
[WIP] FTR Percy changes (#36897) (#38996)
* [ftr/percy] integrate percy with functional test runner

* execute ftr within `percy exec`

* share PERCY_BIN and GRUNT_BIN vars in setup

* [license] whitelist `(Unlicense OR Apache-2.0)`

* [percy] include pr/parallel info in env

* echo the actual variable value

* destructure required modules

* [ci] calculate percy env in a script

* remove outdated eslint overrides

* oops, nonce should be the same for each build

* take snapshots in context tests

* add percy snapshots to some dashboard tests

* account for extra execution of PERCY_BIN

* remove usage of percy service

* rename service to `visualTesting`

* write a simple test

* switch left-over percy test to visualTesting

* set log level for percy agent

* trigger ci

* try using the system chrome install instead of downloading one

* fix export definition

* Don't skip chromium download

* Add Spencer's fix to point to chrome installation

* Attempting to split tests into own ci job and test files

* Renumber job

* Add tag to decorations file

* Try new files with existing CI job

* Try again to create a new CI job

* Fix eslint problem with space

* eslint updates

* fix console test

* make test names unique

* Update ci group names

* Try old name again

* save

* add separate visual_regression ci job

* add visual regression ci job

* add new job to jobs.yml

* update path to take_percy_snapshot script

* use fixed percy job total

* fix common services import

* move visual_create_and_add_embeddables to visual_regression project

* finish moving create_and_add_embeddables

* add x-pack visual regression job

* migrate dashboard_snapshots tests to visual_regression

* remove references to removed test files

* restore some unnecessary changes

* reimplement the login page tests

* yarn.lock update

* fix test

* remove old CI_GROUP 100 block

* update failed_tests trap

* reduce yarn.lock changes

* disable debug logging

* disable visual-regression tests for now, we can enable them in specific prs
2019-06-14 12:16:48 -06:00
Nathan Reese
6f0e6394c1
[Maps] symbolize points with maki icons (#37822) (#38975)
* [Maps] sybmolize points with maki icons

* add from for selecting symbol

* add from for selecting symbol

* get icons working for static colors

* static icon sizing

* refacto symbol_utils

* timing issue

* use SDF icons

* dynamic iconSize

* set icon-anchor

* display symbol icon in map legend

* add unit tests for VectorIcon

* set icon fill based on dark mode

* remove unused file

* fix jest tests

* set icon-opacity

* use size style to configure icon-image small or large

* fix queryRadius error by just hiding other point layer instead of removing

* remove console statement on error

* use maki icon size constants

* add retry around opening set view popover for flaky test
2019-06-14 07:09:41 -06:00
dave.snider@gmail.com
101b4d56cc
Fix focus ring issue in 7.x (#38847)
* Fix focus ring issue in 7.x

* csss file for kui
2019-06-12 16:17:56 -07:00
Spencer
03a2b641f9
[7.x] Update webpack related packages (#38729) (#38799)
* Update webpack related packages

* force updates to transient dep versions

# Conflicts:
#	yarn.lock
2019-06-12 10:20:42 -07:00
Spencer
532ca99882
Update dependency yo to v2.0.6 (#38705) (#38725) 2019-06-11 22:41:04 -07:00
Spencer
b91b003d95
[7.x] Update dependency uuid to v3.3.2 (#38672) (#38699) 2019-06-11 16:13:01 -07:00
Spencer
45920c0d78
[7.x] Update dependency tmp to v0.1.0 (#38590) (#38621) 2019-06-11 09:34:28 -07:00
Matt Bargar
e1a19ccd57
[7.x] Enable use of KQL and autocomplete in filters agg editor (#37287) (#38468)
* Enable use of KQL and autocomplete in filters agg editor (#37287)

This PR updates the filters agg editor to use the full QueryBar component, enabling use of KQL and autocomplete inside the editor for this aggregation in Visualize.

* remove unused translation
2019-06-10 18:24:20 -05:00
Spencer
3a3d595bde
[7.x] Update dependency tabbable to v1.1.3 (#38501) (#38558) 2019-06-10 12:52:02 -07:00
Spencer
5cef1b587e
[7.x] Update dependency pegjs to v0.10.0 (#37889) (#38378)
* Update dependency pegjs to v0.10.0

* PEG.buildParser() => PEG.generate()
2019-06-07 08:46:57 -07:00
Spencer
71bee98032
[7.x] Update webpack related packages (major) (#38372) (#38402) 2019-06-07 07:10:13 -07:00
Spencer
102bc2727c
[7.x] Update webpack related packages (major) (#37552) (#38371)
* Update webpack related packages

* raw-loader@2 uses esm, so we must import
2019-06-07 06:05:20 -07:00
spalger
7d103f34d4 update yarn.lock and kbn-pm dist 2019-06-06 19:11:48 -07:00
Stacey Gammon
5c66668c69
Backport #37527 (#38298) 2019-06-06 16:35:14 -04:00
Tiago Costa
31bc6504f6
chore(NA): declare kbn-babel-preset as peer dependency for kbn plugin helpers. (#37710) (#38219) 2019-06-06 11:53:25 +01:00