Commit graph

2756 commits

Author SHA1 Message Date
John Dorlus
fea9c42d28
[Management] Relationships API test coverage (#19737)
* 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-06-20 15:57:02 -04:00
Tim Roes
2885e871e3
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
2018-06-20 11:07:44 +02:00
Stacey Gammon
e35b40e946
Fix flaky test where modal dialog isn't loaded when enter key is pressed (#20035) 2018-06-19 16:04:04 -04:00
Rashmi Kulkarni
4661d8543c
ES6 conversion on Console Test (#20009)
* ES6 conversion
2018-06-19 11:15:57 -07:00
Tim Roes
58257c2734
Update EUI to 0.0.53 (#20005)
* 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 17:43:26 +02:00
Tim Roes
fbbd5c111e
Skip flaky test for now (#20033) 2018-06-19 14:07:10 +02:00
Spencer
b25ab869f7
[ftr/confirmModal] assert expected state rather than just reading (#20019)
I've seen a few failures recently like https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-selenium/4940/console which are caused by the modal not being visible, but if you look at the screenshot you can see the the modal was just about to be displayed but the find didn't wait quite long enough. ~~To fix this temporarily I've increased the `isConfirmModalOpen()` timeout from 2 to 5 seconds.~~

These tests are actually trying to assert that the modal is gone, so rather than simply checking the state of the modal once, the `CommonPage#isConfirmModalOpen()` method has been renamed to `CommonPage#expectConfirmModalOpenState()` which expects a boolean and will assert the state of the confirm modal within a retry, so that as long as the modal eventually transitions to that state it will eventually resolve.

![dashboard app using legacy data dashboard listing page delete default confirm action is cancel 1](https://user-images.githubusercontent.com/1329312/41569272-3215b4aa-731f-11e8-864a-0c0022228245.png)
2018-06-18 21:05:21 -07:00
liza-mae
61a3c9f1ca
Make timelion tests less flaky (#19996)
* Update sleeps in timelion tests

* Add comment
2018-06-18 12:54:54 -06:00
Felix Stürmer
cf16b801fd
[Context view] Incrementally increase context time window (#16878)
This PR tries to reduce the Elasticsearch cluster load for index patterns with many indices.

**Theory of operation**

Before this PR, Elasticsearch had to perform the query and sorting for every shard matching the index pattern. In order to avoid that in a time-base indexing scheme, the queries should include a `range` filter. This enables Elasticsearch to rewrite most of the shard accesses to `match_none`. But since the context view operates on document counts, the time intervals need to be determined heuristically:

* start of the interval is the second end of the previous query iteration or `anchor_time` if it is the first iteration
* end of the interval is `interval_start +/- n days` with `n in {1, 7, 30, 365, 10000}` or unlimited if insufficient hits were returned for all `n`

This date arithmetic introduces the assumption that the primary sorting field is a date or at least numeric. Therefore, the `sortingField` has been renamed to `timeField` to make those new assumptions explicit.

**Other notes**

As an additional optimization, the queries are now executed in a `constant_score` filter context to enable caching by Elasticsearch.

Tests for `fetchSuccessors` and `fetchPredecessors` were added.

Changes in ElasticSearch required a concurrent fix of #17696, which is also included. It now splits up the anchor `uid` into `anchorType` and `anchorId` and uses them in an `ids` query.

**Testing**

The fact that only a small subset of the shards are involved in a query should be observable using the `skipped` shard count in the response.

fixes #15143
fixes #17696
2018-06-18 12:31:54 +02:00
Tim Sullivan
633aa4250f
[Saved Objects Client] Return info about what was missing in the 404 (#19868)
* [Saved Objects Client] Return info about what was missing in the 404 error

* update api integration tests

* fix another test
2018-06-15 16:14:04 -07:00
Rashmi Kulkarni
4f4c398380
ES6 conversion on Management Tests (#19870) 2018-06-15 12:52:42 -07:00
liza-mae
d5589bff48
Add option to exclude tests in functional test runner (#19806)
* Add option to exclude tests in functional test runner

* Move tag to end of test name
2018-06-13 05:25:07 -06:00
dave.snider@gmail.com
43639cd9c0
[Design] Clean up dashboard listing page (#19657)
Along with @nreese, cleaned up the dashboard listing view to add an empty state.
2018-06-12 17:43:20 -07:00
CJ Cenizal
77b53db939
Change tryForTime error output from 'failure' to 'error', to make it easier to grep the logs for actual failures. (#19707) 2018-06-12 17:19:50 -07:00
CJ Cenizal
647d3366eb
Upgrade EUI to 0.0.52 (#19772)
* 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 10:47:20 -07:00
Tim Roes
dda5e7b7e9
Skip flaky navigational test (#19751) 2018-06-08 12:12:39 +02:00
Brandon Kobel
cb4240a3b2
Skipping flaky lab mode test (#19742)
* Skipping lab mode tests

* Update _lab_mode.js
2018-06-07 16:28:13 -04:00
liza-mae
5ccaca45b3
Remove flaky selectors: .ng-scope, .ng-binding and .ng-isolate.scope (#19688) 2018-06-07 11:17:16 -06:00
Tim Roes
e5465ea7f1
Fix broken linked save searches (#19722)
* Fix bug

* Retry navigation
2018-06-07 16:07:43 +02:00
CJ Cenizal
87cccfc101
Revert "Tests for visualization screenshot comparison (#17545)" (#19692)
This reverts commit 84d678bbb9.
2018-06-05 17:08:29 -07:00
Bhavya RM
84d678bbb9 Tests for visualization screenshot comparison (#17545)
* undoing a messy merge

* updating screenshots

* changing the variance to account for data table failure

* trying a different variance for data table and a general one for the rest of the screenshots

* changing the variance for general to .065

* adding xy position to adjust the screensize

* changing variance and setting a small window

* create calibrateForScreenshots method

* remove empty lines
2018-06-05 19:14:29 -04:00
archana
547723f24c
[Functional test server] Watch port for optimize should be different (#19619) 2018-06-05 16:10:15 -05:00
liza-mae
a9011b32c1
Update browser window size for console test (#19664) 2018-06-04 16:58:36 -06:00
Stacey Gammon
7440e9734d
Accessibility updates (#19561)
* Announce full screen mode to screen reader, use extra helpful text in panel title input

* Update jest snapshots

* See if removing full sceen mode aria label fixes snapshot test on jenkins.

* Bring back EuiScreenReadyOnly to confirm it is breaking snapshot tests

* Try updating baselines with slightly larger width for the screen

* Move screenready to external, non styled div, go back to original browser size and snapshots

* update snaphots
2018-06-01 11:35:58 -04:00
Stacey Gammon
31bd7a2f63
Unskip 'and preserves edits on cancel' test (#19412)
* unskip 'and preserves edits on cancel' test

* Clean up view edit test before unskipping

* don't use old vis list to determine counts

* Fix bad merge

* get rid of extra view edits, they won't work because of the extra panel... should add a better cleanup... but for the sake of staying focused, running these old school

* Fix bad merge, snapshot tests belong in new data section
2018-05-31 15:31:48 -04:00
Nathan Reese
3dae391e89
Convert Dashboard save dialog to react/EUI (#19531)
* eui save panel

* add title and description inputs

* copy on save

* add jest tests

* fix functional and jest tests

* another functional test fix

* updates from Stacey-Gammon review

* remove debounce because it broke functional tests

* update jest snapshot
2018-05-31 08:28:47 -06:00
Nathan Reese
8de20f23fd
Remove react-select from kibana (#18876)
* remove react-select from AggSelect

* update field_select to use EuiComboBox

* metric_select

* moving_average

* percentile

* series_agg

* std_deviation

* removing some more react-select instances

* icon_select and group_by_select

* gauge type

* markdown

* set isClearable prop

* remove react-select from timeseries config

* remove react-select from timeseries panel options

* remove react select from terms

* remove react-select from table config

* remove react-select from data_format_picker

* fix create_select_handler mocha test

* remove react-select from kibana

* update tsvb functional tests

* set isDisabled prop on EuiComboBox where disabld prop was set for Select

* use durationOutputOptions for duration 'to' options
2018-05-30 09:21:38 -06:00
Stacey Gammon
803d0a61f3
Update dashboard snapshot tests (#19420)
* update snapshot tests

* Update time ranges

* Add sleeps, adjust time, update snapshots

* Skip TSVB until the issue with vertical line placement and x-axis timestamps is fixed

* fix expectations of time range with saved search creation

* remove debug line
2018-05-29 12:58:36 -04:00
Nathan Reese
f83a844c1a
skip flaky sample data tests (#19503) 2018-05-29 09:59:30 -06:00
Stacey Gammon
e44564a60a
Instead of adding a margin of error, just wait for render complete. (#19406)
* Instead of adding a margin of error, just wait for render complete. Hopefully should fix

* actually because of page margins, we still nee a margin of error.

* go back to a single run
2018-05-29 08:55:01 -04:00
Spencer
f0cc432faf
Apache 2.0 license headers (#19383)
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.

Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:

```
node scripts/eslint --fix && node scripts/tslint --fix
```
2018-05-28 20:06:30 -07:00
Nathan Reese
e1399d751f
Sample data (#17807)
* register list, install, and uninstall endpoints

* decorate server with methods needed to register data sets

* implement list endpoint, add flights sample data set

* stream data file

* create sample data index with mappings

* bulk insert into elsaticsearch

* more loadBulk work

* advance time stamp

* change http method back to post

* delete index on uninstall

* last 15 minutes example

* add option to preserver day of week and time of day

* import saved objects on install and delete saved objects on delete

* update uiSetting defaultIndex on install and uninstall

* use correct format for saved object json

* Adding example sample data, mappings and dashboards

* add sample data tab to Add Data page

* add launch button

* add sample data link to empy index pattern create state

* fix jest tests

* add toast nofication on success and fail install/uninstall

* move uiSettings of defaultIndex to client, clear index patterns get id cache

* put link to sample data sets on home page

* updated saved objects and data set

* add card for sample data

* add preview image

* updated dashboards and data set

* update button text

* woops, forgot vega

* compress data json file

* move flights data file to same folder as saved objects file

* add functional tests

* updates from chrisdavies review

* fix install API call - broken on last commit

* fix mistake in create_index_pattern

* updates from Stacey-Gammon review

* remove delete from install API

* add more tests to ensure dashboard renders as expected

* better error message on install and uninstall failure

* remove checks that may change from run to run to keep functional tests stable

* update scripted field to reflect changes in ES

* change saved object install/uninstall error code from 500 to 403

* add more logic to check if dataset is installed and display a disabled add button when there is a problem checking status

* make add data links be side-by-side on home page

* propery handle savedObjectClient bulkCreate errors. Ensure launch dashboard exists in test if dataset is installed

* ignore saved object delete 404s since users could have deleted some of the saved objects via the UI

* show response error in toast, delete index before trying to create, log create index error
2018-05-24 14:39:07 -06:00
Stacey Gammon
e3ea1a8726
Pluggable panel actions (#18877)
* Allow pluggable panel actions

* Need to register it as being used in kibana

* Some cleanup

* update snapshots to match new EUI versions, set time range

* Use newer panelActions service

* add missing await

* More clean up and fixes

* bring back window reload

* Show actions in view mode too

* delete now unused files

* Use toggle action to determin if context menu is open

* Fix tests that assume the toggle is hidden in view mode.

* Add some debug logs

* Fix up assumptions

* Previous failing test was legit - we don't want to show remove option when panel is expanded

* Embeddable can be empty before the panel is loaded

* Should look for either visualize or discover page

* Address code comments

* address code review comments

* whoops, get rid of childPanelToOpenOnClick entirely
2018-05-24 14:53:42 -04:00
Nathan Reese
9c3481c078
EUI dashboard add panel (#17374)
* EUI add panel

* implement add functionallity

* style flyout so top nav is not covered

* add noItemsMessage

* add new visualization button

* remove angular add_panel template

* seperate search bar and table into its own component

* fix functional tests

* make slide out panel own focus to avoid weirdness of letting other buttons in nav from getting clicked and leaving slide out open

* remove deprecated method componentWillMount

* add jest test for DashboardAddPanel

* fix paging and replace EuiSearcBar with EuiFieldSearch

* fix functional tests

* fix dashboard filter bar functional test

* another functional test fix

* add more context to functional test failure message

* give search input a default value

* remove call to waitForRenderComplete to see if tests will pass

* fix dashboard filtering test

* updates from Stacey-Gammon review

* support filtering out lab visualizations

* add functional test for testing visualize:enableLabs with add panel

* add sorting by title to SavedObjectFinder componenet

* move add panel tabs to state

* clean up labs test differently
2018-05-24 11:05:52 -06:00
Stacey Gammon
c14f7a72c4
Reporting API test expansion and clean up (#18986)
* Update & expand reporting API tests

* remove xpack stuff from oss archive

* wrap "it"s so they are in expected order.

* Update expected recent stats

* url was pointing to a visualization not a csv

* Move comment around

* Merging with changes on master renaming stats to usage

* fix reference to old stats file.

* bad merge
2018-05-22 12:48:20 -04:00
Nathan Reese
760f849ac5
remove double modal when cloning dashboard with duplicate title (#19049)
* remove double modal when cloning dashboard with duplicate title

* reset duplicate state when input is updated

* update functional test for new clone workflow

* change warning message to EuiCallout

* updates from Stacey-Gammon review
2018-05-22 10:29:19 -06:00
Tim Roes
37bcc3d591
Add missing test for #19221 (#19253)
* Add tests

* Merge the two addFilter methods
2018-05-22 16:58:02 +02:00
Tim Roes
f84d57afd7
Wait longer for load discover search (#19265) 2018-05-22 13:27:54 +02:00
archanid
d0d8e5ad69 [Tests] Include dashboard time zone test 2018-05-21 08:35:40 -05:00
archana
f63a3df17d
Option to run kibana from build for CI (#19125) (#19225)
* Option to run kibana from build for CI (#19125)

* Support --dev option for servers only

* try skipping dashboard time zones test
2018-05-21 08:31:30 -05:00
Stacey Gammon
adcecc08b6
Dont need to confirm a modal anymore, there is none (#19243) 2018-05-19 09:23:33 -04:00
archana
eaa4960981
Revert "Option to run kibana from build for CI" (#19224)
* Revert "[DOCS] Removes redundant index.asciidoc files (#19192)"

This reverts commit d11b5aae9a.

* Revert "[typescript] add typescript support for the server and browser (#19104)"

This reverts commit c6112067fc.

* Revert "Option to run kibana from build for CI (#19125)"

This reverts commit 5969860303.
2018-05-18 14:09:38 -05:00
archana
5969860303
Option to run kibana from build for CI (#19125) 2018-05-18 12:45:53 -05:00
Chris Roberson
80bb4b1867
[Management] Saved objects to React/EUI! (#17426)
* Not working proto code

* More proto code

* Work in progress

* Just go back to non interactive searching, much easier

* This should be on the server

* Revert "[@kbn/ui-framework] move ui-framework to a package (#17085)"

This reverts commit ef3339bd7a.

* Revert "Revert "[@kbn/ui-framework] move ui-framework to a package (#17085)""

This reverts commit ce9ce14e1060c426090b55a5367de3ff4329e681.

* Use BasicTable properly

* Table improvements

* Small tweaks to the table

* Improvements

* Flyout mostly working

* Remove in memory table

* Getting close

* Tweaks

* Revamping server code, still need to support editing

* Progress

* Fix export

* Updates and passing functional tests

* Better links in relationships flyout

* Add skip import option

* Fixes around importing and removing unnecessary code

* Remove tags for now

* Tests for lib/

* Some fixes

* Ensure we clear index pattern cache

* Parity with master

* Revert any changes in package.json

* Reset any changes in this file

* Move the new argumen to the end to prevent test failures

* Fix functional tests

* Add relationship tests

* Fix tests

* API integration tests for relationships

* Ensure we're properly waiting for things to happen

* Fix test issue

* Wait for the table to finish loading instead of the whole page

* Tests for objects_table

* Componentry tests

* Ensure this is grabbing the right field

* Update snapshot

* Fixes with importing index patterns

* PR feedback

* PR feedback

* PR feedback

* Update snapshot

* PR feedback

* Update snapshot

* Respect the savedObjects:perPage config

* Updates from PR feedback

* More updates from PR feedback

* Make this more efficient

* Add debugging for functional test failures

* Wait longer

* Wrap each button accessor with a retry.try

* Try wrapping this in a retry.try

* Debug

* Lets make sure it is visible

* Maybe the short timeout is affecting this - use the default timeout which should be higher and allow more time for the animation to finish

* Rewrite this per suggestions from stacey
2018-05-17 13:46:47 -04:00
Peter Pisljar
0f0b498ac4
fixing disabled aggs (#18796) 2018-05-17 07:40:31 -05:00
Spencer
f24a725144
[mocha] remove grunt-simple-mocha (#19079)
* [mocha] run tests with mocha script, remove grunt-simple-mocha

* [ci] force colored output

* [ci] disable color when reading the yarn bin

* [dev/build/exec] support tooling log having its own chalk

* [dev/mocha] avoid changing the cwd of the process

* [dev/mocha] only match files, speed up negative matches

* [cli/serve/test] strip ansi control characters from logs

* [ci] disable color in all `yarn bin` invocations

* [dev/mocha] cleanup old runInBand check

* [dev/mocha] enable gloabl leak checks
2018-05-16 10:43:55 -07:00
Stacey Gammon
73c0ce1aa6
The previous retry wouldn't work because 'click' has it's own retry (#19078)
* The previous retry wouldn't work because 'click' has it's own retry, need to use exists first.

* add comment with link to issue

* fix wrong function (wish we had typescript!)
2018-05-16 10:52:22 -04:00
Tim Roes
8d5f43c540
Replace _term order in terms agg by _key (#19032) 2018-05-16 15:28:32 +02:00
Peter Pisljar
b996f736a0
Don't deep clone vis in courier request handler (#19069) 2018-05-15 13:24:15 -05:00
Stacey Gammon
34a46ca8e0
Use find service instead of remote directly (#19070) 2018-05-15 14:16:28 -04:00
Stacey Gammon
897f5f3f1a
Fix, or debug, flaky nested visualization filter test (#18957)
* Debug flaky test, or at least retry the spot that seems to be failing

* Fix missing await, use queryBar service, use more detailed error message

* update remaining references to dashboard.getQuery

* getQueryString not getQuery
2018-05-14 09:47:32 -04:00
Stacey Gammon
00a3fb067c
Try to fix flaky override colors test (#18961)
* unskip test and run multiple times to trigger

* Forgot to await the retry, made the flakiness worse!

* Undo multiple test runs
2018-05-10 12:15:12 -04:00
archana
b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
Peter Pisljar
c8b8027866
Allow splitting series on multiple fields (#17855) 2018-05-09 10:16:24 -05:00
Nathan Reese
e3841ea7ea
[Input controls] Replace react-select with EuiComboBox (#17452)
* replace react-select with EuiComboBox

* remove constructor for ListControl component

* get working with portal version

* remove overflow visible from input_control_vis since its no longer needed

* convert index pattern select to EuiComboBox

* replace react-select with EuiComboBox for field select

* group fields by type

* remove esvm

* remove on-foxus box around input cursor

* fix jest tests

* remove broken jest test

* fix functional tests

* review changes

* remove componentWillMount from field_select

* update snapshot changed from rebasing and getting new EUI version

* use combo box clear and close buttons for clearing and closing

* jsdoc syntax fix
2018-05-08 13:48:12 -06:00
Stacey Gammon
5fcf7bc171
Add a time zone test (#18870)
* Add a time zone test

* Make sure timezone it back to UTC after the test runs
2018-05-08 13:25:08 -04:00
Jen Huang
1259007745
Advanced Settings to React/EUI (#17465) 2018-05-07 12:48:27 -07:00
Thomas Neirynck
f93b6ea0fc
Do not handle precision changes when no aggregations have been configured on the coordinate map (#18826) 2018-05-07 09:19:41 -04:00
spalger
6667c63a91 disable flaky test 2018-05-04 12:19:30 -07:00
Spencer
d35316642d
Fix loading indicator for uiSettingsClient (#18694)
* [ui/chrome/loadingIndicator] expose VanillaJS hooks for gloabl loading indicator

* [ui/uiSettingsClient] increment/decrement loading count while request in progress

* [ui/loadingIndicator] fix HeaderPage.isGlobalLoadingIndicatorHidden()

* [ui/loadingIndicator] remove rxjs, fix tests

* [ui/loadingIndicator] improve docs

* [ui/loadingIndicator] remove needless unmounts

* [ui/loadingCount] correct typo

* [functionalTests/headerPage] awaitGlobalLoadingIndicatorHidden

* [ui/loadingCount] send subscribers the loading count on subscription

* [ui/loadingIndicator] remove error throwing, cleanup render
2018-05-02 16:37:23 -07:00
Stacey Gammon
3c8c23c9ef
Expand coverage of dashboard tests (#17703)
* Expand coverage of dashboard tests and decrease time

* Fix timing error when sub urls fail to save from too fast app link clicking

* discover doesn't have breadcrumbs

* Check top nav text so it works on both listing and saved object edit/view pages

* need to do the add panel operations one at a time

* Need both types of input in filter

* Give test data a title

* Remove incorrect and unnecessary comment

* Move data around and get rid of 6_3 specific naming as we will end up migrating the data as we progress

* Remove code accidentally checked in
2018-05-01 09:12:36 -04:00
Tim Sullivan
c10dc7560a
[Stats] Add metrics collector and stats API (#17773)
* [Stats] Add metrics collector and stats API

* uptime_ms in the process namespace

* make uptime_in_millis always equal process.uptime_ms

* fix api integration test

* fix api integration test better

* fix false positive with last change

* change object detection, add fallbacks to return undefined
2018-04-30 20:46:10 -07:00
Nathan Reese
5a4263ad2d
update to eui 0.0.44 (#18606)
* update to eui 0.0.44

* keep eui dependency in x-pack

* wrap EuiBasic table column in span to avoid className prop from getting overridden

* remove brittle functional tests that are no longer needed with EUI components

* filter field list instead of chaning table size

* update x-pack snapshots
2018-04-27 11:07:15 -06:00
Nathan Reese
bed97a27b0
Eui dashboard listing (#16967)
* convert dashboard listing page to react and EUI

* add jest test for DashboardListing component

* add data-test-subj attributes

* clean up jest test

* hideWriteControls and call to action when no dashboards exist

* pass initial filter to dashboard listing, get functional tests to work

* fix dashboard queries functional tests

* upgraded to EUI 0.0.29 to get defaultFocusedButton fix

* move dashboardListing directive to index

* spacing in if statement

* switch to EuiBasicTable

* pagination

* add sorting

* fix jest test

* handle out of order fetchs

* remove info.gif

* re-instate search functional test

* replace EuiSearchBar with EuiFieldSearch

* fix functional tests

* update snapshot - when code rebased - new EUI version add another prop

* add Edit link to actions column
2018-04-26 08:16:56 -06:00
Tim Roes
b95b3f4fc1
Fix map not refetching correctly (#18600) 2018-04-26 15:58:02 +02:00
Jenkins CI
fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Lee Drengenberg
842ed488c5
Support 1 Kibana and 1 Elasticsearch URL as input params (#9760)
* Support 1 Kibana and 1 Elasticsearch URL as input params

* Revert a previous change to test char substitution

* Allow setting TEST_KIBANA_URL and TEST_ES_URL for Cloud testing

* cleanup comment

* Update docs

* Refactor after PR review

* Changes from review

* fix default Kibana port to 5620

* Change es_test_config.js similar to kibana_test_server_url_parts.js
2018-04-18 13:18:56 -05:00
Brandon Kobel
bf2b6b01d4
Preserving boom error headers for index pattern exceptions (#17725) 2018-04-18 12:56:23 -04:00
Matt Bargar
d9ec6180ac
Get even more debug info (#17627) 2018-04-17 13:48:21 -04:00
Stacey Gammon
30aa1318dc
Add failing test (#17688) 2018-04-17 11:07:42 -04:00
Stacey Gammon
33262a7d5a
Fleshed out communication layer between embeddables and dashboard (#17446)
* Flesh out communication layer between embeddables and dashboard

* fix flaky legend colors

* Address code review comments

* Remove embeddableHandlerCache and push render/destroy handling of Embeddable instance into react component

* Fix a bug and adds tests that would have failed

* Whoops, fix toggleExpandPanel, in view mode it's not in the panel options

* Update readme based on newest implementation, after pushing all embeddable lifecycle handling to the embeddable_viewport component

* Push embeddable handling back up to dashboard_panel, get rid of embeddable_viewport

The options menu will eventually need access to the embeddable for
things like pluggable panel actions.

* Update README.md

* Fix jest tests

* Add two failing tests to catch current bugs

* Fix max call size exceeded err

* fix time range bug

* Add failing test for filter field index pattern bug

* Fix bug with index patterns

* Expand on definition of an embeddable

* Address code review comments

* address some code comments

rename personalization => customization
add more optional config overrides into an Embeddable constructor

* Fix refactor bug
2018-04-13 15:23:23 -04:00
Lee Drengenberg
4eac8ed4f2
fix eslint error 2018-04-13 12:19:21 -05:00
Lee Drengenberg
368cd5e5b6
Skip all context tests until _uid issue resolved
See https://github.com/elastic/kibana/issues/17696
2018-04-13 11:07:14 -05:00
Chris Cowan
7fed7b62f2
[TSVB] Math Aggregation (two point oh) (#16965)
* Revert "Remove MathJS Feature (#15652)"

This reverts commit 43bf1dbf4a.

* replacing math with tinymath

* pining version

* updating yarn.lock

* Fixing Prettier mis formatting

* fixing tests

* Adding unsupported agg back

* Adding functional test for math aggregation

- Fixing bad tests
- Resetting page for every test suite (why donesn't beforeEach work?)
- Adding test for Math agg

* Trying to fix values (due to inconsistencies in env)
2018-04-11 14:06:28 -07:00
Tim Roes
f5b28c18fb
Fix flaky lab mode test (#17622) 2018-04-11 09:00:53 +02:00
Spencer
410905c66e
Rename saved objects bulk_get and find endpoints (#17512) 2018-04-10 13:39:59 -07:00
Tim Sullivan
cc065d2ae5
[Server/Routes] organize status routes together with others (#17558)
* [Server/Routes] organize status routes together with others

* remove flaky assertion

* move all the status stuff into src/server/status

* sugar on imports/exports

* fix lint/jest test

* comment and todo
2018-04-05 18:41:56 -07:00
Tim Sullivan
dee741c683
[Test] Integration test for Kibana status API (#17509)
* [Test] Integration test for Kibana status API

* bad prettying
2018-04-04 09:08:19 -07:00
Stacey Gammon
a59ebd08dd
Gain extra info when nested query visualization test fails (#17390)
* add more output

This will let us know if the filter is failing to be added on the
visualization before being saved.

* run 20x

* go back to single run
2018-04-02 10:59:25 -04:00
Spencer
b78714e8d8
[server/config/deprecationWarnings] fix deprecation logging warnings (#17439)
* [server/config/deprecationWarnings] fix deprecation logging warnings

* typos

* explain kbn_server_worker a bit with better naming and comment

* Address review feedback
2018-03-30 09:35:26 -07:00
Bhavya RM
52ff625709
Test for ensuring that options *hide all panel titles" work on dashboards. (#17440)
Test for making sure option hide all panel titles work
2018-03-29 12:54:01 -04:00
Matt Bargar
a89027b267
Add debug code to flaky field_data test (#15535)
* Add debug code to flaky field_data test

* update helper to match new UI
2018-03-28 15:55:03 -04:00
Stacey Gammon
cd6fa73431
Expose an esSupertest for directly querying elasticsearch in tests (#17306)
* Expose an esSupertest for directly querying elasticsearch in tests

* oops, fix bad capitalization
2018-03-28 10:29:11 -04:00
Stacey Gammon
fa30ef3348
De-couple redux panels object with app state (url) panels (#17361)
* separate implicit connection between app state panels and redux tree panels.

They are now two different objects.  This will help pave the way to
removing so much apostate in view mode where it isn’t necessary

* remove console output

* fix tests and propagate dashboard title & description

* Clean up with review comments

* use reduce instead of map so the array becomes an object
2018-03-26 14:01:56 -04:00
Rashmi Kulkarni
5ef60e09fd
adding large_string_test (#17312)
* adding large_string_test

* removed a failing test, modified the existing one

* new line at the end of mappings.json

* removed the data.json file and also removed the navigateTo() and clickKibanaIndices() as createIndexPattern() takes care of it

* more modifications
2018-03-23 10:48:51 -07:00
Bhavya RM
64ea452a0c
Functional tests to add index alias reference (#17343)
Test to make sure Kibana handles index alias reference.
2018-03-23 13:01:50 -04:00
CJ Cenizal
a7147f2ca7
Improve feedback in Discover (#16771)
* Add Painless scripted field error callout to Discover. Remove recursive beginSegmentedFetch call.
* Add getDocLink service. EUIfy Discover 'no results' state.
* Rename initSegmentedFetch to handleSegmentedFetch to differentiate it from beginSegmentedFetch.
2018-03-22 12:48:19 -07:00
Matt Bargar
aeaf57dd97
Add query enhancements opt-in switch to query bar (#17232)
Makes our language updates more visible to users and removes mentions of Kuery as a separate language. Users still get the old lucene experience by default, but have the option to opt-in to "experimental query features" directly in the query bar. Goal is to get more feedback by making these new features more prominent and less of a jump from lucene.
2018-03-22 15:47:52 -04:00
Stacey Gammon
42f7aef739
Don't use transforms (#17175)
* Don't use transforms

* dismiss toasts so they don't interfere with the snapshot tests

* try again

* Fix styling during expanded panel mode

* See if putting the sleep back fixes the build.

* fix typo
2018-03-21 14:27:07 -04:00
Nathan Reese
4a501cb4d2 fix dashboard grid test timing issue (#17250)
* add 50 extra pixel to move to ensure panel goes above first panel
2018-03-19 19:51:56 -07:00
John Dorlus
a31ec148f4
Adding firefox to test suite (#17195)
* 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-03-16 23:05:10 -04:00
spalger
60ee5883b0 revert more changes from #17188 2018-03-15 23:54:10 -07:00
spalger
381fcb22fb revert #17188 2018-03-15 23:36:05 -07:00
John Dorlus
1b656c3670 Update 2018-03-16 02:26:59 -04:00
John Dorlus
9827e7360a Made changes per PR. 2018-03-16 01:26:32 -04:00
John Dorlus
c764a25e82 Added environment variable for driver, changed package.json to use custim leadfoot, and made changes to browserdriver to use any driver. 2018-03-15 20:50:04 -04:00
John Dorlus
3180ee51fb Created general driver to accept an argument select the driver to run. 2018-03-15 20:49:23 -04:00
Lee Drengenberg
db84d62faf
Getting Started - Shakespeare (#16827)
* WIP - add shakespeare data for getting started guide

* Refactor of getLineChartData, getBarChartData, getAreaChartData

* Added changing extents and test

* Fix opening axis options

* Change precision from 8 to 7

* lower precision to 6

* Fix index pattern creation

* update from review, remove comments, add others
2018-03-14 15:42:48 -05:00
Lee Drengenberg
315e4cf122
Save html for failed tests (#16850)
* Fixes issue preventing stdin from defaulting

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Prevent prompting to overwrite when using stdin

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Remove log

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* When failure, log URL and save page source

* log Taking screenshot  at info level

* Force a failure, then revert this

* [ftr/failureDebugging] create failure debugging service

* Cleanup and create the failure_debug/html dir, strip special chars from filenames

* Remove a debugging log

* refactored replacing invalid filename chars

* Revert forced failing tests
2018-03-13 16:46:56 -05:00
spalger
ac606a62da [functionalTests/context] disable flaky test 2018-03-13 13:22:56 -07:00
Jen Huang
a5fe8aeecc
Change indexed fields table to use EuiToolTip and display 10 rows by default (#17074) 2018-03-13 11:43:34 -07:00
Nathan Reese
f5aaad396f
Dashboard smaller panel grid dimensions (#16763)
* change panel height from 100 to 20

* scale default height

* change number of grid columns to 48 so there is better control of panel width

* remove input controls resize test since its using EUI components and no longer needs to be functionally tested

* fix dashboard_grid_container test

* clean up rebase artifacts

* scale x and y in panel_state test

* make DASHBOARD_GRID_HEIGHT a constant
2018-03-12 08:15:32 -06:00
Jen Huang
e7555147d4
React/EUI-ify indexed fields table (#16695)
* React/EUI-ifying indexed fields table
2018-03-09 08:09:54 -08:00
Kim Joar Bekkelund
e5d33e992a
Move running projects tests into Grunt task (#16946) 2018-03-09 14:28:47 +01:00
Chris Roberson
71b99a4043
Await for config changes and re-enable tests (#17016) 2018-03-08 13:35:20 -05:00
Stacey Gammon
bcfec87505
Fix embeddable config url updates (#15728)
* add failing test that would have caught this situation

* Implement onEmbeddableConfigChanged to pick up url changes from soft refreshes

* Add tests for legend and pie slice color as well as removing uiState keys to ensure it resets the config values

* address removing state from url as well as setting it.

* Fix up tests and add a link to the legend issue

* only emit once

* use for in, use better mocked clearAllKeys function

* Remove switch to setSilent

* Adjust test so it fails because of bug found where two charts will both have their slice colors updated

* Embeddable should only listen for changes to their panel's config state

* Default embeddable config to an empty object when creating a new embeddable
2018-03-07 15:11:02 -05:00
Lukas Olson
e9ff31f185 Update Kuery Syntax (#15857)
This PR evolves Kuery into a simplified, more lucene-like language. In a follow up PR we plan on getting rid of the language switcher dropdown and instead add a checkbox that will allow users to opt-in to this syntax, which will feel less like a separate language and more like a set of enhancements to the existing lucene query syntax.

This PR also updates the simple grammar to solve the following:

* Wildcards in field names
* "is one of" shorthand (e.g. foo:(bar OR baz OR qux))
* Don't split on whitespace (require explicit AND/ORs, case insensitive)
* "exists" query (e.g. foo:*)
* Improved range query shorthands (e.g. foo <= 1)
* Wildcard queries

Since this new syntax is simpler and does not support every filter type like old Kuery did, this PR also brings back the filter bar when kuery is selected in the language picker.

See the documentation updates in this PR if you need an overview of the new syntax (and let us know if the documentation is lacking).
2018-03-07 08:29:34 -08:00
Stacey Gammon
15810052da
Investigate flaky dashboard state test (#16977)
* Increase test runs to reliably trigger failure

* Determine where dashboard is failing to pop into view mode

* Drop down to only one check

* Go back to only one run of state tests
2018-03-07 10:30:05 -05:00
Stacey Gammon
93e2e373d8
Tests are failing consistently (#16995) 2018-03-06 13:21:37 -05:00
Bhavya RM
b2a2f2dfdc
Sanity tests for table viz in TSVB (#16880)
Sanity test for table viz in TSVB
2018-02-23 14:50:49 -05:00
Nathan Reese
c0eab3049b
Update filterEditor directive to use default index pattern when none are provided. (#16235)
* use default index pattern when filter-editor is not passed any index patterns

* add functional test

* pass indexPatterns to filterBar directive

* handle check for [undefined]

* use _.compact to test if index patterns are provided

* simplify areIndexPatternsProvided
2018-02-23 11:39:04 -07:00
CJ Cenizal
eb49a8c449
Add test-subj-selector module to packages dir. (#16623)
* Add test-subj-selector module to packages dir.
* Rename to @kbn/test-subj-selector.
* Simplify rejectRejFiles Grunt task and ignore nested node_modules.
* Update jenkins_unit script to use yarn kbn CLI.
2018-02-13 10:34:47 -08:00
Bhavya RM
e447592a32
adding gauge and topN sanity tests for TSVB (#16583)
adding two basic sanity test automation for gauge and Top N
2018-02-09 13:59:33 -05:00
Thomas Neirynck
4b5e1cb3d1
Skip flaky test (#16534)
Skips intermittently failing tests. This is a temporary measure, as the removal angular from this component will reintroduce additional tests.
2018-02-09 08:09:54 -05:00
Tim Sullivan
dc69a8e92c
[FTR] Add pause/resume auto refresh to header page object (#16618)
* [FTR] Add pause/resume auto refresh to header page object

* remove unecessary promise.resolve
2018-02-08 22:07:17 -07:00
spalger
f2924aa0e9 run kbn-plugin-helpers tests on ci 2018-02-08 11:57:08 -07:00
Nathan Reese
8664b55ac2
Nested input controls (#16407)
* add input to select parent control

* move lineage logic into seperate file for easier testing

* move parent candidate logic into seperate file

* decouple control factory and control initialization

* disable control if parent not set

* inherite search source from ancestors to have them filter values

* call fetch when query filter is updated for filter value changes

* delete filters when control has ancestor without value

* avoid fetching option list when ancestors have not changed

* add functional tests for nested controls

* remove unneeded file

* fix jest tests, add another test case to functional tests, update 'Parent' field copy

* add more jest test coverage

* fix useTimeFilter functionallity

* add better error message when fetch is not defined by subclass

* pass filters array instead of search source hierarchy

* only modify queryFilter when filters are submitted

* compare value array instead of concatinated string to determine if ancestors have changed

*  use ES2016 syntax for array concatination
2018-02-08 10:30:45 -07:00
Chris Roberson
f93b76285b
[Management] Fix importing objects connected to saved searches that contain conflicts (#16004)
* Handle cases of importing objects that are connected to searches, but error out due to the searches index pattern not found

* Add tests and fix flaky ones
2018-02-02 14:28:29 -05:00
Chris Roberson
4061399aef
[Management] Time field step in React! (#16129)
* Time field step in React

* Tests start

* Modularizing the step and adding tests

* More tests

* More clean up

* Fix test

* Update tests

* Fix bug where use can't select 'No Time Field' option

* Fix test

* Disabled button state bug fix with test

* UX improvement: early warning of index pattern collision

* More composable StepTimeField component for more readability

* PR feedback

* Remove debug

* Ensure the node exists and add back tests

* Update time field loading state

* PR feedback

* Update tests
2018-02-02 11:59:46 -05:00
Jonathan Budzenski
22e5321bd2
jenkins_docs.sh 0644 ->755 (#15743) 2018-02-02 09:53:11 -06:00
Rashmi Kulkarni
7586401cf9
Test for Large number of Fields in Kibana. (#16237)
* test huge data

* new file for testing large number of fields
*  testing large fields
* large_fields_test
* add the unload of es_archiver
* incorporated the changes in kibana.yml
* Revert "incorporated the changes in kibana.yml"
This reverts commit 8682121678.
* cleanup
* code simplification
* removed commented code
2018-02-01 13:27:35 -08:00
CJ Cenizal
86c5597d67
Remove GlobalToastList wrapper directive. Add onChange callback. (#16375)
* Remove GlobalToastList wrapper directive. Add onChange callback.
* Skip flaky tag cloud test.
2018-01-30 09:15:34 -08:00
Tim Roes
9979f1037c
Properly wait for search list to load (#16388) 2018-01-30 15:35:52 +01:00
Nathan Reese
270455ded6
EUI input controls visualization (#16210)
* update jest tests as best as possible - found some bugs that need to be addressed

* use EuiAccordion to hide/show control editor

* set control editor to be open on load

* small changes

* fix editor jest tests

* update visualization components to EUI

* fix jest tests and updated range control to EUI

* fix bug in range control input logic

* fix button layout

* fix dashboard grid resize test

* add space between panels, change button order, switch to sort icons

* remove style attribute from component, fix spelling of id
2018-01-30 07:33:46 -07:00
Tim Roes
232b267510
Fix issue with disabled lab mode (#16351)
* Fix saved object finder issue

* Add functional test
2018-01-30 09:56:37 +01:00
Chris Earle
b72af008a1
[Tests] Revert Timeout to Default 1s (#16359)
This should hopefully speed up Selenium tests again.
2018-01-29 12:50:23 -05:00
Peter Pisljar
7ffaf810f8
visualize editor should not show if embed is set to true in url (#16310) 2018-01-29 18:21:48 +01:00
CJ Cenizal
23bdf47adf
Fix assertions against toasts in Dashboard and Discover functional tests. (#16336) 2018-01-28 17:51:12 -08:00
CJ Cenizal
ec3485b167
Reduce TestSubjects.find default timeout to 1s. (#16342) 2018-01-28 17:50:57 -08:00
Court Ewing
6b9f911e0d
test: move cookie tests to api_integration tests (#14435)
This long running test does not belong in the unit tests.
2018-01-27 15:31:32 -08:00
CJ Cenizal
6e9fc7328b
Extract fatal notification into fatalError service, add support for EuiToast notifications (#15749)
* Reorganize notify/lib files. Extract fatal notification into a fatalError service.
* Convert notify/lib tests to use Jest.
* Add ToastNotifications, GlobalToastList, and documentation.
* Remove notify.info method.
* Add createFirstIndexPatternPrompt.
* Update testSubjects.exists to accept a timeout argument.
* Skip some flaky tests.
2018-01-26 20:14:28 -08:00
Nathan Reese
90ed94b1c3
sort options list (#16145) 2018-01-19 08:17:20 -07:00
Thomas Neirynck
073f375367
Add topojson support / EMS v3 support (#15361)
This adds support for the v3 endpoint of the Elastic Maps Service. This includes support for Topojson files.
2018-01-16 15:30:52 -05:00
Nathan Reese
0c907baf01
Add "use time filter" option to input controls (#15852)
* add useTimeFilter parameter to Controls visualization

* fix broken jest test

* add functional tests for useTimeFilter

* remove wrong comment

* use _.clone and _.isEqual for time comparision

* do not track time changes in vis_controller - use status.time instead
2018-01-16 12:35:17 -07:00
Tim Roes
c11bb351d5
Fix some styling issues (#16023)
* Fix border of vis view

* Fix pagination looks

* Fix functional tests
2018-01-15 10:13:49 +01:00
Yuri Astrakhan
1b70e7400a
Migrating vega_vis from plugin (#15014)
Large PR to migrate Vega plugin into the core.
https://github.com/nyurik/kibana-vega-vis

The code underwent a large number of changes and
reviews discussed in the PR thread:
https://github.com/elastic/kibana/pull/15014
2018-01-13 15:14:04 -05:00
spalger
5d49d52328 [functional/context] disable flaky test 2018-01-11 13:46:42 -07:00
Brandon Kobel
738c5e7f85
Functional tests comparePngs write resized images to the session directory (#15976) 2018-01-11 07:59:41 -05:00
Nathan Reese
57dfdd58a7
Kibana Home page - phase two (#14749)
* add tutorial directory and home promo section

* tutorial components

* use KuiCodeEditor for displaying instruction code

* move spec files to server so joi can be used. Fetch via rest API

* Adding more tutorials (#4)

* More edits on the Apache logs tutorial

* Added nginx, mysql, and sytem modules for FB

* Moved apache to apacheLogs and added an apacheMetrics tutorial

* Added mysqlMetrics, nginxMetrics, systemMetrics tutorials

* Reduce duplication in the tutorials

This uses common objects for the install and start steps for Filebeat.
Same can be done for MB.

* fix windows path for config file

* add markdown parsing

* use mustache to replace config.kibana.version with kibana version

* add image preview to tutorial introduction

* fix css class name

* add param types constants

* add docs variables

* [WIP] Logstash Netflow module tutorial (#5)

* First draft of Logstash Netflow module tutorial

* Incorporated writing style suggestions

* pass params to template replace logic

* parameter inputs

* use isReadOnly flag from ui-framework for KuiCodeEditor

* dedemorton commits on netflow

* remove trailing slash from base links

* add config.docs.logstash and fix vertical spacing between Content component and commands

* Use logstash docs config variable

* Starting to add Deb instructions

* Fix Logstash documentation link

* Make commands optional

* Refactor: extract common LS instructions

* Edits for the existing tutorials

* change schema to support three instruction types

* [Netflow tutorial] Simplify OSX instructions

* replace axios with fetch

* pass credentials to tutorial fetch

* display cloud instructions when cloud set

* RadioButtonGroup component

* update copy

* add tutorial component jest tests

* content component test

* load isCloudEnabled in home_app

* add functional test ensuring add data tutorials are fetch and displayed

* rename card btns to 'Add data', fix type in tutorial directory tab, remove 'Set up index pattern from tutorial directory'

* move parameters form to right of instruction set title

* add copy snippet button, remove line numbers from command block

* add breadcrumb to tutorial view

* update tutorial jest snapshot

* use componentDidMount and ignore async results if componenent has been unmounted

* define shape of prop for instructionVariants and params. Create NumberParameter and StringParameter components

* add bread crumb to add data directory page

* Add cloud version of the apache_logs tutorial (#16)

* Add cloud version of the apache_logs tutorial

* Added onprem-cloud version as well

* fix styling broken by EUI rebase

* add artifacts to tutorial schema

* fix styling for code block

* [Tutorials] Netflow: instructions for onPremCloud (#18)

* Extract common on-prem cloud instructions so LS and Beats can share them

* Extracting common instructions; adding onPremCloud instructions

* fix copy bug where copy would only contain previously selected text

* make string parameter input type be text

* Implementing Elastic Cloud tutorial for Netflow module (#19)

* More tutorial edits (#20)

* More tutorial edits

This updates the on prem instructions with a step that installs the GeoIP and
UA plugins in ES. It also makes the on-prem steps more consistent with the cloud
instructions which results in less redundancy in the code.

* Show config step for all variants

* More DRY in the tutorial content

* Updated screenshot for apache_logs

* wrap markdown content in markdown-body class

* use EuiFlexGroup to remove wasted space with 'copy snippet' button and instruction text

* change OSX to macOS, use Computed property names for instruction_variant DISPLAY_MAP, replace /app/kibana with kbnBaseUrl, remove unneeded if check in copy_to_clippboard, put getTutorials mixin on server instead of request

* capitilize 'C' in Elastic Cloud

* remove try/catch from copy_to_clipboard

* Removing unrelated instructions

* Copy editing fixes

* Multiply edits to the Beats tutorials (#21)

* Updated Nginx module

* Updated MySQL logs module

* Updated system logs module

* Correct the on_prem_cloud enable steps

* Updated the Nginx metrics tutorial and added screenshot

* Updated the Apache metrics module + screenshot

* Updated the MySQL metrics module + screenshot

* Updated the system metrics module + screenshot

* prevent 'Copy snippet' button text from wrapping

* [Netflow tutorial] Windows instructions (#22)

* [Netflow tutorial] Adding onPrem instructions for Windows

* Removing unrelated/superfluous instructions

* Adding Windows instructions for onPremElasticCloud and elasticCloud

* use EuiImage so tutorial images are clickable to view in full screen

* fix jest tests

* set fullScreenIconColor and alt options for EuiImage, add space between command block and instruction text
2018-01-10 07:20:38 -07:00
Spencer
0fde087ca2 Switch to Yarn (#15485)
* switch to yarn

* cleanup misc references to npm

* [yarn] loosen dependency ranges so yarn will merge more deps

* fix linting error now that moment uses ESM

* [licenses] font-awesome changed the format of its license id

* Use local yarn

* Misc fixes

* eslintignore built yarn file

* Remove mkdir which doesn't do what it should do

* Check build without upgrading lots of versions

* Fix license check

* too many moments

* Better description

* Review fixes

* Lock to angular@1.6.5

* More specific version locks

* Revert "More specific version locks"

This reverts commit 11ef81102e.

* Revert "Lock to angular@1.6.5"

This reverts commit 3ade68c14c.

* rm yarn.lock; yarn

* Forcing a specific version of React, Angular, Moment

* Using vendored version of yarn in ci

* Use --frozen-lockfile

* fixes
2018-01-10 13:23:43 +01:00
Spencer
6adde0aff3
[functional/management/import] disable flaky test (#15914) 2018-01-08 21:36:27 -07:00
Nathan Reese
faf0633232
replace KuiConfirmModal with EuiConfirmModal in confirm-modal directive (#15693)
* replace KuiConfirmModal with EuiConfirmModal

* add titles to confirm modals. Update modal text and button text

* updates for newest version of EUI

* use EUI class in overlay and EUI button constants

* remove logic about changed filters in cancel dashboard editing modal, clean up wording for import saved objects modal

* fix broken function test - management delete index pattern

* wrap names in single quotes
2018-01-08 10:14:46 -07:00
Peter Pisljar
2fd41d5a6b
other and missing bucket support for terms agg (#15525) 2018-01-05 15:12:58 +01:00
Brandon Kobel
f332c8a3e3
Sharing render-complete (#15574)
* Naively switching to Observables

* Dispatching native renderStart and renderComplete events

* Emitting actual event...

* Removing the visualize debounce

* Fixing unsubscribe

* Dispatching correct event for the metric visualization

* Moving the $scope.$apply to right after the call to render so it does
what it's supposed to

* Switching angularjs attribute name

* Removing the renderStart since it doesn't do anything

* Removing the renderComplete trigger from visualize, since no one listens
at this level

* Using vis.requestError to communicate when there's a request error

* Grabbing the container when creating the observable

* Dispatching renderStart as soon as we can

* Only emitting renderComplete after we wait for a new animation frame

* Can't ignore the first resize, sometimes it's actually a resize

* Use $timeout in visualiationEditor render, it can be in a digest already

* Calling renderComplete in componentDidUpdate as well

* Switching tests to use render-complete

* Fixing peer review corrections from @gammon

* Removing visDiv reference, we don't need it anymore

* Removing requestAnimationFrame

* Removing unused $timeout

* Removing test that was testing an implementation detail

* Adding $timeout.flush

* Moving the failures to the actual tests don't work.

* Deleting tests that weren't running before

* Removing import of removed test

* Consolidating the dispatchRenderComplete/dispatchRenderStart
2018-01-04 15:20:41 -05:00
Peter Pisljar
604787cf50
fixing collapsible side bar editor (#15826) 2018-01-04 15:39:18 +01:00
Yuri Astrakhan
a1a8aacc22
Upgrade to jQuery 3.2.1 (#15674)
* Upgrade to jQuery 3.2.1

The jquery-migrate showed a number of warnings,
but no errors, so it should be safe to use.

Warnings mostly related to bind, unbind, focus, ...
https://github.com/jquery/jquery-migrate/blob/master/warnings.md

To enable jquery-migrate, I added it to package.json, and added
a require('jquery-migrate') to the webpackShims/jquery.js right
after the require('jquery').

* Breaks in jQuery3: $(window).offset()

* await field.type(), update chromedriver
2017-12-22 12:46:39 -05:00
Tim Roes
79e134ccb1
Refactor spy panels (#15682)
* Fix design of debug spy panel

* Simplify the debug spy panel

* Fix height of spy content

* Use scope bindings for spy

* Allow modes to be enabled/disabled based on vis

* Make showSpyPanel docs for loader more detailed

* Only show default panels when using courier

* Fix styling of req/resp spies

* Fix title styling in spy panel

* Get rid of visData in spy panels

* Use tabs instead of select box

* Ensure uiState in spy

* Restyle code in default editor

* Remove unnecessary if protection

* Use local scope variable for rowsPerPage

Due to issues with primitive datatype bindings in Angular this anyway
didn't save it correctly back into the variable.

* Pull all logic into spy directive

* Fix bug when closing panel

* Check for minimum chart size

* Skip spy tests for now

* Fix functional tests

* Improve uiState mock

* Create unit tests

* Remove dead scope binding
2017-12-21 12:01:23 +01:00
Stacey Gammon
fbb4412a63
Stabilize dashboard view_edit tests post EUI CSS merge (#15689)
* bring back the tests and run 30x

* Remove extra tests
2017-12-20 13:37:18 -05:00
Peter Pisljar
4941590354
few enhancements to default sidebar editor (#15619) 2017-12-19 20:27:54 +01:00
CJ Cenizal
3bd256c1c4
Reinstate and skip Dashboard and Visualize tests (#15687)
* Reinstate and skip flaky Dashboard view edit tests.
* Reinstate and skip flaky Visualize gauge chart tests.
2017-12-19 10:23:32 -08:00
CJ Cenizal
b0e25a9466
EUI: Reset CSS #2 (#15657)
* Add EUI v0.0.7 as a dependency.
- Add support for using dark theme EUI CSS in Dashboard.
- Set light theme as the default.
- Add comments to chrome.jade about role of theme node.
- Add (WTFPL OR MIT) to acceptable licenses.

* Remove old reset CSS.
- Remove naked element selectors from base.less.
- Remove Bootstrap resets.
- Remove UI Framework reset.
- Remove unused reset styles from UI Framework.

* Fix CSS regressions caused by removal of CSS reset.
- Replace usage of sr-only with euiScreenReaderOnly.
- Apply euiButtonEmpty classes to the 'Add a filter' button.
- Fix Notification padding and layout.
- Apply euiTabs styles to Timepicker mode tabs.
- Fix layout of Available Fields heading in Discover.
- Add padding to Popular Fields container in Discover.
- Push down Selected Fields heading in Discover sidebar.
- Fix appearance of links in Discover sidebar.
- Fix height of pills in Filter Bar.

* Fix timepicker tests.
- Remove kbn-accessible-click from timepicker buttons.

* Fix functional tests.
- Use byCssSelector inside of testSubjects.find.
- Delete flaky view_edit.js test: 'when time changed is stored with dashboard'.
- Delete flaky view_edit.js test: 'and preserves edits on cancel > when time changed is stored with dashboard'.
- Delete flake Gauge Chart tests. EUI changed the font size, and the text within the gauges doesn't render when the window is too small.
2017-12-18 16:43:32 -08:00
Stacey Gammon
74c3ddf78c
Investigate flaky add new visualization test (#15506)
* try to repro

* try 30 times

* some clean up and extra tests

Don’t see how this should help, but switch to using data-test-subj and
add a wait until loading line.

Still, I don’t see that it would actually help.

Also it took 50 test run to hit it once, so doubling the amount of
times the test suite runs to improve chances of hitting it.

* Throw the function in a retry

Unfortunately it’s probably not worth investigating why the click
sometimes fails, given how rare it is and that it’s only reproducible
in the test environment.

* Remove extra test loops

* remove skip and check multiple times again

* Fix issue with flaky field toggle selection

* forgot await

* More stabilizations

* Stabilize by disabling toast auto hides on all dashboard tests

* avoid all the retries to see if disabling toast auto hides was what was messing everything up

* remove comment that is no longer relevant

* Remove extra tests
2017-12-18 10:36:48 -05:00
Tim Roes
4671aa5824
Fix bug where negative time offsets in visual builder will shift x-axis range (#15554)
* Shift negative series before drawing, fix #15553

* Add tests fot TSVB markdown

* Use waitUntilLoadingHasFinished

* Remove forgotten skip

* Switch test order

* Use generic seriesOption

* Rename test from chart to metric

* Use test subj to find metric tabs

* Improve TSVB tests
2017-12-16 11:07:30 +01:00
Tim Roes
769bb66d20
Fix broken initial uiState set (#15630) 2017-12-16 11:04:47 +01:00
Stéphane Campinas
bb09492bab fix json validation and empty json handling in advanced settings (#15531) 2017-12-15 17:10:19 -05:00
archana
36652c2dbc
[CLI] Readable logs on Windows with chalk colors (#15557)
* [colors] try new cli colors

* [colors] try magentaBright instead of magenta

* [colors] try white for log text

* [colors] replace all remaining ansicolors with chalk

* [colors] try yellowBright instead of yellow

* remove ansicolors from package.json

* [tests] attempt to fix tests

* [tests] attempt to fix tests again

* [color] backgrounds, cleanup
2017-12-15 14:35:10 -06:00
Stacey Gammon
0f6c9d2ca4
Stabilize dashboard snapshot tests (#15603)
* Tests were sometimes failing locally when waiting for a render counter of 6

Render counter value, as it turns out, is unstable and unreliable, and
is in the process of being replaced.  For now, we have to use a lower
render counter (sometimes it’s 6, sometimes it’s 4) and add a sleep.
Very unfortunate, but hopefully will soon be able to be use the newer
logic.

* Remove extra test runs
2017-12-14 15:42:50 -05:00
Tim Roes
325eebd4f1 Skpi a flaky (maybe broken) test (#15616) 2017-12-14 14:21:46 -05:00
Stacey Gammon
56b9a7c802
Add mechanism for dashboard snapshots (#15463)
* Add mechanism for dashboard snapshots

* Adjust wait for render function since it needs to be 2, not gt 0.

Should be obsolete when the new render stuff is complete.

* resize images using new library so comparisons work across different screen resolutions

* use jimp comparison and see if expanding to expanded panel mode helps when comparing across browser/os

* Try to ensure window size

* Experiment with a smaller window, see if screenshot dimensions change

Update screenshot for new window dimensions

* Try cover + quality, see what the diffs look like.

* Stop trying to get TSVB to pass, try area charts

There is a timezone bug with tsvb:
https://github.com/elastic/kibana/issues/15501

* gah, cover didn't work, check resize

* bump render counter to 6, as it should be.

As it turns out, the visualization was not done re-rendering to
maximized mode

* Bump threshold for comparison

* reduce down to a single test run

* Don't use an environment variable to detect updateBaselines cmd line flag
2017-12-13 13:41:40 -05:00
Stacey Gammon
3878cc835e
Use render counter to fix timing issue with click events on pie slices (#15494)
* Use render counter to fix timing issue with click events not being applied by the time a pie slice is clicked.

* use testSubjects.moveMouseTo function

It has built in safety checks for stale element refs

* remove sleep

* Remove extra test suite runs, passed enough times
2017-12-12 11:36:12 -05:00
Stacey Gammon
d0c99661c8
Investigate fix for flaky clone test (#15503)
* First, run the test suite in question 20s to see how flaky it is and if it can be semi reliably repro'ed

* Use testSubjects instead of click by link test.

* spaces in data-test-subj selectors messes this up

* Passed sufficient number of times, remove extra test runs
2017-12-12 10:44:21 -05:00
Stacey Gammon
acde688097
skip flaky dashboard tests (#15505) 2017-12-08 17:30:25 -05:00
Stacey Gammon
9df13b2f7a
PreserveCrossAppState introduced flakiness in the tests (#15495) 2017-12-08 11:47:47 -05:00
Felix Stürmer
a8ef0e4e81
Skip flaky discover test (#15412) 2017-12-08 10:59:09 +01:00
Stacey Gammon
c008f3225e
improve preserve app cross state logic (#15464) 2017-12-07 16:07:17 -05:00
Spencer
f71ec29bd6
[CI] Produce junit test reports (#15281)
* [mocha] use custom reporter for legible results in jenkins

* [jest] use custom result processor for legible results in jenkins

* [karma] enable junit output on CI

* [mocha/junitReporter] accept rootDirectory as configuration

* [jest/reporter] use reporters option added in jest 20

* [toolingLog] remove black/white specific colors

* [dev/mocha/junit] no reason for junit to be a "reporter"

* typos

* [dev/mocha/junit] use else if

* [karma/junit] use string#replace for explicitness

* [junit] use test file path as "classname"

* [ftr/mocha] no longer a "console" specific reporter
2017-12-05 17:29:48 -07:00
Stacey Gammon
fa28e7554c
Skip flaky dashboard panel tests (#15430) 2017-12-05 18:24:59 -05:00
Stacey Gammon
de9fdcbfa7
Update getDashboardIdFromCurrentUrl to handle a url with no query params (#15323)
* add some retries, waiting for the loading indicator to be hidden once is not enough

* test to see if looping over the flaky test 25 times will trigger it on jenkins

* Try again to semi-reliably report on jenkins

* Attempt to fix invalid id coming out of getDashboardIdFromCurrentUrl

* Clean up to submit attempted flaky test failure fix

clean up
2017-12-05 11:07:34 -05:00
Matt Bargar
131b63c0f8
Solidify context app filter test (#15203)
* Solidify context filter test
2017-12-04 17:27:42 -05:00
Stacey Gammon
f839564d91
Add more test stability and helpful debug output to try to catch issue with panel controls (#15392) 2017-12-04 17:21:38 -05:00
Chris Roberson
64d57e4cec
Disable flaky test (#15385) 2017-12-04 15:51:50 -05:00
Stacey Gammon
75d06049fd
Attempt to stabilize filterVizNames failures (#15316)
* Attempt to stabilize filterVizNames failures

* Remove duplicate function name
2017-12-04 13:49:17 -05:00
Nathan Reese
86f4437968
pass showSpyPanel to Editor (#15283) 2017-12-04 11:11:40 -07:00
Stacey Gammon
f43c0e5b1b
add extra test for more info (#15326) 2017-12-01 15:36:42 -05:00
Stacey Gammon
3adcbb7a0f
set last saved filters when a dashboard is saved. (#15311) 2017-11-30 16:14:26 -05:00
Stacey Gammon
b1529792bc
attempt to fix flaky edit visualization link (#15265) 2017-11-30 13:42:45 -05:00
Spencer
999126373f
[dev/ci_setup] generalize jenkins_setup script for other CI environments (#15178)
* [dev/ci_setup] generalize jenkins_setup script for other CI environments

* [dev/ci_setup] accept more general `CACHE_DIR` env arg

* [dev/ci_setup] node.js install might not be invalid
2017-11-30 10:26:03 -07:00
Bhavya RM
215d567f46
Kibana home page tests (#15098)
Couple of tests to make sure Kibana home page isn't breaking.
2017-11-29 16:24:00 -05:00
Nathan Reese
c579677bf9
[input controls] Horizontal layout (#14918)
* input controls horizontal layout

* fix controlWidth calculation

* add functional test to ensure panel resizing changes layout

* use all caps for consts, add more comments about where values came from

* replace sleeps in functional tests with retry

* use KuiFlexGroup with wrap option instead of manually calculating widths

* remove no longer used min width constants
2017-11-29 10:28:07 -07:00
Stacey Gammon
cd92cff665
Remove uiState from dashboard - communicate via the panelState instead (#14949)
* Remove uiState from dashboard - communicate via the panelState instead

* migrate old app state from the url

* Add comment about migration and why the unused uiStateJSON field is kept around still
2017-11-29 11:26:14 -05:00
Matt Bargar
f6b0623b37
Revert #15169 (#15220)
Fixes #14159
2017-11-29 11:06:10 -05:00
Peter Pisljar
e9bd952f9b
fixing field formatters for gauge (#15145)
* fixing field formatters for gauge

* fixing the if statement

* using lodash _.has for the if statement

* adding selenium test
2017-11-29 13:18:45 +01:00
Nathan Reese
074d7cef8c
[timelion] provide argument suggestions when argument name not provided (#15081)
* get wiring done for timelion application functional tests

* add tests for expression type ahead functions, arguments, and argument values

* provide argument suggestions when argument name not provided

* updates from cjcenizal review
2017-11-28 08:51:11 -07:00
Tim Roes
6584c6d5b2
Add functional tests, that banner is shown (#15121) 2017-11-28 10:16:00 +01:00
Matt Bargar
2911418677
Temporarily disable scripted field filter tests (#15169)
Commenting out 4 tests that are failing due to elastic/elasticsearch#26760 so we can bump ESVM snapshots. We'll need to revert this PR once elastic/elasticsearch#26760 is fixed.
2017-11-27 16:30:02 -05:00
Spencer
90e2aa001b
[savedObjects] Use index template (#14271)
* [es][savedObjects/index] put template on each savedObject write

The elasticsearch plugin currently checks for the Kibana index on each iteration of the healthCheck, and creates it if it does not exist. This removes that step from the healthCheck and instead, before each savedObject is written to elasticsearch, ensures that Elasticsearch has the necessary index template should the write result in index creation.

The healthCheck still has the `patchKibanaIndex()` logic, which checks the type in the Kibana index and adds any missing types. This step now does nothing when the Kibana index does not exist, and does what it has always done when it does.

* [ftr] remove unused kibanaIndex service

(cherry picked from commit b1ef897dafeb6d43fe279776e44a9d793a389dc3)

* [savedObjects/integration] create now creates kibana index

* [es/healthCheck] remove use of format()

* [es/healthCheck/tests] use sinon assertions

* [es/patchKibanaIndex] test for kibana index missing behavior

* [savedObjects/errors] add tests for EsAutoCreateIndexError

* [savedObjects/config] deprecate and remove savedObjects.indexCheckTimeout config

* use dangling commas consistently

* [ui/error_auto_create_index] fix class names

* [ui/savedObjectsClient] no need to specify basePath

* [eslint] fix linting issue
2017-11-21 17:05:46 -07:00
Stacey Gammon
45eaa09b9a
add some new tests that the uiState migration in the url will benefit from (#15063) 2017-11-21 15:07:58 -05:00
Tim Roes
d4442e78d7
Fix Kibana crashing when resizing a tag cloud too small (#15001)
* Don't allow d3-cloud to run on 0 size, fix #14833

* Add test that validates correct resizing
2017-11-21 20:48:26 +01:00
Peter Pisljar
f22cd98825
removing more tile map tests which are flaky (#15082) 2017-11-21 19:59:30 +01:00
Spencer
319832774a
[dashboard/functionalTests] stabilize initialization ordering (#15031) 2017-11-20 17:01:41 -07:00
Stacey Gammon
856d012b46
ensure time picker open in retry loop (#15034)
* ensure time picker open in retry loop

* clean up isTimepickerOpen to use testSubjects.exists
2017-11-20 09:55:28 -05:00
Peter Pisljar
b03eac4376
removing failing tilemap tests (#15048) 2017-11-20 13:18:06 +01:00
Stacey Gammon
337def12bd
Fix mistakes added in bwc url test PR (#15038)
* Fix mistakes in bcc tests

* Correct data-test-subj name
2017-11-17 18:06:27 -05:00
Stacey Gammon
7152d334cf
Add BWC url tests for 6.0 (#15033)
Also adds some stabilization by refactoring some retries and
expectations.
and fixes a bug that snuck in between two PRS where the pie slice css
changed.
2017-11-17 14:59:16 -05:00
Spencer
60298ec8b2
[ftr] default window size (#14834)
* [ftr/mocha] revert Mocha UI assigments after loading test files

* [ftr] add beforeTopLevelSuite and afterTopLevelSuite lifecycle hooks

* [ftr] add defaultWindowWidth and defaultWindowHeight options

Adds two configuration parameters to the functional test runner which
will set the windowSize before running the tests in any file and
restores the original window size when the tests complete.

Individual test files can set the windowSize within its own before() or
beforeEach() handlers using the same `command.setWindowSize()` command.

* [ftr/assignmentProxy] use better naming

* [ftr] restore initial window size after each suite

* [ftr] improve error message for unexpected suite definitions

* [ftr/remote] remove configuration option, rely on suite-level changes

* [ftr] fix stack manipulation order

* [ftr/remote] write tests for window size management
2017-11-17 11:15:02 -06:00
Stacey Gammon
de1b98cdb7
Add a couple tests with queries and saved searches linked to visualizations (#14878)
* Add a couple tests with queries and saved searches linked to visualizations

Fix issue when edit link is clicked too soon and embeddable hasn't finished loading

* attempt to fix flakiness

* remove duplicate lines
2017-11-17 10:24:08 -05:00
Peter Pisljar
5793410a35
pie chart labels (#12174)
* pie labels

* add simple unit test

* fixing dashboard test

* fixing basedo on review

* simplifying conflict resolution

* removing unused code

* cleanup code

* minor changes based on review

* updating option templates to match new design

* updating truncate_labels to work with chars instead pixels
2017-11-17 09:57:02 +01:00
Spencer
5cddc10077
Upgrade to eslint 4 (#14862)
* [eslint] upgrade to 4.10.0

* [eslint-config-kibana] limit jest config to jest test files

* [ui_framework] remove trailing comma from rest-spreads

* [dashboard/tests] tag jest helpers with .test.js suffix

* explicitly import expect.js where used

* [eslint] apply auto-fixes

* [eslint] manually add/wrap some parens for compliance

* [npm] point to local packages for testing/review

* [jest] remove .test extension from jest helpers

* [ui_framework] fix trailing comma removal from 3bc661a1c8

* [packages] upgrade eslint packages
2017-11-14 18:16:59 -07:00
Tyler Smalley
188796314d
Removes index.mapper.dynamic from test fixture (#14930)
This was removed in ES 6.0+

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-11-14 07:25:38 -08:00
Matt Bargar
5321d7a567
Remove support for expression based scripted fields (#14310)
This PR removes the ability to create scripted fields with the expression language. It also adds an error message to the scripted field list page if any expression scripts already exist which instructs the user to convert all their scripts to painless.
2017-11-13 15:39:53 -05:00
Peter Pisljar
5f1f28ba41 reverts metric visualization (#14052)
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.
2017-11-09 14:49:58 -05:00
Stacey Gammon
6d4972869b
Add new title query param to dashboard listing page (#14760)
* introduce a mechanism to load a dashboard by title is a single one is found, if not, to refill the search box on the listing page

* Make case insensitive and prevent listing page from "blipping" up on the screen before the redirect

* Add tests
2017-11-09 14:23:14 -05:00
Tim Roes
0661a4aa64
Fix issue, where tags are vanishing after double resize (#14822)
* Fix issue, where tags vanishing after resizing

* Also fix rawText in debug log
2017-11-08 16:18:14 +01:00
Jonathan Budzenski
34b4e8c05d
[jenkins] Add docs script (#14769)
* [jenkins] Add docs script

* remove xvfb
2017-11-07 15:37:28 -06:00
Stacey Gammon
f806d64e60
Add dashboard tests (#14775)
* add a test that will fail due to the current TSVB bug

* add a test to catch the latest bug with saved searches

* reorder array so tests pass

* Update tests since the first panel is TSVB and won't have a spy pane toggle
2017-11-07 14:59:18 -05:00
Stacey Gammon
81e89685e1
Don't update layout multiple times in updateLayout function (#14780)
* Don't update panels in state one at a time when layout changes

* Add test that would have caught the bug

* fix test

Hmmm, I thought grabbing the panels the second time would change their
order predictably but seems no.  Still unsure if the order is
garaunteed.

* Need to split out merging panel updates action and setting panels

Tests caught this issue, woot.

* Fix remaining setState warnings by not calling getEmbeddableHander in render
2017-11-06 15:36:46 -05:00
Thomas Neirynck
22a2fa0f4a
add more regionmaps tests (#14735) 2017-11-06 09:31:15 -05:00
Stacey Gammon
ac5ae44590
Add new "use margins" option to add separation between panels (#14708)
* Add an option to add margins between panels

Make it a boolean useMargins to make this even simpler

* Fix issue with undefined not matching false and triggering a dirty state

* add some test helpers and css for plugin use-age

* default to margins on for new dashboards.

* use const variable syntax for margins

* Fix issue with older dashboards being bumped into useMargins: true mode
2017-11-02 19:17:43 -04:00
Stacey Gammon
92964ef45f
Sync saved searches that don't have local modifications on a dashboard (#14452)
* Add tests to catch error

* Fix test

* Don't store column and sort state in panel uiState unless explicitly overridden in a dashboard.

* add debug messages

* Elements can go stale between the find by and the click event so wrap in a retry

* fix bad merge with master
2017-11-02 16:47:40 -04:00
Stacey Gammon
abef22b2ef
only show expand toggle, in view mode, on hover (#14706)
* only show expand toggle, in view mode, on hover (and focus for accessibility)

* Fix tests
2017-11-02 15:00:57 -04:00
Stacey Gammon
5984553962
Fix issue with saved search changes not being preserved on a dashboard (#14678)
* add tests to catch the issue

* use Object.assign instead of the spread operator

since we want it to modify the original object
2017-10-31 08:30:47 -04:00
Chris Roberson
677742ee06
[Management] [7.0] Handle saved search import better (#14637)
* Port fixes from #14625 to 7.0

* Fix linting issue
2017-10-27 11:46:45 -04:00
Chris Cowan
bb859d93b9 [TSVB] Fix bugs with the new split gauge/metric behavior (#13823)
* Adding a check to make sure everything is available to render

* Adding some safety

* Fixing a bug with the label

* Adding an additional sleep to wait for the new data to arrive.
2017-10-26 15:47:57 -07:00
Stacey Gammon
fc27d2abe6 wrap the check in a retry so we know it's not just taking a little long for the css changes to take affect in the UI (#14575) 2017-10-26 09:55:09 -04:00
CJ Cenizal
05cbb92965 [eslint-config-kibana] Apply AirBnB spacing rules (#14522)
* Add AirBnB key-spacing rule.
* Add AirBnB comma-spacing rule.
2017-10-25 15:08:05 -07:00
CJ Cenizal
ec38367b70 [UI Framework] Improve KuiContextMenu keyboard navigation UX (#14434)
* Refactor focus state logic to use the React lifecycle correctly.
* Update KuiPopover snapshots.
* Remove unnecessary isVisible prop from KuiContextMenu.
* Allow user to both tab AND use the arrow keys for navigation.
* Reinstate ability to tab and shift-tab to the title of KuiContextMenuPanel.
* Release focus from Dashboard panel options KuiContextMenu by closing it when you select an option.
* Update KuiContextMenu example to demonstrate best practice of closing the menu when an item is clicked.
* Replace native transitionend event handler with onAnimationEnd React event handler.
2017-10-24 17:37:51 -07:00
Stacey Gammon
9c8887ab74 Fix flaky test (#14543)
Doesn’t fix the underlying issue (which hasn’t been determined yet) but
it should get the build passing consistently again.
2017-10-24 16:55:16 -04:00
Thomas Neirynck
147c6c2832 Re-enable the tilemap test (#14532)
Enables the tile-map test. this was disabled due to CORS-issues on the server end. These are now resolved.

This reverts commit e7fb1b0d8f.
2017-10-24 11:08:21 -04:00
Nathan Reese
88f3af406d Scale histogram aggregation interval to avoid crashing browser (#14157)
* update histogram agg to fetch min and max when search request started

* scale interval when too many buckets are created

* move min and max params into autoBounds param, remove typo in help text

* use decorated property instead of params to avoid changing agg state, add functional test

* remove sleep from functional test

* make args for onSearchRequest functions specific. Add getters and setters for autoBounds to AggConfig. Protect against divide by zero

* add unused arguments with eslint comment
2017-10-24 06:53:19 -06:00
Stacey Gammon
e5a3ba7802 Introduce redux into dashboard (#14518)
* Initial check in of introducing redux in dashboard

* Use redux-actions and redux-thunks to reduce boilerplate

* Make sure all panels are minimized from the start when a dashboard is loaded - we don't want a panel id from a different dashboard in the state tree on a fresh open.

* Remove unused file

* use classnames dependency instead of manual logic

* First pass on selectors, handleActions, and more segmented reducers.

* Fix bugs with selectors and reducers and add tests that would have caught them.

* Fix issue plus tests

discover was not returning a promise

* Make expanding a panel purely a css modification which avoids all re-renders

* Found another bug with initial state not being set correctly on a hard refresh

* Remove check for change handlers now that the event handler bug is fixed

* rename dashboardState => dashboard for reducers and redux state tree

* Remove unnecessary top level describe in jest tests

* Navigate back to landing page at the end of the newly added test suite

* Fix lint errors

* Stabilize flaky tests by waiting until saved object search is finished loading results

* Don't leak subscriptions to the store.

* use selectors to grab dashboard panel off state.

* Remove use of getState in dispatcher to avoid circular reference and still use selectors

* use spread over object.assign

* No need to pass second param in when the input is simply returned as-is.
2017-10-23 16:39:23 -04:00
Stacey Gammon
e7fb1b0d8f Comment out tile map tests to get the build passing again (#14519) 2017-10-23 15:29:38 -04:00
Kim Joar Bekkelund
b19c823bc3 Use Boom.boomify instead of deprecated Boom.wrap (#14325) 2017-10-12 08:56:07 +02:00
Court Ewing
19b760627b test: move es proxy tests to api_integration (#14406)
Integration tests should go into the corresponding directory under
`test` and should use the appropriate testing framework that is designed
for long-running tests like those. Tests under __tests__ directories
should be fast-running unit tests only.
2017-10-11 13:59:03 -04:00
Court Ewing
22e97f068e test: move url shortener tests to api_integration (#14411)
Integration tests should go into the corresponding directory under
test and should use the appropriate testing framework that is designed
for long-running tests like those. Tests under tests directories
should be fast-running unit tests only.
2017-10-11 13:57:29 -04:00
Kim Joar Bekkelund
6a2bb74407 Use Object spread instead of Object.assign where it makes sense (#13903)
* Prefer Object spread

* Add eslint rules for Object spread

* no slice
2017-10-10 14:50:56 +02:00
Tim Sullivan
57c25307b5 [FTR] Add getAttribute helpers to TestSubjects (#14340) 2017-10-06 09:28:46 -07:00
Spencer
6998f07454 [uiSettings] auto create/upgrade saved config (#14164)
* [uiSettings] auto upgrade savedConfig doc when missing

* naming tweaks

* fix comments

* ensure that rcVersions are not found within a version

* add some tests for non-single digit versions/rcs/betas

* return the condition, rather than using an if()

* assert that getUpgradeableConfig() is always called once

* [uiSettingsService] remove excess space

* [savedObjectsClient] only attempt to createOrUpgradeSavedConfig once

* [uiSettings/routes/tests] remove unused assert helper

* [functional/console] correct test title

* [ftr/kibanaServer/uiSettings] fix disableToastAutohide timeout
2017-10-05 15:34:09 -07:00
Chris Roberson
4c1d029c79 [Management] Allows for imports to select existing index (#14137)
* Adds ability to change index pattern on import

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* UI changes. Use a table in the modal grouped by index pattern id instead of multiple modals.

* PR feedback

* PR feedback

* PR updates

* Handle skip properly

* Fix error when there were no existing index patterns

* Tests for the new import conflict logic

* Fix invisible filters caused by missing index pattern (#14131)

"invisible filters" occur when the mapping chain throws an error. If a single filter throws an error, the entire chain rejects. As a result, not even the valid filters appear in the filter bar because they never get added to the scope. However the filters still exist in app state and still get sent with each search request.

The most common error occurs when the filter's meta.index property points to a non-existing index pattern. Since this property is only used for looking up field formatters and it is not essential for a working filter, we now fall back on raw values instead of failing if the index pattern is not found. See the PR this one replaces for discussion about other solutions we tried and why we chose to go this route.

* Show query and filter bars even when there's a linked search (#14212)

The query bar used to be hidden in the presence of a linked search because unlike filters, queries didn't get merged when flattening a SearchSource hierarchy. That means a query in the query bar would override the query in the linked search. This is no longer the case. As of 6.0 we include all queries in the SearchSource hierarchy in the final request, so there's no longer any reason to hide the query bar.

Since filters created via a Vis show up in the query bar when Kuery is selected, these filters now appear correctly even when there's a linked search in the vis editor.

Previously when unlinking a saved search visualize would insert the query and filters from the saved search into app state before removing the SearchSource from the hierarcy. This posed a problem because combining two lucene query strings isn't as easy as combing two sets of filters. We decided this behavior was a bit counterintuitive anyway. If the user wants to unlink the saved search, they probably want to discard it, not combine it with their local changes. So I've also updated the unlinking functionality to discard the saved search.

* limit wait time for baselayer (#14047)

* adding scope appy back (#14269)

* remove junk tests (#14191)

* We are using the index pattern id now

* Use the index pattern id here too

* Use an isolated es env for these tests

* Revert "Fix invisible filters caused by missing index pattern (#14131)"

This reverts commit e09d7ad1f9.

* Revert "Show query and filter bars even when there's a linked search (#14212)"

This reverts commit 3aee7c2bf0.

* Revert "limit wait time for baselayer (#14047)"

This reverts commit 44a71071ac.

* Revert "adding scope appy back (#14269)"

This reverts commit 51b6b51aac.

* Revert "remove junk tests (#14191)"

This reverts commit f06c18332b.

* Revert these
2017-10-04 20:42:07 -04:00
Nathan Reese
d5ed14f460 apply field formatter to tag cloud (#14230)
* apply field formatter to tag cloud

* use unformatted value for filter creation
2017-10-03 07:58:49 -06:00
Kim Joar Bekkelund
5009435148 [index patterns] Don't attempt to wrap Boom errors (#14253) 2017-10-03 15:06:51 +02:00
Spencer
e84761217e [savedObjects] fix error handling when Kibana index is missing (#14141)
* [savedObjects/delete+bulk_get] add failing tests

* [savedObjects/delete+bulk_get] improve 404 handling

* [savedObjects/client] fix mocha tests

* [savedObjects/tests] remove extra test wrapper

* [apiIntegration/kbnServer] basically disable es healthcheck

* [savedObjects/create] add integration test

* [savedObjects/find] add failing integration tests

* [savedObjects/find] fix failing test

* [savedObjects/client] explain reason for generic 404s

* [savedObjects/get] add integration tests

* [savedObjects/find] test request with unkown type

* [savedObjects/find] add some more weird param tests

* [savedObjects/find] test that weird params pass when no index

* [savedObjects/update] use generic 404

* fix typos

* [savedObjects/update] add integration tests

* remove debugging uncomment

* [savedObjects/tests] move backup kibana index delete out of tests

* [savedObjects/tests/esArchives] remove logstash data

* [savedObjects] update test

* [uiSettings] remove detailed previously leaked from API

* [functional/dashboard] wrap check that is only failing on Jenkins

* [savedObjects/error] replace decorateNotFound with createGenericNotFound

* fix typo

* [savedObjectsClient/errors] fix decorateEsError() test

* [savedObjectsClient] fix typos

* [savedObjects/tests/functional] delete document that would normally exist

* [savedObjectsClient/tests] use sinon assertions

* [savedObjects/apiTests] create without index responds with 503 after #14202
2017-10-02 18:51:58 -07:00
Tim Sullivan
7a52fed0d4 [Test/FTR] Add getPropertyAll to testSubjects service (#14210) 2017-09-28 10:59:50 -07:00
Spencer
4fed3725ae [SavedObjects] use constructor options (#14200) 2017-09-27 14:57:47 -07:00
Stacey Gammon
e35d7b0141 Replace gridster with react-grid-layout (#13853)
* Initial check-in to replace gridster with react-grid-layout and reactify panels

* # This is a combination of 3 commits.
# This is the 1st commit message:
Add margin of error to test determining panel widths

# This is the commit message #2:

use real kibana version when creating panel data. Will make future conversions easier.

# This is the commit message #3:

Fix lint errors

* Add margin of error to test determining panel widths

use real kibana version when creating panel data. Will make future conversions easier.

Move default height and width to dashboard_constants so those that need it don't end up including extra stuff like ui/chrome

* Remove unnecessary _.once when creating react directives in dashboard.js

* Remove unnecessary constructors

* Use componentDidMount instead of componentWillMount bc of async calls, and handle case where destroyEmbeddable is not defined.

* Remove unnecessary null in classNames

* Use loads defaultsDeep instead of Object.assign

* use render* instead of get* for functions returning an element

* use relative css paths

* Use local import path

* Switch to local imports and remove need for plugins path in jest tests

* Improve accessibility of max/min panel toggle icon

* remove unused css

Had to implement this via code

* disable eslint rule for setState in componentDidMount

Am not aware of a better way to handle this, aside from switching to
redux, since it’s recommended not to put async calls in
componentWillMount.  Since I plan to investigate redux next, disabling
for now. Open to other’s opinions on the matter.

* Use native map instead of lodash

* Have the grid handle setting the z-indexes of the right reactgriditem

* Make the draggable handle the title, not the whole heading

Otherwise the drag event often takes over click events when trying to
open the panel options menu and it gets really annoying.

* Change from click to mouse down detector in KuiOutsideClickDector so drags also close pop ups.

* Fix mistaken commit

Code from the redux PR snuck into this one.

* Run getEditPath and getTitle async calls in parallel - no need to wait on the return value of one before starting the others.

* Fix tests: update snapshots, add promise returns.

* version being added to panelData in the wrong spot caused isDirty flag to be true when it shouldn't be

* Fix unmounting/mounting problem with panels due to view/edit mode switch

* Fix bug where panels get squashed to one side when view mode is changed while a panel is expanded.

* Update snapshots to match wrong view mode comparison

* Improve naming of a variable

* Fix issue with pop over hiding behind tile maps

* Previous panel.js included ui/doc_table and ui/visualize - needed to include them in the chain for Dash only mode but not in that file.

* Fix bad merge: remove baseline screenshots
2017-09-26 18:02:13 -04:00
Jonathan Budzenski
b278ad96a9 [functional tests] Remove default screenshots (#14122)
* [functional tests] Remove default screenshots

* Remove baseline screenshots
2017-09-26 08:37:12 -05:00
Nathan Reese
30cc42f4ba Input Control visualization (#13314)
* react editor example

* ensure props are not updated

* use new stageEditorParams method to stage parameter changes

* make component stateless

* use terms_vis_editor component

* get add button to work

* update vis controller to display terms input controls

* update componenent when query bar updates

* add functional test

* lay ground work for different control types in single visulization

* make editors for range and text controls

* text control

* implement type ahead suggestor for text control

* add range slider

* some CSS work

* add submit button, move control init functionallity under control_factory

* add custom options for control types

* provide buttons to move controls up and down

* Make ControlEditor component and clean up styling of editor

* styling work

* multi select for terms dropdown control

* add option to disable filter staging, only enable submit button when filters are staged

* clean up range styling

* rename top level vis folder

* cleanup

* move control type select out of each control editor

* dark theme styling

* use ui/public/filter_manager/lib/phrases.js to build phrases filter, add tests to range filter manager

* use savedObjectsClient to get index patterns

* remove text control and add id to controls for react tracking

* ensure fields get updated when index pattern changes

* update PropTypes for react 15.6.1

* update to latest react-select to avoid isMounted deprecation warnings

* fix input controls functional test

* rename termsControl to listControl to be more generic

* add function test for clear button, refactor directory structure

* functional tests for updateFiltersOnChange is true

* fix react-select clipping problem in dashboard

* try clicking option instead of pressing enter to set react-select value in functional tests

* react-select css

* clean up control_editor component, make ListControlEditor component be function

* add jest test for vis_editor component and accessibility

* add decimal places option to range slider

* add jest test for InputControlVis component

* add default to switch blocks, split editor into seperate tabs, use shallow in snapshot tests

* fix race condition in field_select, update index_pattern_select to fetch indexPatterns on each filter

* clean up control initialization

* use htmlIdGenerator to avoid html element id conflicts

* update functional test to support new editor tabs

* finish jest tests for sub componenets

* mark vis as experimental, refactor buttons for better usability

* fix bug in list control where unable to select options containing numbers and options containing commas. Truncate display of long list options

* fix chart types functional test

* fix jest tests, add margin to action buttons

* remove binds from render functions

* experement with native input range sliders

* Revert "experement with native input range sliders"

This reverts commit aed599e88a.

* Use Promise.resolve in tests and replace _createRequest with searchSource.fetch

* add inputs to range control
2017-09-20 06:22:55 -06:00
Spencer
48d35f81fd create babel-preset and babel-register modules (#13973)
* [babel] create babel-preset and babel-register modules

* [babel-preset] add comments to babel-preset-env.target choices

* [babel-preset] use more normal BUILT_WITH_BABEL signal

* [babel-register] extended comment about filtering ./src in dist

* [babel-preset] stage of class properties has changed, sorta
2017-09-19 17:44:47 -07:00
Stacey Gammon
c3c55ded22 Allow custom timeouts on click (#14042) 2017-09-19 09:56:40 -04:00
Thomas Neirynck
e8b43b55e9 Allow panning beyond dateline (#13955) 2017-09-18 12:42:03 -04:00
Brandon Kobel
0971e6a2ac Removing mapper.dynamic setting from the esArchiver mappings (#13970)
index.mapper.dynamic should not be used for 6.0+ indices, so this commit
removes it from the esArchiver mappings.json for kibana

Related elastic/elasticsearch#25734
2017-09-13 07:14:18 -04:00
Stacey Gammon
60ad20f8c1 fix wrapped retry error. This was copied code from 6.x, which didn't have the back ported version (#13967) 2017-09-12 20:25:54 -04:00
Stacey Gammon
f55c9da6f2 Investigate 6.0 flaky tile map test (#13942) 2017-09-12 08:38:22 -04:00
Stacey Gammon
d853fcae11 Fix map updates not propagating to the dashboard (#13589)
* Add failing tests

* Add fix by preventing uiState from being directly updated in visualization.

* Add test that would catch error caused by this PR in regards to filter agg

* Fix issue with uiState triggering dirty dashboard state by introducing temporary "sessionState" on a vis

* Click go after toggling the switch

* add more tests to ensure getRequestAggs functions as intented

* Go back to old zoom calculations. Update vis test data

I think because mapCollar is no longer saved in uiState, the save
recenters the data and we get slightly different data points from the
test data.  As far as my eye can tell, everything is working as
intended.

* fixes and tests

- incorporate the new init function which fixes the bug where we lose
map bounds data on a fresh save
- add a test that would have caught that
- adjust tests due to bug where map bounds is changing slightly.  File
another issue for that separately as it doesn’t actually affect the
users map experience.

* Fix tests

Tests relied on my original logic of defaulting to the saved zoom state
and not relying on uiState, so I went back to that logic.  Also found
another bug where mapZoom of 0 was being considered invalid, but it is
actually a valid zoom level.

* Since leaflet upgrade 'path.leaflet-clickable' can't be used to retrieve circles anymore

* Avoid stale element reference

I suspect because the page is changing, you have to keep fetching the
element afresh.  I don’t see this error on my local but saw it on
jenkins.

* remove spy select from PageObjects.visualize.getDataTableData

The function is used in the Data Table visualization where the spy pane
select doesn’t exist.
2017-09-07 08:43:19 -04:00
Lukas Olson
f2f759f6ed Fix "is one of" filter editor (#13771)
* Keep params so phrases editor works after closing and opening

* Add functional test
2017-09-06 20:40:31 -07:00
Rashmi Kulkarni
4cc98fc3ad fix create_index_pattern_method to handle no timefields (#13852) 2017-09-05 15:22:53 -07:00
Tim Roes
301452ffcb Improve accessibility of the visualize editor (#13780)
* Use aria-expanded and better labels for agg collapsables

* Fix all agg options collapsables, fix #12892

* Label all vis editor inputs correctly, fix #11859

* Fix broken functional test
2017-08-31 11:46:02 +02:00
Peter Pisljar
9786e453c3 visual builder should set vis.initialized when ready (#13779)
* tsvb needs to set vis.initialized

* adding visual builder integration test
2017-08-31 08:57:34 +02:00
Stacey Gammon
fa2edcaf20 Investigate flaky add new visualization link test (#13755) 2017-08-30 09:42:04 -04:00
Lukas Olson
19ac99a388 Re-enable filter editor suggestions (#13376)
* Re-enable filter editor suggestions

* Use search instead of include

* Escape query

* Show spinner

* Use include rather than search

* Add additional regex and explanation for parameters

* Add suggestions API test

* Make sure test actually runs

* Use send instead of query

* Fix suggestions API test
2017-08-25 16:38:49 -07:00
Chris Roberson
9175137c57 "Create index pattern" wizard. (#13454)
* Create Index Pattern Creation wizard.
- Create a directive for each step in the wizard.
- Reorganize files into conventional folder structure.
- Rename files with more conventional and consistent naming patterns.
- Display indices, partial matches, exact matches.
- Add loading, empty, and success states.
- Add option to include system indices.

* Temp: comment out and mock getIndices functionality.

* Hook up data seaching

* Add for/id connections for form inputs and labels

* Automatically append a wildcard

* Highlight the index pattern in the results

* Ensure we only remove the last character if it's a `*`

* Auto hide index pattern id controls

* Ensure this link is tabbable

* Move the advanced fields down

* Use toggle button

* This shouldn't ever be required

* Revert "This shouldn't ever be required"

This reverts commit b6e31e79308271e7f04ea1d42ce66e32e7aa0612.

* Update based on comments in PR

* Ffew more changes

* Port changes from Tyler's PR, https://github.com/elastic/kibana/pull/13353

* Remove unnecessary file

* Fix broken functional tests

* Copy changes

* Fix functional tests

* Remove loading from the main select, and move to an additional select

* Show help text when loading

* Fix sorting

* Fixing broken functional tests

* Couple changes from PR review

* Ensure input field does not show a red border until touched

* More descriptive and consistent copy
2017-08-24 09:04:28 -04:00