Commit graph

2526 commits

Author SHA1 Message Date
Spencer
f0cc432faf
Apache 2.0 license headers (#19383)
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.

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

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

* decorate server with methods needed to register data sets

* implement list endpoint, add flights sample data set

* stream data file

* create sample data index with mappings

* bulk insert into elsaticsearch

* more loadBulk work

* advance time stamp

* change http method back to post

* delete index on uninstall

* last 15 minutes example

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

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

* update uiSetting defaultIndex on install and uninstall

* use correct format for saved object json

* Adding example sample data, mappings and dashboards

* add sample data tab to Add Data page

* add launch button

* add sample data link to empy index pattern create state

* fix jest tests

* add toast nofication on success and fail install/uninstall

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

* put link to sample data sets on home page

* updated saved objects and data set

* add card for sample data

* add preview image

* updated dashboards and data set

* update button text

* woops, forgot vega

* compress data json file

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

* add functional tests

* updates from chrisdavies review

* fix install API call - broken on last commit

* fix mistake in create_index_pattern

* updates from Stacey-Gammon review

* remove delete from install API

* add more tests to ensure dashboard renders as expected

* better error message on install and uninstall failure

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

* update scripted field to reflect changes in ES

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

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

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

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

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

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

* Need to register it as being used in kibana

* Some cleanup

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

* Use newer panelActions service

* add missing await

* More clean up and fixes

* bring back window reload

* Show actions in view mode too

* delete now unused files

* Use toggle action to determin if context menu is open

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

* Add some debug logs

* Fix up assumptions

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

* Embeddable can be empty before the panel is loaded

* Should look for either visualize or discover page

* Address code comments

* address code review comments

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

* implement add functionallity

* style flyout so top nav is not covered

* add noItemsMessage

* add new visualization button

* remove angular add_panel template

* seperate search bar and table into its own component

* fix functional tests

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

* remove deprecated method componentWillMount

* add jest test for DashboardAddPanel

* fix paging and replace EuiSearcBar with EuiFieldSearch

* fix functional tests

* fix dashboard filter bar functional test

* another functional test fix

* add more context to functional test failure message

* give search input a default value

* remove call to waitForRenderComplete to see if tests will pass

* fix dashboard filtering test

* updates from Stacey-Gammon review

* support filtering out lab visualizations

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

* add sorting by title to SavedObjectFinder componenet

* move add panel tabs to state

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

* remove xpack stuff from oss archive

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

* Update expected recent stats

* url was pointing to a visualization not a csv

* Move comment around

* Merging with changes on master renaming stats to usage

* fix reference to old stats file.

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

* reset duplicate state when input is updated

* update functional test for new clone workflow

* change warning message to EuiCallout

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

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

* Support --dev option for servers only

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

This reverts commit d11b5aae9a.

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

This reverts commit c6112067fc.

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

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

* More proto code

* Work in progress

* Just go back to non interactive searching, much easier

* This should be on the server

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

This reverts commit ef3339bd7a.

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

This reverts commit ce9ce14e1060c426090b55a5367de3ff4329e681.

* Use BasicTable properly

* Table improvements

* Small tweaks to the table

* Improvements

* Flyout mostly working

* Remove in memory table

* Getting close

* Tweaks

* Revamping server code, still need to support editing

* Progress

* Fix export

* Updates and passing functional tests

* Better links in relationships flyout

* Add skip import option

* Fixes around importing and removing unnecessary code

* Remove tags for now

* Tests for lib/

* Some fixes

* Ensure we clear index pattern cache

* Parity with master

* Revert any changes in package.json

* Reset any changes in this file

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

* Fix functional tests

* Add relationship tests

* Fix tests

* API integration tests for relationships

* Ensure we're properly waiting for things to happen

* Fix test issue

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

* Tests for objects_table

* Componentry tests

* Ensure this is grabbing the right field

* Update snapshot

* Fixes with importing index patterns

* PR feedback

* PR feedback

* PR feedback

* Update snapshot

* PR feedback

* Update snapshot

* Respect the savedObjects:perPage config

* Updates from PR feedback

* More updates from PR feedback

* Make this more efficient

* Add debugging for functional test failures

* Wait longer

* Wrap each button accessor with a retry.try

* Try wrapping this in a retry.try

* Debug

* Lets make sure it is visible

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

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

* [ci] force colored output

* [ci] disable color when reading the yarn bin

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

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

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

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

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

* [dev/mocha] cleanup old runInBand check

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

* add comment with link to issue

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

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

* update remaining references to dashboard.getQuery

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

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

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

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

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

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

* remove constructor for ListControl component

* get working with portal version

* remove overflow visible from input_control_vis since its no longer needed

* convert index pattern select to EuiComboBox

* replace react-select with EuiComboBox for field select

* group fields by type

* remove esvm

* remove on-foxus box around input cursor

* fix jest tests

* remove broken jest test

* fix functional tests

* review changes

* remove componentWillMount from field_select

* update snapshot changed from rebasing and getting new EUI version

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

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

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

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

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

* [ui/loadingIndicator] remove rxjs, fix tests

* [ui/loadingIndicator] improve docs

* [ui/loadingIndicator] remove needless unmounts

* [ui/loadingCount] correct typo

* [functionalTests/headerPage] awaitGlobalLoadingIndicatorHidden

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

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

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

* discover doesn't have breadcrumbs

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

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

* Need both types of input in filter

* Give test data a title

* Remove incorrect and unnecessary comment

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

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

* uptime_ms in the process namespace

* make uptime_in_millis always equal process.uptime_ms

* fix api integration test

* fix api integration test better

* fix false positive with last change

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

* keep eui dependency in x-pack

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

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

* filter field list instead of chaning table size

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

* add jest test for DashboardListing component

* add data-test-subj attributes

* clean up jest test

* hideWriteControls and call to action when no dashboards exist

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

* fix dashboard queries functional tests

* upgraded to EUI 0.0.29 to get defaultFocusedButton fix

* move dashboardListing directive to index

* spacing in if statement

* switch to EuiBasicTable

* pagination

* add sorting

* fix jest test

* handle out of order fetchs

* remove info.gif

* re-instate search functional test

* replace EuiSearchBar with EuiFieldSearch

* fix functional tests

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

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

* Revert a previous change to test char substitution

* Allow setting TEST_KIBANA_URL and TEST_ES_URL for Cloud testing

* cleanup comment

* Update docs

* Refactor after PR review

* Changes from review

* fix default Kibana port to 5620

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

* fix flaky legend colors

* Address code review comments

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

* Fix a bug and adds tests that would have failed

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

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

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

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

* Update README.md

* Fix jest tests

* Add two failing tests to catch current bugs

* Fix max call size exceeded err

* fix time range bug

* Add failing test for filter field index pattern bug

* Fix bug with index patterns

* Expand on definition of an embeddable

* Address code review comments

* address some code comments

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

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

This reverts commit 43bf1dbf4a.

* replacing math with tinymath

* pining version

* updating yarn.lock

* Fixing Prettier mis formatting

* fixing tests

* Adding unsupported agg back

* Adding functional test for math aggregation

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

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

* remove flaky assertion

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

* sugar on imports/exports

* fix lint/jest test

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

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

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

* run 20x

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

* typos

* explain kbn_server_worker a bit with better naming and comment

* Address review feedback
2018-03-30 09:35:26 -07:00