Commit graph

2929 commits

Author SHA1 Message Date
Maryia Lapata
870552dd78
[Vis: Default editor] EUIficate field selection control and apply form validation (#34548)
* EUIficate field selection control

* Refactoring

* Remove unused commaList filter

* Remove field.html, update functional tests

* Update functional tests

* Remove unused translation

* Update unit test since wrapped React component haven't compiled yet

* Move setValidity invocation to the component

* Update functional test

* Fix type export

* Wrap setValidity into useEffect due to react warning on init load with empty value

* Update types

* Remove extra tag

* Removed changed translations

* Update functional test

* Add help and error message

* Update error message

* Remove unused dependency

* Remove helpText

* Remove unused dependencies

* Remove unused translation

* Refactoring

* Refactoring

* Update form validation; remove setTouched

* Update from validation

* Update form validation

* Update agg select validation

* Refactoring

* Add ariaLabel

* Revert changes

* Update comments

* Remove unnecessary aria-label

* Disable selector with no options

* Add 'required' support for string control

* Update messages

* Fix merge conflict

* Update message

* Fix eslint
2019-04-11 18:13:46 +03:00
Liza Katz
9f86745bdb
Editing a scripted field causes errors #33251 (#34679)
* Changed the default fieldFormatMap to undefined - bugfix

* Test for bug #33251

* Remove only
2019-04-11 12:13:00 +03:00
Dmitry Lemeshko
aa08669ca3
Fix visualize tests (#34390)
* wait for rendering

* run ciGroup12 x60 times

* [visualize/_tsvb_chart] redesign tests

* wait for viz initial loading before navigation

* [visualize/_tsvb_chart] assert tab is loaded

* Revert "wait for viz initial loading before navigation"

This reverts commit 1023db4fb9.

* [TSVB] [Performance]request for api/metrics/fields triggered after all UI changes

Fix: #34433

* [TSVB] [Performance]request for api/metrics/fields triggered after all UI changes - prevent reRender in case of no changes

Fix: #34433

* improve tests

* Revert "[TSVB] [Performance]request for api/metrics/fields triggered after all UI changes - prevent reRender in case of no changes"

This reverts commit a04ed55103.

* Revert "[TSVB] [Performance]request for api/metrics/fields triggered after all UI changes"

This reverts commit 040f0b106b.

* Revert "run ciGroup12 x60 times"

This reverts commit c38427f67f.

* rename dataTestSubj
2019-04-10 21:07:38 +02:00
dave.snider@gmail.com
ce6c33a3e4
Upgrade eui@9.9.0 (#34824) 2019-04-09 15:44:02 -07:00
Mike Côté
fcd60ca0d9
Ensure migrations run on saved object import (#34793)
* Ensure migrations run on saved object import

* Fix broken tests

* Fix ESLint errors
2019-04-09 15:18:49 -04:00
Mike Côté
962722ae8a
Convert saved objects UI to use new import / export API (#33513)
* Initial work converting UI to use new server side APIs

* Remove missed file

* Fix jest tests

* Code cleanup pt1

* Fix file casing

* Fix jest tests

* Modify UI to support including nested references

* Fix button layout

* Connect includeReferencesDeep, remove references_missing_references logic

* Fix broken tests

* Cleanup

* Display success notifications and auto close modals on export

* More code cleanup

* Log to server when user imports using legacy .json file

* Final cleanup

* Update test snapshots to match updated text

* Apply PR feedback pt1

* Remove isLoading and wasImportSuccessful state variables, use single status variable instead

* Move business logic out of flyout component

* Apply PR feedback

* Update wordings
2019-04-09 12:02:54 -04:00
Dmitry Lemeshko
f39339d9d3
Functional tests: improve waiting in combobox service (#34707)
* [services/lib/web_element_wrapper] set custom wait for findAll

* [services/remote] print browser name and version on init

* [services/combo_box] fix return statement

* fix lint error
2019-04-08 18:48:55 +02:00
Rudolf Meijering
2e13faf8af
Overlay core service (#34261)
* Move ui/flyout to overlay core service

* Remove onClose in parameter (use FlyoutSession instead)

* Fix tests

* Remove old inspector tests

* Proper TODO message

* Convert flyout service to class

* Use correct i18n

* Resolving weird merge conflicts

* Fix panel plugin test

* Change new platform access

* Add more tests

* Remove commented tests

* Revert test fix (core is actually not fixed yet)

* Fix tests

* Expose onClose as Observable

* Use jest.doMock

* Fix typos

* Core start() -> setup()

* Remove @extends EventEmitter docs

* Refactor and test flyoutservice

* Fix comments: promise -> observable

* Fix tests

* Explicitly define OverlaySetup

* Fix OverlaySetup type signature

* Update Core API review file and docs

* Remove redudant if case

* Change FlyoutRef.onClose into a promise

* Remove redundante cleanup

* Use promise.finally

* Remove targetDomElement from openFlyout()

There's no need to support multiple targetDomElements per FlyoutService
and the current implementation handled this use case incorrectly.

Instead of adding complexity to try to support it, remove this from the
function signature.

* Fix + test to ensure child components are unmounted when a new flyover is displayed

* Wrap flyover in i18n Context component

* TSlint -> ESlint + test improvements
2019-04-08 15:17:59 +02:00
Tiago Costa
ed795d28ee
Migrate from tslint (#33826)
* chore(NA): remove tslint dependencies, configs and enable eslint typescript parser.

* fix(NA): apply recommend eslint typescript rule.s

* chore(NA): upgrade eslint package versions.

* chore(NA): split javascript eslint config in an override section.

* chore(NA): split all eslint configs with overrides.

* chore(NA): remove missing console.log.

* chore(NA): change eslint splits and overrides order.

* chore(NA): replace tslint disable comments with eslint ones.

* chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export

* chore(NA): fixed multiple eslint typescript rule failures.

* chore(NA): add tarfet folder to the eslint ignore.

* chore(NA): apply prettier rule to ts type file.

* chore(NA): remove last mentions to tslint

* chore(NA): add old defined rules

* chore(NA): missing port rules website

* chore(na): ordered rules

* chore(NA): solved eslint typescript problems.

* chore(NA): fix spaced comment problems.

* chore(NA): fix some more eslint typescript rules: import/order no-empty-interface

* chore(NA): fix last rules and comment out what are the ones still failing.

* chore(NA): comment out camelcase rule.

* chore(NA): regenerate kbn pm dist.

* chore(NA): updated snapshots.

* chore(NA): updated snapshots.

* chore(NA): disabled sort-keys rule.

* chore(NA): remove rule prefer-arrow/prefer-arrow-functions.

* chore(NA): fix for @typescript-eslint/no-var-requires rule.

* chore(NA): fixes for @typescript-eslint/camelcase rule.

* chore(NA): fix typo on eslint config kibana typescript.

Co-Authored-By: mistic <tiagoffcc@hotmail.com>

* chore(NA): remove legacy note after the intellij upgrade to 2019.1

* fix(NA): import order plugin.

* chore(NA): fix ts ignore positions after auto fix.

* fix(NA): performance issue with typescript eslint.

* refact(NA): eslint configs organization.

* chore(NA): apply resticted paths to ts files too.

* chore(NA): split comment from eslint ignore.
2019-04-05 17:45:23 +01:00
Matthias Wilhelm
eceeb9fb35
Use enter to submit save modals (#34417)
Now you can use the Enter key to submit the form used e.g. when saving a new dashboard
Good for a11y + a time saver

Adds Form element, migration of Button onClick to Form's onSubmit 
Adds functional test for Enter key submission

Fix #30831
2019-04-05 10:47:30 +02:00
Mike Côté
51e6a009ee
Modify saved object import APIs to handle special use cases from the previous import process (#34161)
* Modify import APIs to handle special use cases from the previous import process

* Cleanup

* Add more examples to the docs

* Make title come from data inside file

* Fix some broken tests

* Fix docs

* Fix docs wording

* Apply PR feedback pt1

* Apply PR feedback pt2
2019-04-04 09:10:54 -04:00
Peter Pisljar
954d3e1093
updating tagcloud interpreter func arguments (#33773) 2019-04-04 14:33:38 +02:00
Greg Thompson
865e6739fd
Upgrade EUI to 9.8.0 (#34486)
* upgrade eui to 9.8.0

* test selector updates
2019-04-03 17:25:10 -05:00
Dmitry Lemeshko
1af565973f
[services/retry] add onRetryBlock function to run before each retry (#34434)
* [services/retry] add onFaliureBlock function to run before each retry
2019-04-03 23:04:20 +02:00
Mike Côté
1e56a48fc7
Modify saved object export API to support exporting nested dependencies (#34225)
* Modify saved object export API to be able to export nested dependencies

* Apply verbal feedback

* Apply PR feedback
2019-04-03 15:51:07 -04:00
Josh Dover
d33e6892da
Introduce UI PluginsService (#32672)
This commit introduces two changes:
- Adds new platform plugins as a new bundles to the optimizer
- A PluginsService in the UI that loads plugin bundles, initializes plugins, and manages the lifecycle of plugins.
2019-04-03 12:02:10 -05:00
Matt Bargar
d8916e37c9
Add multi field info to the IndexPattern (#33681)
Adds two fields to the IndexPattern Field:

* parent - the name of the field this field is a child of
* subType - The type of child this field is. Currently the only valid value is multi but we could expand this to include aliases, object children, and nested children.

The thinking behind implementing these two new properties instead of a simple isMultiField flag is that it should be generic enough to describe other sorts of parent -> child relationships between fields.
2019-04-02 13:52:04 -04:00
spalger
b5cdb6df6e disable failing suite
(cherry picked from commit ab6cedae42)
2019-04-01 11:39:31 -07:00
Tim Roes
71e61e3072
Hide gauge labels when value is hidden (#34171)
* Hide gauge labels when value is hidden

* Only hide subtext when value is hidden

* Use better free space calculation

* Fix tests
2019-04-01 18:04:11 +02:00
Alexey Antonov
852b6e9b1a
x-pack/test/saved_object_api_integration/common/suites/find.ts Fix broken build (#34224) 2019-03-30 20:23:50 +03:00
Alexey Antonov
ed57d3b4d3
Visual builder: percentile ranks should allow multiple values (#33642)
* Visual builder: percentile ranks should allow multiple values

Fix: #33144

* Visual builder: percentile ranks should allow multiple values - fix translation

Fix: #33144

* Visual builder: percentile ranks should allow multiple values - fix translation

Fix: #33144

* Visual builder: percentile ranks should allow multiple values  - add migration script

* Visual builder: percentile ranks should allow multiple values  - fix tests

* Visual builder: percentile ranks should allow multiple values  - add executeMigrations function

* Visual builder: percentile ranks should allow multiple values  - fix table view label

* Visual builder: percentile ranks should allow multiple values  - fix comments

* Visual builder: percentile ranks should allow multiple values  -add multi value row

* Visual builder: percentile ranks should allow multiple values  -add multi value row

* Visual builder: percentile ranks should allow multiple values   fix review comments

* Visual builder: percentile ranks should allow multiple values   fix review comments

* [TSVB] Code cleanup - remove unused file (core_plugins/metrics/public/lib/create_new_panel.js)
2019-03-30 17:41:35 +03:00
CJ Cenizal
8d262bded5
Rename user_action telemetry app to ui_metric (#33904)
* Rename internal references to user actions to UI metrics in Index Management, ILM, and Rollups.
2019-03-29 15:26:31 -07:00
spalger
179b9be6bb disable flaky test (#33468) 2019-03-28 19:21:34 -07:00
dave.snider@gmail.com
d2c077ae59
eui 9.7.1 (#34098) 2019-03-28 12:27:35 -07:00
Nathan Reese
7ab080a97c
[Maps] store mapCenter in embeddable config (#33902)
* embeddable config

* set embeddableConfig when map center changes

* remove console statement

* add functional test for embeddable state
2019-03-28 06:39:36 -06:00
Maryia Lapata
b03f6c3eae
[Vis: Default editor] EUIficate agg-select (#31892)
* EUIficate agg-select

* Improve validation; update TS

* Apply styles for helpLink

* Fix unit test

* Update functional tests

* Adjust comboBox service to chose the item where the text mates exactly

* Update vis page object

* Add default value for agg

* Move aggs grouping function to a separate file

* Use labelAppend prop for help link node

* Add watcher for aggType to manage to discard changes

* Add default value for agg type title

* Fix defining selected option when aggType is defined

* Fix validation issues

* Remove a bootstrap specific class

* Change css selector in test

* Update according to SASS guidelines

* Update functinal comboBox service

* Added check for undefined

* Add jsdoc for groupAggregationsBy function

* Add unit tests for groupAggregationsBy

* Move setValidity invocation to DefaultEditorAggSelect component

* Wrap setValidity into useEffect due to react warning when select is cleaned at the first time

* Move help link definition to select component
2019-03-28 13:02:34 +03:00
Joe Reuter
06a71e8676
Functional tests: prevent waiting longer than necessary for loading spinner to disappear (#33922) 2019-03-28 10:27:42 +01:00
dave.snider@gmail.com
786423a85a
EUI@9.7.0 (#34011) 2019-03-27 16:21:40 -07:00
Greg Thompson
3acebd9d57 Upgrade EUI to 9.6.0 (#33873)
* eui to 9.6.0

* update snapshots related to onClick
2019-03-27 13:49:52 -07:00
spalger
4fac5fc899 Revert "[TSVB] markdown variables (#33324)"
This reverts commit 412c9d843e.
2019-03-27 11:12:52 -07:00
Mike Côté
00e1b3ca5e
Fix includeFields function to return root saved object properties (#33847)
* Fix includeFields function to return root saved object properties

* Fix broken tests
2019-03-27 09:50:50 -04:00
Vitali Haradkou
412c9d843e
[TSVB] markdown variables (#33324)
* improve test coverage for TSVB markdown
* add new tests for change label, variable and rendering markdown table
2019-03-27 13:35:10 +03:00
CJ Cenizal
d8c7e18bf1
Instrument ILM with user action telemetry (#33089)
* Track user actions for creating, updating, and deleting and index lifecycle policy.
* Track user actions for attaching an index, attaching an index template, and detaching an index.
* Track app load action.
* Track usage of cold phase, warm phase, set priority, and freeze index.
* Track retry step user action.
* Track clicks on the policy name to edit it.
* Refactor constants to be in root of public.
* Add support to user actions API for comma-delimited action types.
* Refactor rollups trackUserRequest to be easier to understand.
* Use underscores instead of dashes for user action app names.
* Switch from componentWillMount to componentDidMount/useEffect.
  - Standardize use of HashRouter within app.js to avoid calling useEffect when leaving the app.
2019-03-26 15:43:03 -07:00
Dmitry Lemeshko
8b0d1206a8
FTR: fix 10 sec timeout in waitForDeleted (#33313)
* use css selector instead of className, set implicit wait to 0

* set implicitWait to 2 sec

* set default implicitWait to WAIT_FOR_EXISTS_TIME

* set timeout to 1 sec, retry for query bar test

* sleep 5 sec waiting zoom is finished

* sleep is the only way to wait

* run x-pack-ciGroup3 20x times

* Revert "run x-pack-ciGroup3 20x times"

This reverts commit 55482de330.
2019-03-26 22:15:16 +01:00
Stacey Gammon
f5010cc8e6
Typescript sample panel action (#33602)
* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path
2019-03-26 12:31:10 -04:00
Spencer
2e232c2e31
[@kbn/expect] "fork" expect.js into repo (#33761)
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
2019-03-25 09:56:48 -07:00
Spencer
96206bd092
[eslint] merge custom rules into a single plugin (#33733)
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice.

Thoughts?

_**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in 42c7da6fe2. [View the changes without the prettier updates](b647f2b...74e07a0)
2019-03-22 17:12:14 -07:00
Spencer
29badf7655
[ftr/dashboard] wait for importFile() to finish (#33723)
* [ftr/dashboard] wait for importFile() to finish

* move waitUntilLoadingHasFinished() into importFile() call

* remove unnecessary page object
2019-03-22 15:15:21 -07:00
spalger
33083c80eb skip flaky test suite (#33504) 2019-03-22 09:25:36 -07:00
Peter Pisljar
fec0f6c40a
adding runPipeline tests (#27015) 2019-03-21 07:12:25 +01:00
Dmitry Lemeshko
5707690494
Dashboard embeddable rendering tests: return names of failed visualisations (#32646) 2019-03-18 19:05:26 +01:00
Maryia Lapata
9878707612
[Vis: Default editor] EUIficate string control (#32881)
* EUIficate string control

* Fix tests

* Update unit test

* Add data-test-subj for input

* Remove unused props

* Refactoring

* Add value prop to be able to discard changes on form

* Refactoring

* Set ng-model

* Remove unnecessary check and specify model name

* Set full width to be consistent with other controls from the form
2019-03-18 11:34:52 +03:00
Dmitry Lemeshko
71002d8ebe
[page_objects/time_picker] fix getTimeDurationInHours returning NaN (#33255)
* [page_objects/time_picker] fix getTimeDurationInHours returning NaN

* use correct format instead of Date.parse
2019-03-15 09:25:43 +01:00
Mike Côté
34c7e52a87
Return import errors for saved objects referencing a missing index pattern or search (#33005)
* cherry-pick fd2bc9b

* Return errors when objects are missing references

* Fix import tslint

* Fix failing jest tests

* Fix x-pack integration tests

* Rename ensureReferencesExist to validateReferences

* Fix test naming to use validateReferences

* Update resolve_import_errors API to reflect new type attribute

* Validate references for search type as well

* Clarify comment

* Apply PR feedback

* Modify saved object bulkGet to be able to filter fields

* Apply PR feedback
2019-03-14 19:22:30 -04:00
Luke Elmers
ef6aaec6e6
Ensure saved filters from searchSource are always passed to response handlers (#33074) 2019-03-14 16:14:30 -06:00
Ryan Keairns
e9885e200a Updates to K7 nav drawer and EUI to 9.4.0 (#32864)
* update for new eui nav drawer

* remove extraAction on flyout

* fix mobile menu toggle

* add i18n for recently reviewed nav link

* progress on updating tests

* replace EuiListGroup with EuiNavDrawerGroup

* Quick label fixes

- Removing aria-label if the same as label since the `EuiNavDrawerGroup` takes care of that
- Truncating any recent items to just 64 characters and applying the `title` attribute to display the whole label.

* Adding a truncation buffer

* fix navDrawerRef

* Update to EUI 9.3.0

Also comments out some logos that don’t exist that were throwing console errors

* remove unused import

* typo fix

* One DTS too many in test

* …all the small things…

* Upgrade plugin dependencies and fix nav drawer test

* update for new eui nav drawer

* remove extraAction on flyout

* fix mobile menu toggle

* add i18n for recently reviewed nav link

* progress on updating tests

* replace EuiListGroup with EuiNavDrawerGroup

* Quick label fixes

- Removing aria-label if the same as label since the `EuiNavDrawerGroup` takes care of that
- Truncating any recent items to just 64 characters and applying the `title` attribute to display the whole label.

* Adding a truncation buffer

* fix navDrawerRef

* Update to EUI 9.3.0

Also comments out some logos that don’t exist that were throwing console errors

* remove unused import

* typo fix

* One DTS too many in test

* …all the small things…

* Upgrade plugin dependencies and fix nav drawer test

* Add support for normal image paths

Updated to EUI 9.4.0

* update testing appMenu.clickLink selector

* leave appsMenu closed while reading and clicking links

* use saveVisualizationExpectSuccess to ensure modal is closed before continuing
2019-03-14 13:35:21 -04:00
Justin Kambic
39c04780c3
[Uptime] Add functional UI tests (#29667)
* Refactor es queries and associated components/endpoints.

* Add unit tests, repair broken tests.

* [Uptime] Add API functional tests for uptime graphQL (#29128)

* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.

* Add HB 7.0 data for API tests.

* Configure first error_list test to work with 7.x data.

* Configure error_list filtered by id to work with 7.x data.

* Configure error_list functional tests to work with 7.x data.

* Update snapshot test to work with 7.x data.

* Update snapshot down filtered test to work with 7.x data.

* Configure snapshot up test to work with 7.x data.

* Configure ping list tests to work with 7.x data.

* Configure monitor list tests to work with 7.x data.

* Configure monitor status bar tests to work with 7.x data.

* Configure filterBar tests to work with 7.x data.

* Configure docCount tests to work with 7.x data.

* Simplify code based on PR feedback.

* Add loading spinner to monitor page title based on PR feedback.

* Rename GQL type based on PR feedback.

* Remove use of 'undefined' in ES query based on PR feedback.

* Simplify code based on PR feedback.

* Add definite size/shard_size for terms agg based on PR feedback.

* Simplify ES query based on PR feedback.

* Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts

Implement PR feedback.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Increase size for ES errors query based on PR feedback.

* Fix hardcoded field in terms filter based on PR feedback.

* Simplify get code for monitors function.

* Reduce unnecessarily large size for terms agg based on PR feedback.

* Pluralize filter bar props.

* Refactor filter bar query based on PR feedback.

* Update test.

* Fix busted GQL query.

* Update functional test docs to use data without buggy values.

* Update index name in HB functional api test docs.

* Update snapshot base functional test.

* Make snapshot filter tests pass, fix associated bug.

* Configure remaining snapshot e2e tests to work with 7.x data.

* Give better variable names and comments for ugly code.

* Configure ping list query tests to work with updated 7.x data.

* Rename graphql describe block.

* Update monitor status bar query tests to work with updated 7.x data.

* Update monitor list query tests to work with updated 7.x data.

* Update filter bar query to work with updated 7.x data.

* Update error list query to work with updated 7.x data.

* Update doc count fixture to work with new 7.x data.

* Create functional UI tests for Overview and Monitor pages.

* Add additional waits to functional UI test to try to prevent flakiness.

* [ftr/services/superDatePicker] make specialized service

* Add data-test-subj value to monitor link.

* Remove wait calls from UI tests.

* Set default timezone for tests' kibana server.

* Add @types for mocha and expect.js.

* Implement PR feedback.

* Remove added types.

* Re-add mocha types.

* Remove obsolete comment.

* Disable timestamp on uptime app navigation for functional tests.

* Undo previous change for default value of function parameter.

* Add redirect hack to uptime client to change window location when expected router path is not satisfied.
2019-03-13 16:12:23 -04:00
Spencer
06195e9d8b
Refactor ES-related environment variables (#33036)
* [ci/es] base default es version on pkg.branch value

* [ci/env] initialize $TEST_ES_FROM in checkout_sibling_es.sh

* [UA] remove TEST_ES_SNAPSHOT_VERSION override

* [ci/es] call checkout_sibling_es.sh from one location

* [ci] remove unused `--from` param

* [ci/env] always default to snapshots, switch to source when necessary

* [kbn/test] default esFrom to $TEST_ES_FROM

* [ci/setup] fix define order

* [ci/grunt] don't pass --esFrom let env pass through

* [ci/env] use branch, not version

* [ci] use same indent style as following lines

* [kbn/test] apply default values when processing args

* [kbn/test] simplify defaults, read default on each process
2019-03-13 11:51:06 -07:00
Mike Côté
772d0d71c8
Rename resolve import conflicts API to resolve import errors (#33024) 2019-03-13 09:17:18 -04:00
spalger
e939addaed Revert "correctly passing saved filters and query to all response handlers (#32749)"
This reverts commit ac6137af26.
2019-03-12 11:39:55 -07:00