Commit graph

2441 commits

Author SHA1 Message Date
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