Commit graph

2574 commits

Author SHA1 Message Date
Tim Sullivan
8fc67c064a
Stats API: implement the "kibana status" spec from the Monitoring data model for stats (#20577) (#20956)
* [Stats API] Set API field names per spec

* fix jest tests

* fix api integration test

* trash the original metrics collector

- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled

* move some logic out of the collector types combiner into inline

- change the signature of sourceKibana

* Make a new stats collector for the API

- to not clear the data when pulling via the api
- fetching is a read-only thing

* isolate data transforms for api data and upload data

* no static methods

* remove external in bytes

* remove the _stats prefix for kibana and reporting

* update jest test snapshot

* fix collector_types_combiner test

* fix usage api

* add test suite todo comment

* reduce some loc change

* roll back mysterious change

* reduce some more loc change

* comment correction

* reduce more loc change

* whitespace

* comment question

* fix cluster_uuid

* fix stats integration test

* fix bulk uploader test, combineTypes is no longer external

* very important comments about the current nature of stats represented and long-term goals

* add stats api tests with/without authentication

* fix more fields to match data model

* fix more tests

* fix jest test

* remove TODO

* remove sockets

* use snake_case for api field names

* restore accidental removal + copy/paste error

* sourceKibana -> getKibanaInfoForStats

* skip usage test on legacy endpoint

* fix api tests

* more comment

* stop putting a field in that used to be omitted

* fix the internal type to ID the usage data for bulk uploader

* correct the kibana usage type value, which is shown as-is in the API

* more fixes for the constants identifying collector types + test against duplicates

* add a comment on a hack, and a whitespace fix
2018-07-19 12:03:57 -07:00
liza-mae
db6e57ed71
skip test (#20986) (#20992) 2018-07-19 12:01:20 -06:00
Nathan Reese
8ea7af9511
merge conflicts (#20959) 2018-07-18 21:11:48 -06:00
Nathan Reese
fe2f671d0a
[home] Include ability to publish kibana saved objects from add data tutorial (#19559) (#20939)
* add savedObjects to tutorial schema, add savedObjects to APM, add bulk create endpoint

* SavedObjectInstaller component

* bulkCreate fixes

* fix tutorial jest test

* update from sqren review

* updated copy

* move saved object json into seperate json files

* minor commit clean up

* ensure isMounted before setting state after async call, allow manifest to customize saved object install message

* remove duplicated logic for getting config xpack.apm.indexPattern

* refactor get index pattern title

* add functional test that loads APM saved objects

* remove extra await

* display overwrite message

* use angular free savedObjectClient

* functional test cleanup

* handle bulkRequest exception and add jest tests for SavedObjectsInstaller

* use Promise.reject instead of throw

* update copy
2018-07-18 12:17:54 -06:00
liza-mae
0b39582294
Improve visualization tests (#20782) (#20932)
* Improve tests for histogram, tag cloud, input controls and enable lab mode.

* enable skipped tests

* Update shakespeare test navigation to visualize

* Add sleep to shakespeare test

* Skip shakespeare test for now, it is not clear why it is failing and does not fail locally, need the other tests to run in CI

* Revert selector for selectAggregation, re-enable shakespeare test

* skip vega spec text test, was not fixed with changes

* Enable only visualize tests to run, need to see results and it's being blocked by other test failures

* Enable all tests again, visualization tests all passed

* Skipping sample data test due to bug #20807, let's see if rest of the tests pass
2018-07-18 09:08:50 -06:00
liza-mae
6f7bc88b09
Add telemetry false for dashboard tests (#20901) (#20906) 2018-07-17 20:48:32 -06:00
Nathan Reese
2747d5e848
fix flaky input control chained test (#20642) (#20886)
* add check that combobox was successfully cleared

* run test 25 times

* checkin the correct files this time

* re-enable skipped test

* remove extra test loaders
2018-07-17 11:24:26 -06:00
liza-mae
ecafae1a6e
Skipping test due to bug #20807 (#20809) (#20812) 2018-07-14 18:31:35 -06:00
John Dorlus
38c44389cf
[Management] Relationships API test coverage (#19737) (#20788)
* Added coverage around search and dashboard tests.

* Added tests to check for whether the resource is available. If not, return 404.

* Skipped two tests due to https://github.com/elastic/kibana/issues/19713. Added error handling for relationships API for when no result is found. Return 404.

* Applied patch file per PR.

* Applied Chris patch and tested locally. No failures.

* Removed ajv and utilised joi for schema validation.

* Fixed package.json.

* Copied package.json description from master.

* Reverted package.json and made proper edit.
2018-07-13 15:33:37 -04:00
Lee Drengenberg
885eb1039e
refactor login page check, turn off telemetry (#17435) (#20722)
* refactor login page check, turn off telemetry

* significant refactor of navigateTo

* replace slashes with _ in test failure output html files

* re-do out of date PR
2018-07-12 11:57:47 -05:00
Nathan Reese
988784188c
remove angular dependencies in SavedObjectClient (#20384) (#20693)
* create saved object client that is native javascript

* fix savedObjectClient unit tests

* get saved object client from chrome when being used outside of angular

* update error handlers to pull status code from FetchError

* add some debug messages to failing functional test

* revert changes to management/_objects

* add clicks to import done in import objects test

* take screenshots of test only failing in CI

* remove functional test screenshot code since test is passing in CI now

* remove unused file, clean up saved_objects_client test to not use global, add test to error_auto_create_index to ensure compatibility with kfetch errors

* add body to kfetch error

* update savedObjectClient.bulkCreate

* add bulkCreate wrapper to SavedObjectsClientProvider

* mark _createSavedObject and _processBatchQueue as private methods
2018-07-12 07:25:14 -06:00
Peter Pisljar
6c4b4d2437
Remove Angular from visualize (#20295) (#20593) 2018-07-11 14:22:50 +02:00
Nathan Reese
e5223de945
disable flaky input controls vis test (#20637) (#20643)
* disable flaky input controls vis test

* only skip flaky test
2018-07-10 16:37:00 -06:00
Nathan Reese
9e6c4bfba9
merge conflicts (#20522) 2018-07-10 11:37:42 -06:00
Nathan Reese
a0bd039e2e
[input controls] update dropdown suggestions when filtered (#18985) (#20604)
* input controls - re-fetch options list user input

* fix jest tests

* add functional test case

* remove unneeded async and await

* use fetchAsRejectablePromise instead of fetch to avoid kill kibana session when fetching agg results

* only show options once field is selected

* clean up list control editor to only display options when field selected and only display dynamic checkbox when field is string

* do not use size when using dynamic options

* display disabled toggle when field is not string field, allow searching in middle of word

* no tooltip for disabled dyncamic options, just change help text

* fix functional test expects since search now includes more than terms that start with
2018-07-10 07:37:35 -06:00
Nathan Reese
a0add1bf5b
Upgrade to EUI 1.1.0 (#20411) (#20529)
* Upgrade to EUI 1.0.1

* upgraded to eui 1.1.0

* fix setInspectorTablePageSize function in functional tests

* better comment about basic table pagination buttons
2018-07-06 13:33:27 -06:00
Peter Pisljar
92ed45719e
refactoring geohash agg to not use vis (#20298) (#20510) 2018-07-06 10:11:40 +02:00
Tim Roes
b6a2ec51e5
Fix flaky TSVB test (#20481) (#20483) 2018-07-05 14:31:58 +02:00
Tim Roes
4cc9fc30a8
Inspector enhancements (#20452) (#20474)
* Rename trigger button to Inspect

* Change default page size to 20

* Change request description layout

* Fix functional tests

* Fix functional test

* Fix more functional tests
2018-07-05 10:52:05 +02:00
Peter Pisljar
941533eb25
adding dissabled aggs functional tests (#20454) (#20458) 2018-07-05 08:27:14 +02:00
Tim Roes
f85af486ee
Skip flaky vega test (#20127) (#20468)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-04 19:41:14 +02:00
Peter Pisljar
53d38799ac
Split editor state from saved state (#20323) (#20451) 2018-07-04 18:53:53 +02:00
Peter Pisljar
b5fac1b9a6
[6.x] Move visualize editor out of visualize directive (#20263) (#20404) 2018-07-04 17:39:08 +02:00
Peter Pisljar
ac0eb944c6
removing angular dependency from base and react vis types (#20386) (#20464) 2018-07-04 16:15:04 +02:00
Nathan Reese
62deaa896b
Remove display from timefilter refreshInterval state (#20348) (#20445)
* Remove display from refresh state

* fix spelling error, ensure garbage cannot be added to timefilter state
2018-07-03 19:09:12 -06:00
Nathan Reese
51c43ed385
disable flaky dashboard filtering test (#20425) (#20440) 2018-07-03 16:29:58 -06:00
Nathan Reese
80452ba9d3
Improve Saved object import functional test assertions (#20409) (#20419)
* disable broken functional tests in saved object import

* add better assertions to verify objects are imported as expected

* more discriptive variable name

* add test case for imported object linked to saved search when saved search does not exist
2018-07-03 12:45:08 -06:00
liza-mae
27d83401fb
Add wait for page load to methods (#20390) (#20414)
* Add wait for page load to methods

* fix trailing space
2018-07-03 12:03:00 -06:00
liza-mae
d86d2ab921
Fix flaky context _size tests and bug in context page object file (#20254) (#20391)
* Update getSuccessorLoadMoreButton() to point to correct selector
Add a sleep in navigateTo() and remove refresh()
Add methods to click predecessor and successor load more buttons
Update waitUntilContextLoadingHasFinished to check buttons are enabled and displayed
Update tests to use click methods

* Fix lint issues
2018-07-02 17:54:50 -06:00
Jen Huang
8bfa87e767
Field editor to React/EUI (#20245) (#20349) 2018-06-29 16:42:16 -07:00
Lee Drengenberg
1959e89dd6
merge (#20280) 2018-06-29 17:02:06 -05:00
archana
73d3883188
[6.x] [Functional Tests] Use @kbn/test on Kibana CI (#18967) (#20309)
* [Functional Tests] Use @kbn/test on Kibana CI (#18967)

* Replace test:api with @kbn/test runTests

* Improve CLI help menu 🆘

* Use --es-from

* Replace jenkins:selenium with kbn-test

* Validate cli args, fixing test in the process

* Clean up some stuff

* Code review fixes

* Explanation for collectCliArgs

* Remove exit codes, they're useless anyway.

* Make markdown vis test pass with dev_mode setting

* Tests

* Remove unneeded export

* Code review: move console logging up to cli.js

* Code review: refactor startServers and runTests to take single options collection

* Code review: Remove all things I am sure we do not use

* Improve tests

* Code review fixes

* Pass created log to runFtr, runElasticsearch, runKibanaServer

* Update --es-from option to --esFrom

* Let dev server run from snapshot by default
2018-06-28 19:03:35 -05:00
CJ Cenizal
59155b45e2
Simplify Courier interface and organize internals (#20060) (#20285)
**Interface changes**

There are two goals behind the interface changes:

* Make it clearer which courier modules are meant for public consumption by exporting them from the top level.
* Simplify the courier object by removing responsibilities and focusing its responsibility solely on scheduling search requests via the fetch method and timefilter.refreshInterval Angular event.

I did this by taking the following steps:

* Removing redirectWhenMissing, indexPatterns, SearchSource, and SavedObject from the courier object. I also removed some unused methods from its interface.
* redirectWhenMissing is now a service registered on the kibana/url Angular module.
* indexPatterns is now a service registered on the kibana/index_patterns Angular module.
* SearchSourceProvider and SavedObjectProvider are now top-level exports of ui/courier.
* migrateFilter, decorateQuery, buildQueryFromFilters, and luceneStringToDsl are now top-level exports of ui/courier.

**Internal changes**

I also made some internal changes in an effort to organize the code clearly and reduce unnecessary complexity.

* I refactored the async code in CallClient to appear sync with async/await and encapsulated chunks of logic in helper functions. I also used an isAborted flag instead of overwriting the esPromise var with an enum.
* I combined Looper and SearchLooper into a single class and deleted unused functions.
* I reorganized the courier/fetch/request code into SearchRequest, SegmentedSearchRequest, and serializeFetchParams modules.
* Renamed various other methods and variables to improve clarity.
2018-06-28 09:39:51 -07:00
CJ Cenizal
c6be289f21
Fix misspellings (#19981) (#20284) 2018-06-27 20:50:06 -07:00
CJ Cenizal
0da5bacd28
Adding firefox to test suite (#17195) (#20282)
* Created general driver to accept an argument select the driver to run.

* Added environment variable for driver, changed package.json to use custim leadfoot, and made changes to browserdriver to use any driver.

* Made changes per PR.

* Fixed all nits.
2018-06-27 19:46:35 -07:00
Peter Pisljar
fd0b047123
reactifying visualization (#16425) (#20270) 2018-06-27 17:35:22 +02:00
liza-mae
9ff7ad3a9e
Fix flaky visualize lab mode tests (#20165) (#20233)
* Update saveSearch method in discover and add wait page loading for advance settings

* Fix spaces
2018-06-26 11:45:30 -06:00
Rashmi Kulkarni
09a0ffe350
Conversion to ES6 - Discover tests (#20112) (#20155)
Discover Tests conversion to ES6
2018-06-22 11:28:44 -07:00
Tim Roes
9ba0689dcd
[6.x] Replace spy panels by Inspector (#16387) | Fix one inspector test (#20072) (#20076)
* Replace spy panels by Inspector (#16387)

* Add Inspector feature

* So long, and thanks for all the fish, spy panel

* Fix several functional tests

* Fix unit tests

* Fix spy panel button tests

* Replace old spy panel documentation

* Disable test temporarily until we have dashboard triggers

* Enter edit mode for dark theme test

* Fix some more functional tests

* Fix more functional tests

* More test fixing

* Fix more functional tests

* Allow opening the inspector via loader handler

* Refactor InspectorViewChooser, remove unused CSS

* Remove dead code

* Fix data download button style

* Remove redundant code

* Load inspectorViews for dashboard_viewer

* Extract inspector views to custom core_plugin

* Switch API to TypeScript 🎉

* Design changes

* Remove icons from views

* Design changes

* Improve typings of API

* Add typing to all adapters

* Show loading spinner in request selector

* Rewrite InspectorView to TypeScript

* Fix help text for data view

* Remove deprecated React lifecycle methods

* Embed inspector into dashboard panel actions

* Remove temporary inspector trigger

* Remove old CSS

* Fix dashboard trigger for new panel action

* Add tests for InspectorPanel and DataAdapter

* Produce a hierarchical table if the vis is hierarchical

* Remove allowJs option again

* Add missing Apache license headers

* Close inspector on dashboard when navigating away

* Use proper title for dashboard panels

* Fix functional tests

* Skip broken test for now

* Flush view chooser button

* Add request adapter tests

* Skip more tests, broken due to typescript

* Add Request Time description

* Add description for courier request

* Fix tests

* Replace icon by new (not yet released) icon

* Finalize design of inspector

* Remove discover test, that relied on spy panels

* Change API to be properly mockable in tests

* Add aria-live region for request status

* Replace old method in functional tests

* Replace abitrary magic number

* Use object destructuring in vis

* Fix issue with crashing requests view

* Add request time tooltip

* Get request body of correct search source

* Make filter buttons properly keyboard accessible

* Follow Dave's design suggestions

* Remove redundant request from name

* Remove unneeded comments

* WIP raw-formatted values

* Fix filtering issue

* Fix tests and more license headers

* Add data view tests

* Remove search from table

* Fix typos

* Implement review suggestion

* Remove artificial delays for testing

* Fix new panel action structure

* Minor design adjustments

* Fix failing functional test

* Update failing snapshot test

* Implement final wording

* Apply new EUI styling

* Fix closing inspector in tests

* Fix sorting of table

* Align punctuation between tooltips

* Fix test that doesn't exist on master

* Fix one inspector test (#20072)

* Remove file that came accidentally back due to merging

* Fix accidental merge paste

* Fix 6.4 test failures
2018-06-21 11:45:13 +02:00
Stacey Gammon
72dc8b31f7
Fix flaky test where modal dialog isn't loaded when enter key is pressed (#20035) (#20051) 2018-06-19 19:22:16 -04:00
Spencer
20a932e03e
[6.x] [ftr/confirmModal] assert expected state rather than just reading (#20019) (#20022)
Backports the following commits to 6.x:
 - [ftr/confirmModal] assert expected state rather than just reading  (#20019)
2018-06-19 13:11:38 -07:00
Rashmi Kulkarni
3f2b5d5518
ES6 conversion on Console Test (#20009) (#20046)
* ES6 conversion
2018-06-19 12:53:29 -07:00
Tim Roes
508df9e67e
Update EUI to 0.0.53 (#20005) (#20042)
* Update to EUI 0.0.53

* Remove input vis specific styling

* remove double close button in dashboard add panel flyout (#2)

* Fix functional tests

* fix x-pack snapshots

* EUI 0.0.53 no longer closes combo box when clear btn is pressed (#3)
2018-06-19 18:57:42 +02:00
Tim Roes
593296b5e4
Skip flaky test for now (#20033) (#20034) 2018-06-19 14:07:54 +02:00
liza-mae
cdbb3ed0d0
Make timelion tests less flaky (#19996) (#20010)
* Update sleeps in timelion tests

* Add comment
2018-06-18 14:06:32 -06:00
Tim Sullivan
e4abda8593
[Saved Objects Client] Return info about what was missing in the 404 (#19868) (#19973)
* [Saved Objects Client] Return info about what was missing in the 404 error

* update api integration tests

* fix another test
2018-06-18 09:35:17 -07:00
Rashmi Kulkarni
bffe876587 ES6 conversion on Management Tests (#19870) 2018-06-15 14:28:59 -07:00
liza-mae
3460a70221
Add option to exclude tests in functional test runner (#19806) (#19850)
* Add option to exclude tests in functional test runner

* Move tag to end of test name
2018-06-14 04:23:15 -06:00
CJ Cenizal
1744e4d346
Change tryForTime error output from 'failure' to 'error', to make it easier to grep the logs for actual failures. (#19707) (#19843) 2018-06-12 18:40:17 -07:00
CJ Cenizal
fd591acb90
Upgrade EUI to 0.0.52 (#19772) (#19833)
* Revert "Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)"
This reverts commit c853072ca5, reintroducing EUI 0.0.52.
* Rename visualize page object selectors for manipulating combo box.
2018-06-12 12:05:15 -07:00