Commit graph

16086 commits

Author SHA1 Message Date
Thomas Neirynck 0175cac4f0 use tabify for regionmap (#14364) 2017-10-10 11:15:49 -04:00
Spencer bd53cc6370 Eslint/remove last amd modules (#14282)
* [timelion] remove last remaining amd modules

* [eslint-config-kibana] remove env.amd
2017-10-10 16:10:56 +02:00
Kim Joar Bekkelund 6a2bb74407 Use Object spread instead of Object.assign where it makes sense (#13903)
* Prefer Object spread

* Add eslint rules for Object spread

* no slice
2017-10-10 14:50:56 +02:00
Lukas Olson 61c76a2b5b Handle strings in source mapped as numbers (#14318) 2017-10-09 15:54:09 -07:00
Matt Bargar 6d4fd7ec9f Allow context to work with docs with forward slashes in their ID (#14314)
Apparently even if the forward slashes are encoded in the href on the page the browser will automatically decode them. This prevented the context route from matching the URL when the anchor ID contained forward slashes. Since no route matched, the default route (discover) would get loaded. To fix this, we simply add a wildcard to the end of the context route so it consumes the forward slashes.
2017-10-09 18:00:42 -04:00
Matt Bargar 20c45e70d3 Loosen check for dashboard queries in filters array (#14338)
This is just forward porting a change that was made in a 5.x PR. At the time I don't think we realized we'd still need this specific change in 6.0+. We took a different approach to solving the same issue in 6.0, but we still need to loosen this condition for dashboards that were created in 5.5 or 5.6 and have a match_all query instead of a query_string.
2017-10-09 17:57:06 -04:00
Nathan Reese 6b441c6b7c add tickDecimals option to yaxis (#14371) 2017-10-09 08:03:58 -06:00
Nathan Reese ca34494bd4 make pie chart stroke match dark-theme background (#14375) 2017-10-09 08:03:19 -06:00
Peter Pisljar 5e2bee7c14 Add API to embed visualizations (#14292) 2017-10-08 08:02:01 +02:00
Chris Roberson 0fe4916a88 Fix FF quirk with max width (#14352) 2017-10-06 15:08:43 -04:00
Tim Sullivan 57c25307b5 [FTR] Add getAttribute helpers to TestSubjects (#14340) 2017-10-06 09:28:46 -07:00
Peter Pisljar 8cde5ef98e refactor tagcloud to use tabify responseHandler (#14266)
* refactor tagcloud to use tabify responseHandler

* fixing issue with formatted word tag positioning
2017-10-06 17:02:24 +02:00
Chris Roberson a92d78c429 [Management] Index pattern creation wizard enhancements (#13960)
* Ensure we allow wildcards, https://github.com/elastic/kibana/issues/13956

* - Only search a single cluster by default (#13689)
- Ensure consistent counts by searching for twice as many as we show in the UI, this should avoid count issues due to system indices filtering (#13735)

* PR feedback

* Just return it

* Add representative sample copy

* PR feedback
2017-10-06 10:04:59 -04:00
Tim Roes 8639573562 Improve Management section accessibility (#14243)
* Mark tabs in management as such

* Add regions to the management section

* Add warning as description to the filter input

* Make aria-label match placeholder

* Rename filter to search in advanced settings
2017-10-06 11:19:20 +02:00
CJ Cenizal 8090af46c8 Update CONTRIBUTING.md with information on how to focus the browser tests on a particular suite when running test:dev. (#14317) 2017-10-05 18:17:05 -07:00
Spencer 6998f07454 [uiSettings] auto create/upgrade saved config (#14164)
* [uiSettings] auto upgrade savedConfig doc when missing

* naming tweaks

* fix comments

* ensure that rcVersions are not found within a version

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

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

* assert that getUpgradeableConfig() is always called once

* [uiSettingsService] remove excess space

* [savedObjectsClient] only attempt to createOrUpgradeSavedConfig once

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

* [functional/console] correct test title

* [ftr/kibanaServer/uiSettings] fix disableToastAutohide timeout
2017-10-05 15:34:09 -07:00
dave.snider@gmail.com 330665b706 [DESIGN]: Remove truncate from viz form text, remove additional wrapper (#14311)
* remove truncate from viz form text, remove additional wrapper

* fix section paneling within viz

* remove redundant titling
2017-10-05 10:32:56 -07:00
Nathan Reese 7723520b89 call setBounds when timeRange is changed (#14300) 2017-10-05 11:02:37 -06:00
CJ Cenizal 8187ade842 Fix Timelion suggestions broken by upgrading to Angular 1.6.5 (#14316)
* Fix incorrect ng-repeat syntax which was preventing Timelion suggestions from showing up.
* Add test.
2017-10-05 08:19:25 -07:00
Bill McConaghy 31775f8041 allow React content in confirm modal (#14297) 2017-10-05 10:47:54 -04:00
Jonathan Budzenski 2c430de115 [console] Revert removal of inferring request method (#14032)
* Revert "[console] Don't infer request method (#13694)"

This reverts commit 38b13c7a67.

* [console] Make request method check case insensitive

* Revert "[console] Make request method check case insensitive"

This reverts commit c749f8d496.
2017-10-05 09:41:26 -05:00
Chris Roberson 4c1d029c79 [Management] Allows for imports to select existing index (#14137)
* Adds ability to change index pattern on import

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

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

* PR feedback

* PR feedback

* PR updates

* Handle skip properly

* Fix error when there were no existing index patterns

* Tests for the new import conflict logic

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

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

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

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

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

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

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

* limit wait time for baselayer (#14047)

* adding scope appy back (#14269)

* remove junk tests (#14191)

* We are using the index pattern id now

* Use the index pattern id here too

* Use an isolated es env for these tests

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

This reverts commit e09d7ad1f9.

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

This reverts commit 3aee7c2bf0.

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

This reverts commit 44a71071ac.

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

This reverts commit 51b6b51aac.

* Revert "remove junk tests (#14191)"

This reverts commit f06c18332b.

* Revert these
2017-10-04 20:42:07 -04:00
archana 1fb8c82da7 [Optimize] Fix bundlesPath by resolving optimize dir (#14309)
* [Optimize] Fix bundlesPath by prefixing optimize.bundleDir with slash

* [Optimize] Fix bundlesPath by resolving optimize dir

* [Optimize] Fix bundlesPath by resolving optimize dir
2017-10-04 13:33:41 -07:00
Matt Apperson c7b095d9da [TSVB] Display messaging to indicate no data vs empty charts (#14299)
* Visualization shows no data message vs empty charts
* added no data messaging to markdown variables
* Parse errors from handlebars and display clean errors to users
2017-10-04 14:00:37 -04:00
Spencer 2b7808b9ea [errors/multi.allow_explicit_index] move error handling to browser (#14184)
* [errors/multi.allow_explicit_index] move error handling to browser

A part of #14163, this removes the portion of the healthCheck that tries to verify that rest.action.multi.allow_explicit_index is not set to false. Instead, a ui module was created that will check errors from elasticsearch for this specific scenario, and exposes a method that will display a nicer "fatal error" screen that informs the user about what they should do, and navigates away from the now broken app.

* [es/healthCheck] remove old test

* fix typo
2017-10-04 09:46:19 -07:00
Bill McConaghy a5d42cb18b fixing undefined fn error in Promise.halt (#14296) 2017-10-04 12:14:14 -04:00
Thomas Neirynck 3f9dc938f8 remove junk tests (#14191) 2017-10-04 09:41:52 -04:00
Peter Pisljar 123bca26fb adding scope appy back (#14269) 2017-10-04 07:32:14 +02:00
Thomas Neirynck 5e713df81e limit wait time for baselayer (#14047) 2017-10-03 22:33:21 -04:00
Matt Bargar 959eabc9c0 Show query and filter bars even when there's a linked search (#14212)
The query bar used to be hidden in the presence of a linked search because unlike filters, queries didn't get merged when flattening a SearchSource hierarchy. That means a query in the query bar would override the query in the linked search. This is no longer the case. As of 6.0 we include all queries in the SearchSource hierarchy in the final request, so there's no longer any reason to hide the query bar.

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

Previously when unlinking a saved search visualize would insert the query and filters from the saved search into app state before removing the SearchSource from the hierarcy. This posed a problem because combining two lucene query strings isn't as easy as combing two sets of filters. We decided this behavior was a bit counterintuitive anyway. If the user wants to unlink the saved search, they probably want to discard it, not combine it with their local changes. So I've also updated the unlinking functionality to discard the saved search.
2017-10-03 16:33:32 -04:00
Matt Bargar 0fd82895d9 Fix invisible filters caused by missing index pattern (#14131)
"invisible filters" occur when the mapping chain throws an error. If a single filter throws an error, the entire chain rejects. As a result, not even the valid filters appear in the filter bar because they never get added to the scope. However the filters still exist in app state and still get sent with each search request.

The most common error occurs when the filter's meta.index property points to a non-existing index pattern. Since this property is only used for looking up field formatters and it is not essential for a working filter, we now fall back on raw values instead of failing if the index pattern is not found. See the PR this one replaces for discussion about other solutions we tried and why we chose to go this route.
2017-10-03 16:26:01 -04:00
Spencer cdf7f8990d [visualization_editor] tabify visData before render (#14068) 2017-10-03 07:55:12 -07:00
Nathan Reese d5ed14f460 apply field formatter to tag cloud (#14230)
* apply field formatter to tag cloud

* use unformatted value for filter creation
2017-10-03 07:58:49 -06:00
Kim Joar Bekkelund 5009435148 [index patterns] Don't attempt to wrap Boom errors (#14253) 2017-10-03 15:06:51 +02:00
Peter Pisljar 4816079ed7 adding documentation for visualization development (#14252)
* adding documentation for  visualization development
2017-10-03 13:07:28 +02:00
Spencer 1ea82fa869 [optimize] inject publicPath at request time (#14007)
* [optimize] inject publicPath at request time

* [optimize/getFileHash] finish doc block

* [optimize/bundlesRoute] correct return value doc type

* [optimize/bundleRoute] use more descriptive name for file hash cache

* [optimize/dynamicAssetResponse] add more details to doc

* [utils/createReplaceStream] trim the buffer based on the length of toReplace, not replacement

* [utils/createReplaceStream] add inline docs

* [utils/createReplaceStream] write unit tests

* [optimize/bundleRoute] expect supports buffers

* [optimize/bundleRoute/basePublicPath/tests] add happy path

* [optimize/bundlesRoute/tests] verify content-type header

* [optimize/bundlesRoute] use '
2017-10-03 01:51:59 -07:00
Peter Pisljar 9be131e193 don't show spy panel with tsvb or timelion (#14090)
* don't show spy panel with tsvb or timelion

* adding shouldShowSpyPanel function
2017-10-03 08:54:20 +02:00
Peter Pisljar 183d42446e allows visualize to load saved vis (#14146)
* allows visualize to load saved vis

* allowing to set time range

* updating based on review from nreese
2017-10-03 07:08:14 +02:00
Spencer e84761217e [savedObjects] fix error handling when Kibana index is missing (#14141)
* [savedObjects/delete+bulk_get] add failing tests

* [savedObjects/delete+bulk_get] improve 404 handling

* [savedObjects/client] fix mocha tests

* [savedObjects/tests] remove extra test wrapper

* [apiIntegration/kbnServer] basically disable es healthcheck

* [savedObjects/create] add integration test

* [savedObjects/find] add failing integration tests

* [savedObjects/find] fix failing test

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

* [savedObjects/get] add integration tests

* [savedObjects/find] test request with unkown type

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

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

* [savedObjects/update] use generic 404

* fix typos

* [savedObjects/update] add integration tests

* remove debugging uncomment

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

* [savedObjects/tests/esArchives] remove logstash data

* [savedObjects] update test

* [uiSettings] remove detailed previously leaked from API

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

* [savedObjects/error] replace decorateNotFound with createGenericNotFound

* fix typo

* [savedObjectsClient/errors] fix decorateEsError() test

* [savedObjectsClient] fix typos

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

* [savedObjectsClient/tests] use sinon assertions

* [savedObjects/apiTests] create without index responds with 503 after #14202
2017-10-02 18:51:58 -07:00
Spencer 0a4a2a1219 [visConfig/tests] test with own element, cleanup after (#14215) 2017-10-02 14:41:07 -07:00
Peter Pisljar c7d147df89 fixes console error when selecting a pipeline aggregation (#14148) 2017-10-02 20:21:03 +02:00
Matt Bargar e0dce5ffbb Fix spatial filters when Kuery is in use (#14158)
In https://github.com/elastic/kibana/pull/13912/files#r137840240 I updated the filter_bar_click_handler to create Kuery filters directly instead of relying on $newFilters watchers in every app. I forgot tile_map manipulates $newFilters directly instead of using the filter_bar_click_handler. So if Kuery was selected as the query language and you attempted to create a spatial filter, nothing would happen. I've updated tile_map to use vis.API instead of modifying $newFilters. This fixed the Kuery issue, as well as a strange lag time I was seeing between mouse click and actual filter creation with the lucene filters.
2017-10-02 14:04:11 -04:00
CJ Cenizal 34250a81e8 Add snapshotComponent test service for Jest. (#14226)
* Reorganize jest directory and add a setup file which polyfills window.requestAnimationFrame.
* Add takeMountedSnapshot test service. Update KuiCodeEditor test to use it.
- Refactor tests to use a test subject selector to locate the hint element.
- Refine tests to leverage snapshots instead of DOM assertions.
* Update dashboard_panel test to use takeMountedSnapshot.
- Update snapshot.
- Update Jest config to make takeMountedSnapshot available to Kibana src.
2017-10-02 08:38:39 -07:00
Tim Roes ba7187225e [UI Framework] Improve accessibility issues in the UI framework (#14073)
* Use proper labels in bar example

* Make aria-label on icon buttons mandatory

* Add role=group to KuiButtonGroup

* Add roles to card component

* Fix alphabetical ordering in menu

* Add accessibility example for KuiCollapseButton

* Improve accessibility of Event examples

* Add note about labeling to Form docs

* Update broken snapshots

* Fix icon in HeaderBar example

* Add default aria-label to InfoButton if not specified

* Fix wrong HTML entities

* Fix icon names in Event example

* Add icon labels in InfoPanel example

* Improve accessibility of Micro and MenuButton examples

* Add labels to StatusText example

* Apply proper ARIA roles for tabs

* Make ToggleButton example accessible

* Fix icon names in events sandbox

* Also allow aria-labelledby for icon buttons

* Fix spelling of collapsible

* Make statement about labels more clear

* Use proper Link element for linking

* Use propTypes to check for icon only buttons

* Use defaultProps in KuiInfoButton
2017-10-02 15:58:46 +02:00
Stacey Gammon 895343dc6e Fixes #14201 by catching and displaying render errors (#14206)
* Fixes #14201 by catching and displaying render errors

* fix lint issues
2017-10-02 09:04:01 -04:00
Tim Roes bb3c9f3389 Rename KuiGalleryButton to KuiGalleryItem (#14118) 2017-10-02 11:26:35 +02:00
Peter Pisljar de7db5b2bd fixing ordering of series in legend (#14113)
* fixing ordering of series produced on filters

* updating based on review from Thomas

* adding support for range and iprange aggregations

* updating based on review from Thomas
2017-10-02 11:20:59 +02:00
Peter Pisljar 3721a43d64 removing check for vis type on saved visualizations (#14093)
* removing check for vis type on saved visualizations

* updating based on review
2017-10-02 11:17:54 +02:00
Peter Pisljar dce23e6896 pie chart design guidelines (#13661) 2017-10-02 11:15:14 +02:00
Spencer 07eca00f83 [savedObjects] wait for Kibana index on every write (#14202)
* [savedObjects] wait for Kibana index on every write

* [es/waitUntilReady] make test failure less likely by waiting for green

* [es/healthCheck] assert that plugin.status.once was called

* [savedObjectsClient] avoid importing noop

* [savedObjects] use milliseconds for indexCheckTimeout

* [savedObjectsClient/onBeforeWrite] don't 404 when kibana index has unassigned shards

* [savedObjectsClient/create] cast 404 caused by index missing to 503
2017-09-29 21:10:06 -07:00