Commit graph

2701 commits

Author SHA1 Message Date
archana
2a2ccd1eba Option to run kibana from build for CI (#19125) 2018-05-18 12:46:34 -05:00
Chris Roberson
8455bcdbba
[6.x] [Management] Saved objects to React/EUI! (#17426) (#19179)
* [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

* Update snapshots
2018-05-17 16:18:51 -04:00
archana
eae18989a3
Functional test setup with kbn-test package (#18568) (#19174)
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-17 13:42:43 -05:00
Peter Pisljar
b73f00538f
fixing disabled aggs (#18796) (#19171) 2018-05-17 09:30:12 -05:00
Spencer
7dbec2e1e7
[6.x] [mocha] remove grunt-simple-mocha (#19079) (#19139)
* [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 16:25:59 -07:00
Stacey Gammon
3d7b3973fd
The previous retry wouldn't work because 'click' has it's own retry (#19078) (#19129)
* 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 12:43:13 -04:00
Stacey Gammon
66fb5a13fb
Use find service instead of remote directly (#19070) (#19115) 2018-05-16 12:36:52 -04:00
Peter Pisljar
4b61f6933a
Don't deep clone vis in courier request handler (#19069) (#19081) 2018-05-16 10:27:59 -05:00
Tim Roes
a9083312a8
Replace _term order in terms agg by _key (#19032) (#19118) 2018-05-16 16:36:15 +02:00
spalger
7df7ab92d6 Revert "Functional test setup with kbn-test package (#18568)"
This reverts commit c2265e3931.
2018-05-15 13:16:36 -07:00
archana
c2265e3931 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-15 12:33:01 -05:00
Stacey Gammon
e742967edb
Fix, or debug, flaky nested visualization filter test (#18957) (#19036)
* 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 11:20:22 -04:00
Stacey Gammon
c5c8c631c0
Try to fix flaky override colors test (#18961) (#18982)
* unskip test and run multiple times to trigger

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

* Undo multiple test runs
2018-05-10 16:42:29 -04:00
Peter Pisljar
099522aa43
Allow splitting series on multiple fields (#17855) (#18953) 2018-05-10 06:42:26 -05:00
Lee Drengenberg
5603706023
Support 1 Kibana and 1 Elasticsearch URL as input params (#9760) (#17808)
* 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-05-08 17:42:26 -05:00
Nathan Reese
39ca96faac
[Input controls] Replace react-select with EuiComboBox (#17452) (#18932)
* 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 15:39:21 -06:00
Stacey Gammon
5327c5cd5d
Add a time zone test (#18870) (#18925)
* Add a time zone test

* Make sure timezone it back to UTC after the test runs
2018-05-08 14:46:14 -04:00
Jen Huang
8079bec770
Advanced Settings to React/EUI (#18878) 2018-05-07 16:20:56 -07:00
Thomas Neirynck
1ea934c7d0
Do not handle precision changes when no aggregations have been configured on the coordinate map (#18826) (#18859) 2018-05-07 11:28:20 -04:00
Stacey Gammon
d4e1dc2b21
Expand coverage of dashboard tests (#17703) (#18861)
* 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-07 10:38:22 -04:00
spalger
b64bf90313 disable flaky test
(cherry picked from commit 6667c63a91)
2018-05-04 12:19:59 -07:00
Spencer
0296eb2816 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

(cherry picked from commit d35316642d)
2018-05-02 16:38:37 -07:00
Tim Sullivan
b4c226bbb7
[Stats] Add metrics collector and stats API (#17773) (#18677)
* [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-05-01 08:59:53 -07:00
Nathan Reese
d74866dd0d
update to eui 0.0.44 (#18606) (#18641)
* 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 13:02:35 -06:00
Nathan Reese
b64c66c789
Eui dashboard listing (#16967) (#18605)
* 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 10:51:14 -06:00
Tim Roes
1f6382c6ee
Fix map not refetching correctly (#18600) (#18603) 2018-04-26 17:02:36 +02:00
Stacey Gammon
3e9cc0f8aa
Fleshed out communication layer between embeddables and dashboard (#17446) (#18563)
* 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-25 15:10:49 -04:00
Jenkins CI
bc5b51554d Migrate x-pack-kibana source to kibana 2018-04-24 13:49:26 -07:00
Brandon Kobel
acd99a13c5
Preserving boom error headers for index pattern exceptions (#17725) (#17775) 2018-04-18 13:48:29 -04:00
Stacey Gammon
64083ca284
Add failing test (#17688) (#17744) 2018-04-17 12:37:50 -04:00
Chris Cowan
84ad08e70d [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:17:03 -07:00
Tim Roes
9b23529fc5
Fix flaky lab mode test (#17622) (#17652) 2018-04-11 10:24:40 +02:00
Spencer
079f303357
[6.x] Rename saved objects bulk_get and find endpoints (#17512) (#17645) 2018-04-10 17:44:58 -07:00
archana
a03e37cb9c
[CLI] Readable logs on Windows with chalk colors (#15557) (#17636)
* [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

* [color] update yarn.lock
2018-04-10 10:57:56 -05:00
Tim Sullivan
e98173cf2c
[Server/Routes] organize status routes together with others (#17558) (#17589)
* [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-06 09:28:19 -07:00
Tim Sullivan
fad068e979
[Test] Integration test for Kibana status API (#17509) (#17549)
* [Test] Integration test for Kibana status API

* bad prettying
2018-04-04 11:46:48 -07:00
Stacey Gammon
c149ab9213
Gain extra info when nested query visualization test fails (#17390) (#17494)
* 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 12:41:46 -04:00
Spencer
3418affdb8
[6.x] [server/config/deprecationWarnings] fix deprecation logging warnings (#17439) (#17470)
* [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 10:45:21 -07:00
Bhavya RM
c4e71d733a
Test for ensuring that options *hide all panel titles" work on dashboards. (#17440) (#17459)
Test for making sure option hide all panel titles work
2018-03-29 19:13:49 -04:00
Stacey Gammon
90b6fa0189
Expose an esSupertest for directly querying elasticsearch in tests (#17306) (#17433)
* Expose an esSupertest for directly querying elasticsearch in tests

* oops, fix bad capitalization
2018-03-28 14:06:43 -04:00
Bhavya RM
544c26b659
Functional tests to add index alias reference (#17343) (#17406)
* Functional tests to add index alias reference (#17343)
Test to make sure Kibana handles index alias reference.
2018-03-27 14:48:03 -04:00
Stacey Gammon
0990f564ea
De-couple redux panels object with app state (url) panels (#17361) (#17400)
* 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-27 11:27:20 -04:00
Rashmi Kulkarni
54f3a803a8
Large fileds 6.x (#17404)
* 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

* 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-03-26 13:29:39 -07:00
Rashmi Kulkarni
6bc6c6a250
adding large_string_test (#17312) (#17371)
- Loads a huge PDF book as a large string via es_archiver
- Creates index pattern
-Navigates to discover and checks the Highlighted search terms
-------------------------------------------------------------------------------------------------


* 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 12:48:54 -07:00
Matt Bargar
4f2fbe7fb6
[6.x] Add query enhancements opt-in switch to query bar (#17232) (#17353)
* 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.

* fix test
2018-03-22 18:00:25 -04:00
CJ Cenizal
e4a6cf2cca
Improve feedback in Discover (#16771) (#17354)
* 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 13:06:03 -07:00
Stacey Gammon
65f7f638c4
Don't use transforms (#17175) (#17308)
* 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 16:37:03 -04:00
Nathan Reese
c659eca14f fix dashboard grid test timing issue (#17250)
* add 50 extra pixel to move to ensure panel goes above first panel
2018-03-19 19:52:31 -07:00
Lee Drengenberg
9afc7511a9
Getting Started - Shakespeare (#16827) (#17164)
* 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 17:01:40 -05:00
Lee Drengenberg
0d56e9a9dd
Save html for failed tests (#16850) (#17160)
* 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-14 15:42:04 -05:00
Jen Huang
b8fcf06336
Change indexed fields table to use EuiToolTip and display 10 rows by default (#17074) (#17129) 2018-03-14 09:27:37 -07:00
spalger
ac060f450e [functionalTests/context] disable flaky test 2018-03-13 13:23:14 -07:00
Nathan Reese
74982f83bd
Dashboard smaller panel grid dimensions (#16763) (#17105)
* 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 09:37:16 -06:00
Jen Huang
03d9c4218e
React/EUI-ify indexed fields table (#16695) (#17068)
* React/EUI-ifying indexed fields table
2018-03-09 09:17:55 -08:00
Kim Joar Bekkelund
d346ebae54
Move running projects tests into Grunt task (#16946) (#17063) 2018-03-09 16:00:49 +01:00
Chris Roberson
27b0e88e32
Await for config changes and re-enable tests (#17016) (#17044) 2018-03-08 14:22:21 -05:00
Stacey Gammon
9245cf5def
Investigate flaky dashboard state test (#16977) (#17020)
* 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 17:14:41 -05:00
Stacey Gammon
6b6f9afac4
Fix embeddable config url updates (#15728) (#17021)
* 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 17:14:32 -05:00
Stacey Gammon
74a4bc5c15
Tests are failing consistently (#16995) (#17008) 2018-03-07 13:31:43 -05:00
Matt Bargar
5317c733a4
Update Kuery Syntax (#15857) (#17005)
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 10:13:45 -08:00
Bhavya RM
496e94a88e
Sanity tests for table viz in TSVB (#16880) (#16897)
Sanity test for table viz in TSVB
2018-02-23 18:33:36 -05:00
Nathan Reese
7eb2bfc2ba
Update filterEditor directive to use default index pattern when none are provided. (#16235) (#16893)
* 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 12:37:58 -07:00
CJ Cenizal
358d0d82bb
Add test-subj-selector module to packages dir. (#16623) (#16709)
* 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 12:56:25 -08:00
Bhavya RM
9e885e88be
adding gauge and topN sanity tests for TSVB (#16583) (#16651)
adding two basic sanity test automation for gauge and Top N
2018-02-09 15:11:10 -05:00
Tim Sullivan
809c38b069
[FTR] Add pause/resume auto refresh to header page object (#16618) (#16628)
* [FTR] Add pause/resume auto refresh to header page object

* remove unecessary promise.resolve
2018-02-09 10:05:46 -07:00
spalger
22ab3aa9e3 run kbn-plugin-helpers tests on ci 2018-02-08 14:35:42 -07:00
spalger
5759140039 Revert "Move kibana-plugin-helpers to kbn-plugin-helpers package (#16565) (#16617)"
This reverts commit 4dcee04197.
2018-02-08 14:32:16 -07:00
Spencer
4dcee04197
Move kibana-plugin-helpers to kbn-plugin-helpers package (#16565) (#16617)
* initial commit

Original commit: elastic/kibana-plugin-helpers@06c603d0d9

* simplify bin scripts and get them working

Original commit: elastic/kibana-plugin-helpers@1455f09194

* [npm] finish package.json

Original commit: elastic/kibana-plugin-helpers@c7b0e9d522

* [readme] inception

Original commit: elastic/kibana-plugin-helpers@5caa197ea7

* [npm] rename

Original commit: elastic/kibana-plugin-helpers@9fb16dd1c3

* [package.json] fix typo

Original commit: elastic/kibana-plugin-helpers@f135485c1a

* [npm] do not commit npm logs

Original commit: elastic/kibana-plugin-helpers@a1bf7505a7

* version 5.0.0-beta1

Original commit: elastic/kibana-plugin-helpers@5abf8ee2ac

* Fix start cmd on Windows

Original commit: elastic/kibana-plugin-helpers@7718cefd8a

* 5.0.0-beta2

Original commit: elastic/kibana-plugin-helpers@4e70c3e4d8

* added license files for better visiblity

Original commit: elastic/kibana-plugin-helpers@a3297e2728

* group task related files

Original commit: elastic/kibana-plugin-helpers@4a8ccce1ec

* [build] place the plugin contents under the kibana directory

Original commit: elastic/kibana-plugin-helpers@0a0f5fea0a

* [start] send extra args to the kibana process

Original commit: elastic/kibana-plugin-helpers@ce943ca67c

* 5.0.0

Original commit: elastic/kibana-plugin-helpers@42163ce240

* Correctly bundle dependencies if there is only one

Fixes elastic/kibana-plugin-helpers#8

Original commit: elastic/kibana-plugin-helpers@c46b2ca07c

* [test:server] include Kibana node_modules/.bin in path when running server tests

Original commit: elastic/kibana-plugin-helpers@bbda801351

* 5.0.1-pre

Original commit: elastic/kibana-plugin-helpers@2d26645117

* Pass pluginId and plugin-path values through correctly (elastic/kibana-plugin-helpers#11)

Fixes elastic/kibana-plugin-helpers#10

Original commit: elastic/kibana-plugin-helpers@74defe4206

* 5.0.1-pre2

Original commit: elastic/kibana-plugin-helpers@0fd7d07558

* [build] ask for kibana version when set to "kibana"

Original commit: elastic/kibana-plugin-helpers@5fe34c47ae

* 5.0.1-pre3

Original commit: elastic/kibana-plugin-helpers@2e0e10106b

* Running main, corrected build, checking for no dependencies (elastic/kibana-plugin-helpers#15)

* Updated if check if there are no dependencies

* Now running main()

* Build now uses the correct parameter.

Original commit: elastic/kibana-plugin-helpers@7cf31d26d2

* fix lint error

Original commit: elastic/kibana-plugin-helpers@06af5c3dd4

* support defining an alternate plugin root

Original commit: elastic/kibana-plugin-helpers@0e4d4fa501

* add an optional callback to the build action

Original commit: elastic/kibana-plugin-helpers@6a1012f96b

* run vinyl.src in the plugin.root directory

Original commit: elastic/kibana-plugin-helpers@8f3081b029

* add basic test for the build action

Original commit: elastic/kibana-plugin-helpers@52230f6c3b

* include nvmrc file for development

Original commit: elastic/kibana-plugin-helpers@f51115de11

* add circle-ci config file

Original commit: elastic/kibana-plugin-helpers@80505e1b0d

* 5.0.1

Original commit: elastic/kibana-plugin-helpers@e42d134e4c

* use a promise instead of a callback to track task completion

Original commit: elastic/kibana-plugin-helpers@c6dacf3507

* 5.0.1-patch1

Original commit: elastic/kibana-plugin-helpers@d49bb6ea73

* do not pass stdin to sub tasks, fixes elastic/kibana-plugin-helpers#19

Original commit: elastic/kibana-plugin-helpers@f872954888

* 5.0.1-patch2

Original commit: elastic/kibana-plugin-helpers@a754ef5b50

* Use json files to override default config values (elastic/kibana-plugin-helpers#21)

* read json overrides, mix into defaults

* rename plugin config helper

* use the plugin config in start

Original commit: elastic/kibana-plugin-helpers@4cfbe28128

* allow browser tests to be runOnce

Original commit: elastic/kibana-plugin-helpers@ede52ece0e

* add a test/all task

Original commit: elastic/kibana-plugin-helpers@9b7c15cf32

* add test command to execute test/all

Original commit: elastic/kibana-plugin-helpers@e096ac55f3

* remove use of spread and default assignment

Original commit: elastic/kibana-plugin-helpers@17532f0fdd

* pass run method into tasks

don't reach into lib for it

Original commit: elastic/kibana-plugin-helpers@d92d2e979a

* use --dev flag for browser dev mode

Original commit: elastic/kibana-plugin-helpers@a790fdd338

* fix default command, no more use of call

Original commit: elastic/kibana-plugin-helpers@fe13b987c9

* Move require calls outside of task functions (elastic/kibana-plugin-helpers#23)

* move require calls outside of task functions

* fix default command value

Original commit: elastic/kibana-plugin-helpers@846855e960

* add --include options to test:server

Original commit: elastic/kibana-plugin-helpers@d3b5e24207

* split and concat and included server test paths

Original commit: elastic/kibana-plugin-helpers@e7dffb6ffe

* add plugins option to browser tests

used to pass your own testsBundle.pluginIds to the test runner

Original commit: elastic/kibana-plugin-helpers@d370d74bd4

* if plugins are specified, use the option value instead of the default

Original commit: elastic/kibana-plugin-helpers@d610c9c9d6

* assign args in argument passing code

minor syntax change

Original commit: elastic/kibana-plugin-helpers@ce77d071d1

* make server test files an argument

Original commit: elastic/kibana-plugin-helpers@b043b423ef

* add not about custom tests executiong to the readme/help

Original commit: elastic/kibana-plugin-helpers@139221e5a6

* Separate the task runner and the command line parser (elastic/kibana-plugin-helpers#25)

* remove conditionl require in runner

add tasks module to load all tasks, throw if task does not exist

* change task signatures and action handlers

- tasks get plugin, run, and an options object
- action handler controls what goes into each task
- taskRunner wrapper moves the command object to the first argument

* change test command signature

allow files to be passed in, and pass all options to test:server and test:browser

* simplify the task runner

* fix typo in unknownOptions

* expose the task runner as the module's main

this way tasks can be run programatically without going through a cli parser

* add tests for task runner

* remove file passing for testAll

* add serverTestPaths to the plugin config

useful for overriding the value via a config file

* [config] plugin.serverTestPaths -> plugin.serverTestPatterns

Original commit: elastic/kibana-plugin-helpers@82af4df64e

* 5.1.0

Original commit: elastic/kibana-plugin-helpers@6dd1407e81

* update the readme

Original commit: elastic/kibana-plugin-helpers@c650c4527e

* append build info to package.json

Original commit: elastic/kibana-plugin-helpers@504fd07f3c

* format the package.json file

Original commit: elastic/kibana-plugin-helpers@c474820bb5

* node4 support: const -> var

Original commit: elastic/kibana-plugin-helpers@19b607d954

* fix cli parsing of --dev flag

Original commit: elastic/kibana-plugin-helpers@3aa37c2dfc

* 5.1.1

Original commit: elastic/kibana-plugin-helpers@ad9a8e85b8

* Enable custom builds (elastic/kibana-plugin-helpers#27)

* only modify root package.json file

previously this was modifying every package.json from node_modules as well

* refactor the build task

export the build, define helpers outside of the task

* allow custom kibana and build versions

both can be passed via flags

* allow custom build globs to be specified

* move build into its own module

* add simple option parsing tests

* update readme

* move dependency file appending into the action

* put source and target into variables

* move config file loading into a module

* refactor test_server_action slightly

be more explicit about the files option overwriting the plugin settings

* move default build patterns to plugin config

allows the setting to be overridden via the config file

* fix dirname on relative includes

trim any leading '../' off the path when moving it into the build target

* move node_module dirs into plugin_config module, use existing promises

* rename file_config => config_file

Original commit: elastic/kibana-plugin-helpers@743e4a37c2

* return the result of running the action

Original commit: elastic/kibana-plugin-helpers@9b819eeeb3

* Allow custom build target via --build-destination flag (elastic/kibana-plugin-helpers#30)

* pass buildTarget into createBuild

allow override from options

* add cli option to override build destination

--build-destination

* fix tests

* resolve build destination from plugin.root

this allows both relative and absolute paths to be used

* add short option

* update the help

Original commit: elastic/kibana-plugin-helpers@6c9fb3464e

* 5.2.0

Original commit: elastic/kibana-plugin-helpers@8c2a547d9d

* Use npm/yarn to install build dependencies (elastic/kibana-plugin-helpers#28)

* remove scripts and devDependencies from package

these are only useful in development, and serve no purpose in the build

* refactor the package rewriter

* clean up the buildTarget before building

* run npm install after build creation

* break apart the create_build module

* add create_package modules

call it from within the build_action

* add flag to skip package zip creation

* rename skip-package flag to skip-archive

* rename rewritePackage to rewritePackageJson

* include lock and shrinkwrap files if they exist

* add test for skipping zip creation

* add some tests to build creation

Original commit: elastic/kibana-plugin-helpers@ef6b9c6332

* 6.0.0

Original commit: elastic/kibana-plugin-helpers@9ee7b62e75

* Update URLs in package.json (elastic/kibana-plugin-helpers#31)

The package.json URLs are still referencing @spalger's version, whilst development and collaboration happens on @elastic's version

Original commit: elastic/kibana-plugin-helpers@1f322c1cb1

* 6.0.1

Original commit: elastic/kibana-plugin-helpers@8eae537f9f

* [tasks/test/browser] fix --kbnServer.tests_bundle flag

Original commit: elastic/kibana-plugin-helpers@12e7552adb

* 6.0.2

Original commit: elastic/kibana-plugin-helpers@ff9d402245

* change let to var (elastic/kibana-plugin-helpers#35)

allow helpers to run on pre-6.0 node

Original commit: elastic/kibana-plugin-helpers@91de9a84d3

* Fix running tasks on Windows (elastic/kibana-plugin-helpers#37)

* create windows cmd wrapper

* use windows cmd wrapper on browser tests

* be explicit about the mocha command location

* use windows cmd wrapper on server tests

* use windows cmd wrapper on build

default to using npm as well

Original commit: elastic/kibana-plugin-helpers@35f80a08ce

* 6.0.3

Original commit: elastic/kibana-plugin-helpers@b4da11f899

* fix `build` task when yarn is not installed

Original commit: elastic/kibana-plugin-helpers@d48808f8d8

* 6.0.4

Original commit: elastic/kibana-plugin-helpers@0c0ee17a54

* Added helpers, KIBANA_ROOT environment override (elastic/kibana-plugin-helpers#41)

* run is now a named export, added helpers for interacting with the kibana repo

* [config] override the kibana root config with KIBANA_ROOT envvar

Original commit: elastic/kibana-plugin-helpers@54a38cd9a2

* bump to version 7 snapshot

Original commit: elastic/kibana-plugin-helpers@0c1b2c1670

* [utils] use actual plugin config (with defaults)

Original commit: elastic/kibana-plugin-helpers@f3bfdb2689

* require node 6 (elastic/kibana-plugin-helpers#42)

* switch to .node-version file

* require and validate node version 6+

Original commit: elastic/kibana-plugin-helpers@85655f230e

* Bump eslint rules, update code to match rules (elastic/kibana-plugin-helpers#43)

* bump @elastic/eslint-config-kibana and deps

* eslint --fix

* fix unused vars

some exceptions for tests

* move eslint-config-kibana to dev

* rename create_package function

* make .node-version looser, match internal checks

Original commit: elastic/kibana-plugin-helpers@6fac14bd51

* 7.0.0

Original commit: elastic/kibana-plugin-helpers@2ff10e0a45

* commit yarn.lock file

Original commit: elastic/kibana-plugin-helpers@22bc67e613

* [utils/babelRegister] add support for changes in elastic/kibana#13973

Original commit: elastic/kibana-plugin-helpers@13f30fb4d5

* 7.0.1

Original commit: elastic/kibana-plugin-helpers@abb99896ad

* Feat: add translations to default build source paths (elastic/kibana-plugin-helpers#48)

* feat: add translations path to build

included by default, to better match what's in the elastic products and even the plugin template

also add a translations path to the mock plugin for tests

* chore: add script to run tests with linting

Original commit: elastic/kibana-plugin-helpers@9871a4b11d

* chore: add yarn.lock file to repo

Original commit: elastic/kibana-plugin-helpers@4108fe6597

* v7.0.2

Original commit: elastic/kibana-plugin-helpers@dba9da1b3c

* Feat: add includePlugins setting (elastic/kibana-plugin-helpers#49)

* observe includePlugins setting

* fix: move resolve up to config parser

this ensures that the path is resolved relative to the plugin root

Original commit: elastic/kibana-plugin-helpers@fd07d617a4

* Fix: readme include docs (elastic/kibana-plugin-helpers#50)

* chore: add a simple version compat chart

* chore: document the settings and how to use them

* chore: use icon for license info

* chore: use matching badge for circleci status

Original commit: elastic/kibana-plugin-helpers@1f39e488a3

* v7.1.0

Original commit: elastic/kibana-plugin-helpers@11238b2697

* fix: read package file instead of using require

require uses a cache, so if the package.json file was changed before running build, the changes won't exist in the build runtime. using fs.readFileSync instead ensures that the information read from package.json is current.

Original commit: elastic/kibana-plugin-helpers@f78e891838

* v7.1.1

Original commit: elastic/kibana-plugin-helpers@b489c76b26

* Fix: Package use build target (elastic/kibana-plugin-helpers#52)

* fix: pass build target into package task

use the build target for the zip output

* chore: change up the npm scripts

* chore: add create package tests

* chore: update eslint deps

* chore: fix linting issues, add engines

Original commit: elastic/kibana-plugin-helpers@51058fb7fc

* v7.1.2

Original commit: elastic/kibana-plugin-helpers@e314c21bf3

* Use scripts/kibana instead of bin if available (elastic/kibana-plugin-helpers#53)

* Use scripts/kibana instead of bin if available

* semicolons

* Don't fallback to legacy bin/kibana start method

* chore: add 8.x version to compat chart

Original commit: elastic/kibana-plugin-helpers@fc72de53bd

* v8.0.0

Original commit: elastic/kibana-plugin-helpers@d538b32bc3

* chore: add kibanaRoot setting to readme

Original commit: elastic/kibana-plugin-helpers@3769efdb26

* [createToolingLog] update require path for toolingLog (elastic/kibana-plugin-helpers#54)

Original commit: elastic/kibana-plugin-helpers@d968819d09

* v8.0.1

Original commit: elastic/kibana-plugin-helpers@2663befdc4

* Add support for passing in node options via environment variable (elastic/kibana-plugin-helpers#56)

* Add support for passing in node options via environment variable

* Split node options

* semicolon

Original commit: elastic/kibana-plugin-helpers@3fc4ec0e87

* Update yarn.lock

Original commit: elastic/kibana-plugin-helpers@b3d62e5925

* v8.1.0

Original commit: elastic/kibana-plugin-helpers@fb979ff679

* Deprecate specifying kibana root location (elastic/kibana-plugin-helpers#59)

Original commit: elastic/kibana-plugin-helpers@385fdede72

* Remove kibanaRoot option, require kibana-extra (elastic/kibana-plugin-helpers#58)

* Remove kibanaRoot option, require kibana-extra

* Check location of Kibana on postinstall

* Fix eslint

* Remove 'process.env.KIBANA_ROOT'

Original commit: elastic/kibana-plugin-helpers@3511054dfb

* v9.0.0

Original commit: elastic/kibana-plugin-helpers@8d5af744bb

* [npm] upgrade gulp-zip (elastic/kibana-plugin-helpers#61)

Original commit: elastic/kibana-plugin-helpers@94e7530e76

* chore: ignore yarn.lock file

Original commit: elastic/kibana-plugin-helpers@9cad57cd97

* [npm] upgraded eslint-related deps (elastic/kibana-plugin-helpers#62)

* [npm] upgraded eslint-related deps

* [npm] reflect peer deps from @elastic/eslint-config-kibana

Original commit: elastic/kibana-plugin-helpers@1add265641

* v9.0.1

Original commit: elastic/kibana-plugin-helpers@140024adac

* [config] throw if config file has a syntax error (elastic/kibana-plugin-helpers#65)

Original commit: elastic/kibana-plugin-helpers@487dd70bdb

* v9.0.2

Original commit: elastic/kibana-plugin-helpers@3bd57fbe5e

* [kbn-plugin-helpers] remove redundant configs

* [kbn-plugin-helpers/yarn] add yarn.lock file

* run kbn-plugin-helpers tests on ci

* [plugin-helpers] remove keywords from package.json

* [plugin-helpers] rely on kibana eslint

* [plugin-helpers/eslint] remove unused vars

* [eslint] allow kebab-case in any bin directory

* [plugin-helpers] replace last few uses of old package name
2018-02-08 13:56:00 -07:00
Nathan Reese
d43677c451
Nested input controls (#16407) (#16612)
* 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 11:30:35 -07:00
Chris Roberson
e845247f13
[Management] Time field step in React! (#16129) (#16517)
* 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-05 10:35:18 -05:00
Chris Roberson
43ea098107
[Management] Fix importing objects connected to saved searches that contain conflicts (#16004) (#16492)
* 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 16:17:35 -05:00
CJ Cenizal
8b6ca9f6f7
Remove GlobalToastList wrapper directive. Add onChange callback. (#16375) (#16405)
* Remove GlobalToastList wrapper directive. Add onChange callback.
* Skip flaky tag cloud test.
2018-01-30 10:34:00 -08:00
Nathan Reese
154b096d4c
EUI input controls visualization (#16210) (#16404)
* 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 11:19:23 -07:00
Tim Roes
eceb08d407
[6.x] Fix issue with disabled lab mode (#16351) | Properly wait for search list to load (#16388) (#16394)
* Fix issue with disabled lab mode (#16351)

* Fix saved object finder issue

* Add functional test

* Properly wait for search list to load (#16388)
2018-01-30 16:31:31 +01:00
Peter Pisljar
4903ab4653
visualize editor should not show if embed is set to true in url (#16310) (#16361) 2018-01-30 10:12:35 +01:00
Chris Earle
4a04fd6613 [Tests] Revert Timeout to Default 1s (#16359)
This should hopefully speed up Selenium tests again.
2018-01-29 12:55:03 -05:00
CJ Cenizal
6f96f17989
Reduce TestSubjects.find default timeout to 1s. (#16342) (#16345) 2018-01-28 17:53:45 -08:00
CJ Cenizal
ff9caf9675
Fix assertions against toasts in Dashboard and Discover functional tests. (#16336) (#16344) 2018-01-28 17:53:26 -08:00
CJ Cenizal
7bd9876453
Extract fatal notification into fatalError service, add support for EuiToast notifications (#15749) (#16330)
* 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-27 18:00:51 -08:00
Court Ewing
26c167e00e
test: move cookie tests to api_integration tests (#14435) (#16332)
This long running test does not belong in the unit tests.
2018-01-27 16:37:21 -08:00
Nathan Reese
9652db16ba
sort options list (#16145) (#16156) 2018-01-19 09:19:42 -07:00
Thomas Neirynck
5737f078ba
Add topojson support / EMS v3 support (#15361) (#16076)
This adds support for the v3 endpoint of the Elastic Maps Service. This includes support for Topojson files.
2018-01-16 17:56:18 -05:00
Nathan Reese
dc9e8def07
Add "use time filter" option to input controls (#15852) (#16071)
* 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 13:55:03 -07:00
Brandon Kobel
27e5c90855
Functional tests comparePngs write resized images to the session directory (#15976) (#15991) 2018-01-16 13:21:16 -05:00
Tim Roes
9bd8f534c1
Fix some styling issues (#16023) (#16043)
* Fix border of vis view

* Fix pagination looks

* Fix functional tests
2018-01-15 11:04:18 +01:00
Yuri Astrakhan
e9ff24872f
Migrating vega_vis from plugin (#15014) (#16035)
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 16:26:07 -05:00
spalger
034d8d97f5 [functional/context] disable flaky test
(cherry picked from commit 5d49d52328)
2018-01-11 13:47:19 -07:00
Nathan Reese
ff460a70cc
[6.x] Kibana Home page - phase two (#14749) (#15965)
* 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

* fix broken depenencies (#15960)

* update yarn.lock
2018-01-10 11:40:06 -07:00
Bhavya RM
1dea44c592
Kibana home page tests (#15098) (#15964)
Couple of tests to make sure Kibana home page isn't breaking.
2018-01-10 11:27:20 -05:00
Kim Joar Bekkelund
a817517574
[6.x] Switch to Yarn (#15485) (#15955)
* 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

* Update lockfile
2018-01-10 16:54:20 +01:00
Spencer
cec220fa94
[6.x] [functional/management/import] disable flaky test (#15914) (#15915) 2018-01-08 21:39:19 -07:00
Nathan Reese
b4af0430d3
replace KuiConfirmModal with EuiConfirmModal in confirm-modal directive (#15693) (#15898)
* 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 12:16:54 -07:00
Peter Pisljar
acbdf48b6a
other and missing bucket support for terms agg (#15525) (#15864) 2018-01-08 07:59:47 +01:00
Brandon Kobel
56dc541bdd
Sharing render-complete (#15574) (#15853)
* 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-05 08:05:13 -05:00
Peter Pisljar
f32b284689
fixing collapsible side bar editor (#15826) (#15846) 2018-01-04 16:49:25 +01:00
Yuri Astrakhan
7fa21bf39d
Upgrade to jQuery 3.2.1 (#15674) (#15757)
* 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 16:42:53 -05:00
Tim Roes
008034c1aa
Refactor spy panels (#15682) (#15734)
* 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:55:13 +01:00
Stacey Gammon
99bf2cb200
Stabilize dashboard view_edit tests post EUI CSS merge (#15689) (#15719)
* bring back the tests and run 30x

* Remove extra tests
2017-12-20 14:45:25 -05:00
Peter Pisljar
20c9e3bf30
few enhancements to default sidebar editor (#15619) (#15700) 2017-12-19 21:32:37 +01:00
CJ Cenizal
3294a2ff8e
Reinstate and skip Dashboard and Visualize tests (#15687) (#15698)
* Reinstate and skip flaky Dashboard view edit tests.
* Reinstate and skip flaky Visualize gauge chart tests.
2017-12-19 10:26:59 -08:00
Stacey Gammon
5ed5235eed
Investigate flaky add new visualization test (#15506) (#15667)
* 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-19 09:48:33 -05:00
CJ Cenizal
d67d6206e6
EUI: Reset CSS #2 (#15657) (#15676)
* 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 17:39:06 -08:00
Chris Roberson
7173053102
fix json validation and empty json handling in advanced settings (#15531) (#15644) 2017-12-18 09:10:53 -05:00
Tim Roes
e5eb9d0713
Fix bug where negative time offsets in visual builder will shift x-axis range (#15554) (#15650)
* 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:59:51 +01:00
Tim Roes
5d9f5a6dd9
Fix broken initial uiState set (#15630) (#15649) 2017-12-16 11:59:33 +01:00
Stacey Gammon
e4a4969889
Stabilize dashboard snapshot tests (#15603) (#15620)
* 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 18:53:08 -05:00
Stacey Gammon
feb41476b1
Skpi a flaky (maybe broken) test (#15616) (#15617) 2017-12-14 15:23:12 -05:00
Stacey Gammon
faa2e9771e
Add mechanism for dashboard snapshots (#15463) (#15593)
* 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 15:49:18 -05:00
Stacey Gammon
15fadeda2d
Use render counter to fix timing issue with click events on pie slices (#15494) (#15555)
* 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 12:47:10 -05:00
Stacey Gammon
7ef2bc3a79
Investigate fix for flaky clone test (#15503) (#15550)
* 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 12:21:28 -05:00
Stacey Gammon
fd75aeb0ce
skip flaky dashboard tests (#15505) (#15513) 2017-12-08 18:18:24 -05:00
Stacey Gammon
5a24f58ea0
[6.x] improve preserve app cross state logic (#15464) (#15481)
* improve preserve app cross state logic (#15464)

* Eliminate flakiness the original PR introduced
2017-12-08 11:47:56 -05:00
Felix Stürmer
f17b1b8f1a
[6.x] Skip flaky discover test (#15412) (#15491) 2017-12-08 15:46:25 +01:00
Stacey Gammon
c40066ca35
Skip flaky dashboard panel tests (#15430) (#15433) 2017-12-06 10:20:14 -05:00
Spencer
b4bd640a17
[6.x] [CI] Produce junit test reports (#15281) (#15437)
* [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 18:21:38 -07:00
Stacey Gammon
b489f469f9
Update getDashboardIdFromCurrentUrl to handle a url with no query params (#15323) (#15414)
* 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 14:52:30 -05:00
Matt Bargar
22cb168679
Solidify context app filter test (#15203) (#15403)
* Solidify context filter test
2017-12-05 11:33:58 -05:00
Stacey Gammon
89554f1b04
Add more test stability and helpful debug output to try to catch issue with panel controls (#15392) (#15399) 2017-12-05 08:48:11 -05:00
Chris Roberson
f4afba33eb
Disable flaky test (#15385) (#15396) 2017-12-04 16:52:08 -05:00
Stacey Gammon
b0e5bd6d19
add extra test for more info (#15326) (#15381) 2017-12-04 15:54:55 -05:00
Nathan Reese
8e5eb46536
pass showSpyPanel to Editor (#15283) (#15382) 2017-12-04 13:17:00 -07:00
Stacey Gammon
c70760821c
Attempt to stabilize filterVizNames failures (#15316) (#15388)
* Attempt to stabilize filterVizNames failures

* Remove duplicate function name
2017-12-04 14:42:23 -05:00
Nathan Reese
cb5557c671
[6.x] [input controls] Horizontal layout (#14918) (#15307)
* [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

* fix dashboard grid function test.
2017-11-30 16:11:38 -07:00
Stacey Gammon
3c9fef9620
set last saved filters when a dashboard is saved. (#15311) (#15324) 2017-11-30 17:16:38 -05:00
Stacey Gammon
1f25c56ece
attempt to fix flaky edit visualization link (#15265) (#15312) 2017-11-30 16:27:00 -05:00
Spencer
7e1709964f
[6.x] [dev/ci_setup] generalize jenkins_setup script for other CI environments (#15178) (#15303)
* [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:59:22 -07:00
Thomas Neirynck
dc7345a558
reverts metric visualization (#14052) (#15177) (#14882)
Uses the previous html/css rendering code instead of the svg-based rendering for simple metrics.

This backport required manual edits and js-linting.
2017-11-29 14:40:56 -05:00
Stacey Gammon
7d9d441377
Remove uiState from dashboard - communicate via the panelState instead (#14949) (#15260)
* 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 12:31:07 -05:00
Matt Bargar
cc2ad44e77
Revert #15169 (#15220) (#15256)
Fixes #14159
2017-11-29 11:09:02 -05:00
Peter Pisljar
d8af7cbd06
fixing field formatters for gauge (#15145) (#15242)
* fixing field formatters for gauge
2017-11-29 16:07:27 +01:00
Nathan Reese
375c0764c3
[timelion] provide argument suggestions when argument name not provided (#15081) (#15193)
* 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 13:59:30 -07:00
Tim Roes
3bdcb21c47
Add functional tests, that banner is shown (#15121) (#15181) 2017-11-28 12:40:12 +01:00
Matt Bargar
3ada261d98
Temporarily disable scripted field filter tests (#15169) (#15173)
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:57:58 -05:00
Spencer
466fb4b010
[6.x] [savedObjects] Use index template (#14271) (#15103)
* [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 18:26:29 -07:00
Stacey Gammon
f74044a12d
add some new tests that the uiState migration in the url will benefit from (#15063) (#15093) 2017-11-21 16:05:32 -05:00
Tim Roes
6eba02212a
Fix Kibana crashing when resizing a tag cloud too small (#15001) (#15089)
* Don't allow d3-cloud to run on 0 size, fix #14833

* Add test that validates correct resizing
2017-11-21 21:59:57 +01:00
Peter Pisljar
425239ef9e removing more tile map tests which are flaky (#15082) 2017-11-21 20:02:45 +01:00
Spencer
5732e1f60b
[6.x] [dashboard/functionalTests] stabilize initialization ordering (#15031) (#15070) 2017-11-20 19:57:29 -07:00
Stacey Gammon
2a4600f84a
ensure time picker open in retry loop (#15034) (#15054)
* ensure time picker open in retry loop

* clean up isTimepickerOpen to use testSubjects.exists
2017-11-20 10:53:40 -05:00
Peter Pisljar
9a0b6b589f removing failing tilemap tests (#15048) 2017-11-20 13:18:46 +01:00
Stacey Gammon
dbe7b0c4c7
Fix mistakes added in bwc url test PR (#15038) (#15041)
* Fix mistakes in bcc tests

* Correct data-test-subj name
2017-11-17 20:06:04 -05:00
Stacey Gammon
3783e41664
Add BWC url tests for 6.0 (#15033) (#15036)
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 18:06:42 -05:00
Stacey Gammon
b842651c9e
[6.x] Add a couple tests with queries and saved searches linked to visualizations (#14878) (#15025)
* 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

* Use the correct pie slice css
2017-11-17 16:04:03 -05:00
Spencer
c75698d83e
[6.x] [ftr] default window size (#14834) (#15032)
* [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 13:13:00 -06:00
Peter Pisljar
0b5052aac2
pie chart labels (#12174) (#15016)
* 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 12:13:08 +01:00
Spencer
98a1c5a0f1
[6.x] Upgrade to eslint 4 (#14862) (#14951)
* [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 20:20:37 -07:00
Tyler Smalley
81b9e727bd 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:26:14 -08:00
Jonathan Budzenski
1cd87ef246
[6.x] [ci] Build docs (#14868)
* [ci] Build docs (#14130)

* [ci] Build docs

* fix context

* remove docs task from jenkins:unit

* [jenkins] Add docs script (#14769)

* [jenkins] Add docs script

* remove xvfb
2017-11-14 09:16:16 -06:00
Tim Roes
6996d0599b
Fix issue, where tags are vanishing after double resize (#14822) (#14899)
* Fix issue, where tags vanishing after resizing

* Also fix rawText in debug log
2017-11-10 17:46:53 +01:00
Stacey Gammon
d813d99caa
Add new title query param to dashboard listing page (#14760) (#14880)
* 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 17:06:30 -05:00
Stacey Gammon
4a90855db1
Add dashboard tests (#14775) (#14826)
* 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 16:25:32 -05:00
Thomas Neirynck
ce44014c3a
add more regionmaps tests (#14735) (#14793) 2017-11-06 20:13:17 -05:00
Stacey Gammon
ec81ed7ca0
Don't update layout multiple times in updateLayout function (#14780) (#14805)
* 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 16:25:39 -05:00
Stacey Gammon
e58951878c
Add new "use margins" option to add separation between panels (#14708) (#14746)
* 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 20:15:52 -04:00
Stacey Gammon
91faad4cbb
Sync saved searches that don't have local modifications on a dashboard (#14452) (#14738)
* 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 17:51:42 -04:00
Stacey Gammon
592736353d
only show expand toggle, in view mode, on hover (#14706) (#14734)
* only show expand toggle, in view mode, on hover (and focus for accessibility)

* Fix tests
2017-11-02 15:57:07 -04:00
Stacey Gammon
ffecd74619
Fix issue with saved search changes not being preserved on a dashboard (#14678) (#14686)
* 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 10:55:10 -04:00
Chris Roberson
4fc92bb0e0
[Management] [6.x] Handle saved search import better (#14636)
* Port fixes from #14625 to 6.x

* Adding missing test file

* Fix linting issue
2017-10-27 11:46:52 -04:00
Chris Cowan
bd40fd1b29 [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:48:47 -07:00
Stacey Gammon
dd31fa880d 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) (#14609) 2017-10-26 15:13:02 -04:00
CJ Cenizal
7cda1aae09 [eslint-config-kibana] Apply AirBnB spacing rules (#14522) (#14590)
* Add AirBnB key-spacing rule.
* Add AirBnB comma-spacing rule.
2017-10-25 15:19:19 -07:00
Nathan Reese
d49b1f1cc9 Scale histogram aggregation interval to avoid crashing browser (#14157) (#14531)
* 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 19:34:30 -06:00
CJ Cenizal
a477efdc0b [UI Framework] Improve KuiContextMenu keyboard navigation UX (#14434) (#14556)
* 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:39:53 -07:00
Stacey Gammon
22c5def3d0 Fix flaky test (#14543) (#14551)
Doesn’t fix the underlying issue (which hasn’t been determined yet) but
it should get the build passing consistently again.
2017-10-24 18:47:46 -04:00
Thomas Neirynck
a3739d1817 Re-enable the tilemap test (#14532) (#14538)
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 14:03:37 -04:00
Stacey Gammon
e5e3dbb94d Introduce redux into dashboard (#14518) (#14521)
* 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 21:31:55 -04:00
Stacey Gammon
2765fea3e3 Comment out tile map tests to get the build passing again (#14519) 2017-10-23 17:49:52 -04:00
Kim Joar Bekkelund
8ddb1cf260 Use Boom.boomify instead of deprecated Boom.wrap (#14325) (#14437) 2017-10-13 11:42:13 +02:00
Court Ewing
b50518f6fc 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:36 -04:00
Court Ewing
2c8172d037 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:58:00 -04:00
Kim Joar Bekkelund
feff479f77 Use Object spread instead of Object.assign where it makes sense (#13903) (#14397)
* Prefer Object spread

* Add eslint rules for Object spread

* no slice
2017-10-10 15:55:06 +02:00
Tim Sullivan
c8a1e6c0ec [FTR] Add getAttribute helpers to TestSubjects (#14340) 2017-10-06 09:29:55 -07:00
Spencer
356cfe70b8 [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

(cherry picked from commit 6998f07454)
2017-10-05 15:35:50 -07:00
Chris Roberson
3487c55a1c [Management] Allows for imports to select existing index (#14137) (#14322) 2017-10-04 23:12:09 -07:00
Nathan Reese
49a1f04845 apply field formatter to tag cloud (#14230) (#14303)
* apply field formatter to tag cloud

* use unformatted value for filter creation
2017-10-04 12:20:29 -06:00
Kim Joar Bekkelund
3e7457d8ef [index patterns] Don't attempt to wrap Boom errors (#14253) (#14263) 2017-10-03 18:24:53 +02:00
Spencer
ddc1d9c5bf [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:52:26 -07:00
Stacey Gammon
b2ffeb71d2 Replace gridster with react-grid-layout (#13853) (#14242)
* 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-10-02 11:45:36 -04:00
Tim Sullivan
93f4c0c7b7 [Test/FTR] Add getPropertyAll to testSubjects service (#14210) 2017-09-28 11:10:12 -07:00
Spencer
9b304a78fd [SavedObjects] use constructor options (#14200)
(cherry picked from commit 4fed3725ae)
2017-09-27 14:58:36 -07:00
Jonathan Budzenski
4b2d640629
[functional tests] Remove default screenshots (#14122)
* [functional tests] Remove default screenshots

* Remove baseline screenshots
2017-09-26 08:40:27 -05:00
Nathan Reese
388050ea43 Input Control visualization (#13314) (#14074)
* 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 07:46:58 -06:00
Spencer
96366861a9 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

(cherry picked from commit 48d35f81fd)
2017-09-19 17:45:25 -07:00
Stacey Gammon
78707381fd Allow custom timeouts on click (#14042) (#14055) 2017-09-19 12:43:25 -04:00
Thomas Neirynck
efb57eda4a Allow panning beyond dateline (#13955) (#14038) 2017-09-19 10:41:03 -04:00
Stacey Gammon
5ec5f5c766 fix wrapped retry error. This was copied code from 6.x, which didn't have the back ported version (#13967) (#13978) 2017-09-13 12:44:38 -04:00
Brandon Kobel
aef4f0797a 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:15:17 -04:00
Stacey Gammon
bf7a8e66f3 Avoid a wrapped retry and use exists instead of find, which will take up all the time allotted for the retry if it fails once (#13467) (#13965) 2017-09-12 19:11:48 -04:00
Stacey Gammon
b9473b5db4 Investigate 6.0 flaky tile map test (#13942) (#13953) 2017-09-12 16:00:35 -04:00
Stacey Gammon
6a712e7470 Fix map updates not propagating to the dashboard (#13589) (#13883)
* 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 10:23:40 -04:00
Lukas Olson
8723042950 Fix "is one of" filter editor (#13771)
* Keep params so phrases editor works after closing and opening

* Add functional test
2017-09-06 20:41:59 -07:00
Rashmi Kulkarni
fc5e685b0e fix create_index_pattern_method to handle no timefields (#13852) 2017-09-06 11:31:41 -07:00
Stacey Gammon
41b6f06a1c Investigate flaky add new visualization link test (#13755) (#13776) 2017-08-31 09:47:09 -04:00
Tim Roes
99acc17f4a 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:33 +02:00
Peter Pisljar
a62bfe82ee visual builder should set vis.initialized when ready (#13779)
* tsvb needs to set vis.initialized

* adding visual builder integration test
2017-08-31 08:58:17 +02:00
Lukas Olson
1625f64013 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:43:45 -07:00
Nathan Reese
f8f25d999b Upgrade kibana to leaflet 1.x (#12367) (#13688)
* upgrade leaflet modules to 1.x latest

* fix css for leaflet controls

* update draw options so it is easier to see polygon when drawing

* fix chrome touch issues with closing polygon in leaflet draw

* use canvas renderer

* use leaflet-responsive-popup to avoid tooltip cutoff

* remove radius configuration from leaflet heatmap

* make blur a factor of radius. Set maxZoom to map zoom since new values are calculated per precision

* use _.get to avoid error, cannot read property of undefined

* add cluster size slider

* experiments with image differences

* onload not onLoad

* use canvas dimensions

* compare map canvas to stored PNG of map canvas

* remove pixelmatch from project dependecies

* fix broken test - rounding error

* add expected image tests for geohash layers shaded circles and geohash grids

* bump z-index of vis-spy

* update functional test expected data

* update to leaflet 1.2.0

* revert to leaflet 1.0.3 and update expected data set for map functional tests

* test geohash_layer heatmap in unit test

* update region_map functional test since it can not longer pluck map vectors from DOM

* update documentation
2017-08-24 11:47:39 -06:00
Nathan Reese
37a63e5462 Replace "marked" with "markdown-it" (#13623) (#13667)
* add markdown functional test

* update markdown vis to use markdown-it

* migrate markdown angular filter to markdown-it

* place other uses of marked and remove dependency

* update breaking changes documenation and set linkify to true
2017-08-24 07:45:59 -06:00
Chris Roberson
4885ca1743 "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:58 -04:00
CJ Cenizal
7ed4365c2c [Accessibility] Make table pagination controls keyboard-accessible. (#13541) (#13601)
* Make table pagination controls keyboard-accessible. Update KuiLink so it can be used on a button element.
* Add additional properties to link mixin to make kuiLink look the same for both buttons and anchor tags.
* Fix tests.
2017-08-18 17:15:12 -07:00
spalger
e7fb4cabbe remove spammy console.log()
(cherry picked from commit 8cd269678a)
2017-08-16 19:33:24 -07:00
Spencer
3a876eae54 [npm] move personal forks into elastic org (#13410)
(cherry picked from commit 7e16d19249)
2017-08-09 12:39:42 -07:00
Spencer
252024df52 [fix/UiSettings] ignore certain errors (#13079)
* [SavedObjectClient] emit detectable errors

* [uiSettingsService] consume new SavedObjectsClient errors

* [SavedObjectsClient] expose errorTypeHelpers as such

* [elasticsearch/tests] recreate error for each test

* [http] wait for elasticsearch plugin to be ready

* [shortUrl/tests] ensure that create request responds with 200

* [shortUrl] use errorTypeHelpers to filter errors

* [uiSettings/savedObjectsClientStub] stub errorTypeHelpers

* [SavedObjectsClient/errors] expose error module so tests can make errors

* [shortUrl/tests] use actual SavedObjectsClient errors

* [uiSettings/savedObjectsClientStub] use actual errors lib

* [SavedObjectsClient] use decorate instead of "wrap"

* [server/routes/uiSettings] refactor routes to forward Boom errors from uiSettings

* [uiSettings] colocate routes and service

* [testUtils/esTestCluster] use more standard api style

* [testUtils/es] add createCallCluster util

* [testUtils/esTestCluster] add getters for client/callCluster

* [es/healthcheck] ensure that healtcheck stops when server is stopped

* [uiSettings/routes] add param/payload validation

* [uiSettings/routes] add tests that verify error behaviors

(cherry picked from commit 8a64872ecb)
2017-08-08 17:57:07 -07:00
Matt Bargar
1ee023afa8 Make filter pills keyboard accessible (#13331) (#13392)
Fixes #12639

It's now possible to tab to each filter's actions and interact with them via the keyboard.

In order to get the actions to show/hide on both mouse hover and action focus I had to create a new filter-pill component that could manage a bit of state to track whether the user was interacting with a given pill or not.
2017-08-08 17:03:36 -04:00
Stacey Gammon
abf9def02d Create the concept of embeddableHandlers (#12146) (#13386)
* Move dashboard panel rendering logic to each registered type.

* Remove dashboard knowledge of click and brush handlers for visualizations

Move it to the VisualizeEmbeddableHandler.

* merge master with manual changes

* No need to use lodash

* Add EmbeddableHandler base class

* Use correct path to embeddable_handlers_registry

* clean up

* Set visualize scope uiState that is of type PersistedState, otherwise it won't actually be set.

* add retry to loading saved search data

* Fix handleError param and remove unnecessary private param

* Rename savePanelState updatePanel and return the new object rather than mutating the original

* Make ContainerAPI a base class and move the dashboard specific functionality into a new class

* Make api's async and clean up documentation

* Fix panel tests

* Fix bug which broke tests - need to pass container-api to dashboard-panel

* Address code comments

- Rename onFilter to addFilter
- Use angular promises instead of async/await
- fix jsdoc
- rename createChildUiState to getInitialState

* changed the wrong variable name

* no need for async or Promise.reject on interface

* add tests that will fail due to spy pane issue in this PR

* Fix logic with spy pane toggle

There is still a bit of a bug here as mentioned in
https://github.com/elastic/kibana/issues/13340 but it will be fixed
separately as it’s also an issue in master

* Fix failing test
2017-08-08 13:27:12 -04:00
Stacey Gammon
f9894e9a3b Use find service instead of remote (#13296) (#13387)
* Use find service instead of remote which doesn't have built in safety checks for stale elements

* use data-test-subj instead of id

* add missing function and awaits

* Did not realize WebElements could find descendants

Added some extra functionality for this in find and testSubjects
service, and using in the one place it’s required.
2017-08-08 13:26:54 -04:00
Stacey Gammon
84a34e333c Fix full screen toggle button when panel is expanded (#13320) (#13362)
* Add failing tests

* Fix style issues with full screen toggle
2017-08-07 13:50:06 -04:00
Spencer
679d8ad738 Add some testSubject helpers (#13305)
* [testSubjects] add getVisibleTextAll() helper

* [testSubjects] add isSelected() and isSelectedAll() helpers

* [testSubjects/setValue] support wrappers around inputs

* [testSubjects] add isEnabled() helper

* fix typo

(cherry picked from commit 8ee85f8fed)
2017-08-04 18:49:44 -07:00
Lukas Olson
8eff313d6a Use ui-select for agg selector (#13292)
* Use ui-select for agg selector

* Fix functional tests

* Fix functional tests

* Fix test

* Fix visualize page object

* Use sortPrefixFirst in agg selector

* Fix unit tests

* Fix unit test

* Use not(.ng-hide) rather than last-child
2017-08-03 15:26:48 -07:00
Stacey Gammon
7e5d2c4842 Make sure no one can show the chrome if the default setting is hidden. (#13250) (#13317)
* Make sure no one can show the chrome if the default setting is hidden.

add tests

Fixes https://github.com/elastic/kibana/issues/13040

* Improve variable and function names and fix tests
2017-08-03 13:10:24 -04:00
Nathan Reese
2fb7973ea5 update spy table headers when columns update (#13130) (#13224)
* update paginated table headers with columns update

* remove unneeded sleep

* update getDataTableHeaders to preffered format

* use data-test-subj attribute for functional tests instead of CSS selectors
2017-08-01 20:34:25 -06:00
Matt Bargar
2521f83285 Add some functional tests for query language switching (#13036) (#13256)
* Add some functional tests for query language switching
2017-08-01 13:47:04 -04:00
Felix Stürmer
4182eba6d9 [6.x] Use version 0.9.0 of eslint-config-kibana (#13183)
Backports PR #13177
2017-08-01 12:00:44 +02:00
Spencer
48bfe7f1a9 Implement esTestCluster test util (#13099)
* [es/tests] remove unused module

* [testUtil/es] add utility for starting es nodes in tests

* [ftr/tests] use esTestCluster util to start es

* [es/tests/routes] use esTestCluster to start own es

* [testUtils/kbnServer] disable uiSettings unless plugins are enabled

* [testUtils/esTestCluster] use standard test es port by default

* [server/http/tests] add esTestCluster to setup

* [test/config] unify es test config into a single module

* [testUtils/esTestCluster] directory is no longer configurable

* [testUtils/esTestCluster] throw when es.start() is called again without es.stop()

* [testUtils/esTestCluster] is* checks should not mutate state

(cherry picked from commit 6748b22d03)
2017-07-28 12:37:10 -07:00
Chris Roberson
b8edbc26ee Ensure conflicted fields can be searchable and/or aggregatable (#13070)
* Ensure that conflict fields can be searchable and/or aggregatable in the UI

* Use `some` instead of `reduce`

* Revert UI changes

* Attempt to convert multiple ES types to kibana types, and if they all resolve to the same kibana type, there is no conflict

* Add comma back

* Cleaner code

* Add tests

* Update failing test to handle searchable and aggregatable properly

* Add functional test to ensure similar ES types are properly merged

* Update tests

* Revert shard size
2017-07-28 10:46:35 -04:00
Stacey Gammon
67de869c15 Stabilize and bring back flaky tests (#13034) (#13159)
* Stabalize tests and bring back flaky test

* Try to fix flaky map radius visualize test

* fix flaky tile map zoom test

* Try to fix flaky zoom test by avoiding zooming in and out with spy panel open

* Remove duplicate wrapped retry around find methods

The retry was moved internally, around a check for stale elements as
well, so this should no longer be neccessary.
2017-07-28 08:57:02 -04:00
Stacey Gammon
43b66cea3c ensure timezone attribute in tests is adhered to (#13121) (#13126)
* ensure timezone attribute is adhered to

Two issues - one the archiver was loading the visualize mapping after
the config setting so it was bring overwritten, and two,
uiSettings.replace wasn’t working correctly to begin with.

* extra line to ensure server is stabilized to prevent transitory failures
2017-07-26 13:22:30 -04:00
Stacey Gammon
9b54028749 skip flaky discover test (#13114) (#13117)
Caused last 4 builds to fail on master.

Will attempt to bring back in
https://github.com/elastic/kibana/pull/13034
2017-07-26 10:21:46 -04:00
Stacey Gammon
9f62ee555e remove inline awaits (#13043) (#13104)
* remove inline awaits

* testSubjects.find now always returns a promise, so we need to make sure there is no more inlining

* more find conversions

* need to pass property name

* Make sure async functions are awaited on.
2017-07-26 07:54:12 -04:00
Nathan Reese
e3ea7f2550 TEST - Fix flaky map functional test (#13039)
* add time to toggleSpyTable to give time for tab to open and map to adjust

* make open and close spy panel functions that retry until panel is in correct state
2017-07-21 16:05:54 -06:00
Chris Earle
4fc2a96324 [Test] Field List Pagination doesn't need so many constants (#13028)
Some of these can be inferred by the others, which makes the test a little
more flexible in the face of changing data.
2017-07-21 14:29:00 -04:00
Matt Bargar
d379e9a35b Implement new Kibana query language (#12624)
Initial version of an experimental new query language for Kibana.
2017-07-21 11:55:15 -04:00
Nathan Reese
72f6b8a37f Filter geohash_grid aggregation to map view box with collar (#12806)
* filter geo hash agg - merged with vis refactor

* get collar size from geohash aggregation

* fix getBounds

* add test for _buckets to handle single bucket case

* use _getGeoHashAgg to update precision

* call reload when map bounds outside of map collar

* update fit control to use geo_bounds aggregation metric

* remove geo_hash param collarScale

* fix precision parameter test

* refactor _geo_hash.js test for readability

* do not trim map bounds

* only change aggregation state when data needs to be refected because zoom changed or map bounds are outside of collar

* remove extra geo_utils.js file from tile_map plugin

* only filter geoJson layer on client when results are not filtered on server

* set up layer options before creating geoJson layer

* add updateExtent back

* add getUntrimmedBounds, clean up filter option verbage, remove scale param from scaleBounds function

* move check for server-side filtering for updateExtent into geohash_layer

* move fetchBounds to geohash_layer

* fix _tile_map functional test, response data is different because of added filter aggregation
2017-07-21 07:35:46 -06:00
Chris Earle
92acce2798 [Tests] Adjust makelog mappings and associated tests (#13014)
This updates the function tests by:

Changing logstash_functional's _type from docs (changed in #13001) to doc.
Adding the original _type (apache or nginx) as a new field named type to logstash_functional's documents.
Updated the mappings to include the expected type field.
Did the same for makelogs by removing _default_ and other _types in favor of doc and the new type field.
Dropped the single_type setting from makelogs.
Updated associated tests that were looking for _type values of apache and nginx.
2017-07-20 18:57:56 -04:00
Nathan Reese
7c7f5716c8 update logstash data for single type (#13001) 2017-07-20 09:17:05 -06:00
Tyler Smalley
3c0c0ff441 Use single ES document type (#12794)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-07-19 09:27:16 -07:00
Stacey Gammon
31b33659ca Fix search issue on listing page + tests (#12618)
* Fix search issue on listing page + tests

* fix test case inconsistency

* use backtics to create the search string
2017-07-14 12:27:06 -07:00
Spencer
10656c2108 [ftr/kbnServer] prevent caching errors when fetching status (#12848) 2017-07-13 17:02:28 -07:00
Court Ewing
60c636ba4d Remove field_stats pre-flight option for index patterns (#12814)
* Remove field_stats pre-flight option for index patterns

This feature was originally added to make searches against Elasticsearch
more performant when searching across many indices, such as when dealing
with daily indices that have accumulated for years. Elasticsearch now
automatically optimizes index access once a certain amount of shards are
in play, so Kibana doesn't need to hack its own solution.

This option can be removed entirely as existing index patterns that had
this option configured will degrade gracefully.

* test: fix parse error test to account for multiple shards
2017-07-12 20:14:26 -04:00
Spencer
10d243de15 [master] [elasticsearch] patch mappings that are missing types (#12783) (#12817)
* [elasticsearch] patch mappings that are missing types

* [elasticsearch/healthCheck] fix tests

* fix doc typo

* [tests/functional/dashboard] fix suite name

* [es/healthCheck/ensureTypesExist] limit randomness a bit

* [test/functional] update es archives with complete mappings

(cherry picked from commit 929aa8efae)
2017-07-12 17:11:26 -07:00
Tyler Smalley
0d502aec49 Use SavedObjectsClient for Courier Index Pattern (#12719)
* Index pattern is created, by default, with a random ID by Elasticsearch
* Updated all references requiring the pattern itself to use indexPattern.title
* Advanced options toggle added to index pattern creation page to provide a specified ID
* If an index pattern does not exist, the user is given a link to create a pattern with the referenced ID.
2017-07-11 13:18:26 -07:00
Tyler Smalley
44dedd6091 Uses SavedObjectsClient for UI Settings (#12747) 2017-07-11 12:33:58 -07:00
Thomas Neirynck
b86f97ce0f Visualize refactor (#12715)
This reorganizes the internals of Visualize. The main contributions are:
- separation of Editor from Visualization. This allows users to create editors separate from their Visualization. Both Timelion and TSVB are examples of visualizations not using the sidebar editor
- no longer restricted to just use angular as a rendering technology
- introduction of API object, which avoids the need to pull in modules directly, like time-filter or filter-bar
2017-07-09 09:51:29 -04:00
Thomas Neirynck
c20a48cbc9 Revert "Visualize Refactor (#11786)" (#12711)
This reverts commit 3000221fac.

This change broke Xpack, due to some modules being moved to a different location.
2017-07-07 16:32:18 -04:00
Peter Pisljar
3000221fac Visualize Refactor (#11786)
* converting Vis to es6 class

* <visualize>, <visualization> and <visualization-editor>

* editor, responseHandler and requestHandler registries

* updating visualize editor app

* vis, default editor, request handlers and vis types

* updating vis types

* updating kibana to work with new visualize

* migrating existing visualizations

* fixing bugs with rebase

fixing tests

fixing tsvb auto apply button

fix tsvb resizing issue

update scope.$apply for react editor components

re-render react component when vis.params are updated (#12347)

fixing heatmap

remove obsolete maps_renderbot indirection

remove cruft/ remove custom resizing and hook into global event

fixing brush event

fixing resize event for vislib_vis_type

fixing legend

changing based on nathans review

* fixing tests

* fixing renderComplete issues with editor

* map updates

* fixing maps zoom

* fixing based on nathans review

* fixing render complete issue and doulbe rendering with maps

* trying to get maps in order .... wip

* removing resize method from visualizations

* changing the rendering process a bit

* fixing metric chart type auto changing

* minor simplifications in coordinate map viz

* more simplications now we only have single render

* minor fixes

* do not recreate layer when not necessary

* minor changes

* fixing maps bounding box filter

* fixing desaturation option

* fix zoom settings when toggling between WMS/basemap

* adding status to the render method (to figure out what changed)

* fixing legend open icon going out of page

* skip index selection for timelion

* timelion brush fix

* fixing circular json issue

* fix faulty rebase

* fixing updateStatus

* removing timelion requesthandler registration

* removing double slash

* fixing maps

* add debug statement

* test CI with guard statement

* fixing rebase
2017-07-07 17:10:32 +02:00
Stacey Gammon
b463aebfb6 show the spy toggle in an expanded panel on hover (#12550)
* show the spy toggle in an expanded panel on hover

the css was wrong because the expanded panel is no longer inside
gridster.  Added tests that would have caught this.

* rename toggleSpyPane to toggleSpyPanel
2017-06-30 13:38:00 -04:00
Spencer
aa729af3a1 [ftr/dashboard+scripting] disable unstable tests (#12592) 2017-06-30 00:03:18 -07:00
Peter Pisljar
3269965dfb removing old point series defaults (#11958)
This fixes issues where properties from the visualizations saved in older versions were not applied to the Visualization.

This also addressed the fontSize of metrics not being applied on the Dashboard.
2017-06-21 16:08:08 -04:00
Spencer
ba199bdca2 [5.5] [api/indexPatterns/fields] convert all es errors to Boom errors (#12435)
(cherry picked from commit 6d605ec30a)
2017-06-20 18:37:12 -07:00
Nathan Reese
1423d068f8 Scaled date format for date histogram aggregation (#12384)
* provide getFormat function to date_histogram

* move format object creation to time_buckets

* fix broken test

* pass getConfig to field format constructor since field formatters no longer manage config themselves

* fix _agg_config testing of agg without getFormat method. Old test used date_histogram which now has getFormat, so needed a new agg type

* update expect values for area chart data

* fix expect for visualize app vertical bar

* fix expect for visualize app heatmap chart
2017-06-19 18:48:36 -06:00
spalger
445c47e248 [ftr/leadfoot] fix function signature 2017-06-19 12:51:19 -07:00
spalger
a736754f14 [ftr/leadfoot] retry session creation before timeout 2017-06-19 12:49:00 -07:00
spalger
a84f75ca11 [ftr/chromedriver] replace comments with debug logs 2017-06-14 14:56:21 -07:00
Spencer
1119414b49 [indexPatterns] remove support for time patterns (#12158)
* [indexPatterns] remove support for time patterns

* Revert "[indexPatterns] remove support for time patterns"

This reverts commit 4263e37c66.

* [indexPatterns] remove ability to create time-based patterns

* [indexPattern/routes] fix export of routes for stub

* [Storage] export Storage class for testing

* [indexPatterns/unsupportedTimePatterns] add tests

* [indexPatterns] focus warning check module

* [indexPatterns/tests] fix method name

* add metion of this change to migration docs

* disable warnings by default until we have a migration tool

* prevent the warning from disapearing

* fix grammar

* enabled warnings in the tests
2017-06-13 17:22:41 -07:00
dave.snider@gmail.com
dedef146ec Palette swap for accessibility / kibana 6 (#12085)
Recolor Kibana for Accessibility. Attempt to clean up spacing / layout irregularities by adding some level of global variable control. Major changes are:

* better animation against login
* switch to colored kibana logo
* add docs for secondary buttons in kui, addjust hover states
* simplify focus states
* adjust svg rects for discover graph to be lighter
* add ui select overwrite file, adjust new filter selector to match palette changes
* make spy usable in discovery
* panel withHeader removed completely, tests updated
2017-06-13 14:05:59 -07:00
Thomas Neirynck
781a7b56b5 Revert "disable save button if visualization is dirty (#11576)" (#12152)
This reverts commit efc621826b.
2017-06-12 15:55:06 -04:00
Spencer
fe1ca5d399 force timeout, logs indicate that pings are getting stuck (#12251)
* force timeout, logs indicate that pings are getting stuck

(cherry picked from commit ff6a71819be272253d969a0be681dc9749a0f00d)

* actually reject the promise
2017-06-12 12:45:06 -07:00
Joe Fleming
c400d604dd remove intern setup (#12201)
#10937 seems to have brought this file back, likely as part of a bad merge resolution
2017-06-06 13:30:26 -07:00
Stacey Gammon
718fdc066a Preserve the saved vis url when using the add new vis link from dashboard (#11932)
* Preserve the saved vis url when using the add new vis link from dashboard

Fixes https://github.com/elastic/kibana/issues/11078

* Store the edit url in browser history as well

* Fix tests by reordering them.

* add a more explanatory comment
2017-06-06 14:52:17 -04:00
Shaunak Kashyap
27745f72a3 Revert the Getting Started page (#12154)
* Revert "When on an embedded page, bypass Getting Started gate check (#12040)"

This reverts commit 05293f1c8d.

* Revert "Making tweaks. (#12003)"

This reverts commit aa3fa06f61.

* Revert "Functional tests for the Getting Started page (#11850)"

This reverts commit 099178a7ca.

* Revert "Prevent flicker on Getting Started page (#11826)"

This reverts commit c4b3ade27d.

* Revert "Getting Started page (#11805)"

This reverts commit 32eff371f2.

* Remove check for Getting Started page from navigateToApp
2017-06-05 14:18:30 -07:00