Commit graph

16077 commits

Author SHA1 Message Date
Matt Bargar
9f51df962a Allow context to work with docs with forward slashes in their ID (#14314) (#14390)
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-10 12:43:48 -04:00
Matt Bargar
39253a27ed Loosen check for dashboard queries in filters array (#14338) (#14388)
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-10 12:43:13 -04:00
Spencer
9884ec8147 Eslint/remove last amd modules (#14282)
* [timelion] remove last remaining amd modules

* [eslint-config-kibana] remove env.amd

(cherry picked from commit bd53cc6370)
2017-10-10 16:11:32 +02: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
Peter Pisljar
4a18f3c985 Add API to embed visualizations (#14292) (#14372) 2017-10-10 10:07:40 +02:00
Lukas Olson
e3cf8f00ae Handle strings in source mapped as numbers (#14318) 2017-10-09 15:54:56 -07:00
Nathan Reese
91b683ecf2 [6.x] add tickDecimals option to yaxis (#14380)
* add tickDecimals option to yaxis (#14371)

* make pie chart stroke match dark-theme background (#14375)
2017-10-09 09:21:30 -06:00
Peter Pisljar
3dff87bc13 refactor tagcloud to use tabify responseHandler (#14266) (#14356)
* refactor tagcloud to use tabify responseHandler

* fixing issue with formatted word tag positioning
2017-10-08 07:55:25 +02:00
Chris Roberson
21dcf16049 Fix FF quirk with max width (#14352) 2017-10-06 15:09:26 -04:00
Tim Sullivan
c8a1e6c0ec [FTR] Add getAttribute helpers to TestSubjects (#14340) 2017-10-06 09:29:55 -07:00
Chris Roberson
2ce56089f7 [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:05:55 -04:00
Tim Roes
37b02f9f9c 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:20:50 +02:00
CJ Cenizal
78b4727c76 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:18:03 -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
Thomas Neirynck
9e830eb6ef [DESIGN]: Remove truncate from viz form text, remove additional wrapper (#14311) (#14336)
* remove truncate from viz form text, remove additional wrapper

* fix section paneling within viz

* remove redundant titling
2017-10-05 16:27:48 -04:00
Nathan Reese
22a80840d3 call setBounds when timeRange is changed (#14300) (#14335) 2017-10-05 12:06:48 -06:00
CJ Cenizal
0059a39ce3 Fix Timelion suggestions broken by upgrading to Angular 1.6.5 (#14316) (#14329)
* Fix incorrect ng-repeat syntax which was preventing Timelion suggestions from showing up.
* Add test.
2017-10-05 09:55:05 -07:00
Bill McConaghy
31576b2ffe allow React content in confirm modal (#14297) 2017-10-05 10:49:04 -04:00
Jonathan Budzenski
d51f7a5adf
[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:42:17 -05:00
Bill McConaghy
192c243dcd fixing undefined fn error in Promise.halt (#14296) 2017-10-05 10:41:28 -04:00
Chris Roberson
3487c55a1c [Management] Allows for imports to select existing index (#14137) (#14322) 2017-10-04 23:12:09 -07:00
archana
e6b6d222dd [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:37:16 -07:00
Thomas Neirynck
47df572c74 remove junk tests (#14191) (#14293) 2017-10-04 16:16:29 -04: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
Spencer
375d5b60fe [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

(cherry picked from commit 2b7808b9ea)
2017-10-04 09:46:43 -07:00
Peter Pisljar
2d0220cf2d adding scope appy back (#14269) (#14285) 2017-10-04 12:29:09 +02:00
Thomas Neirynck
eb3d1c8c66 limit wait time for baselayer (#14047) (#14283) 2017-10-03 23:32:27 -04:00
Matt Bargar
18d03259de Show query and filter bars even when there's a linked search (#14212) (#14276)
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 18:00:21 -04:00
Matt Bargar
48f14ef81a Fix invisible filters caused by missing index pattern (#14131) (#14274)
"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 17:58:55 -04: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
cc7e5a55cc [visualization_editor] tabify visData before render (#14068)
(cherry picked from commit cdf7f8990d)
2017-10-03 07:56:02 -07:00
Spencer
702514eba1 [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 '

(cherry picked from commit 1ea82fa869)
2017-10-03 01:55:18 -07:00
Peter Pisljar
3973a54086 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 09:05:51 +02:00
Peter Pisljar
c81e14bbb2 allows visualize to load saved vis (#14146) (#14260)
* allows visualize to load saved vis

* allowing to set time range

* updating based on review from nreese
2017-10-03 08:53:36 +02:00
Peter Pisljar
09bac49a71 fixes console error when selecting a pipeline aggregation (#14148) (#14250) 2017-10-03 07:12:58 +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
Spencer
ff1e20e371 [visConfig/tests] test with own element, cleanup after (#14215)
(cherry picked from commit 0a4a2a1219)
2017-10-02 14:42:40 -07:00
Stacey Gammon
7b1d2eaf15 Fixes #14201 by catching and displaying render errors (#14206) (#14251)
* Fixes #14201 by catching and displaying render errors

* fix lint issues
2017-10-02 16:42:18 -04:00
Matt Bargar
2bcf27582e Fix spatial filters when Kuery is in use (#14158) (#14248)
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 16:16:43 -04:00
CJ Cenizal
b49ee5cf62 Add snapshotComponent test service for Jest. (#14226) (#14245)
* 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:49:31 -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 Roes
d6b07eab09 Merge branch '6.x' of github.com:elastic/kibana into 6.x 2017-10-02 16:00:01 +02:00
Tim Roes
2f88558a8d [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:59:43 +02:00
Peter Pisljar
46b5a3ce13 fixing ordering of series in legend (#14113) (#14237)
* 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 14:53:18 +02:00
Peter Pisljar
225896c2c6 removing check for vis type on saved visualizations (#14093) (#14236)
* removing check for vis type on saved visualizations

* updating based on review
2017-10-02 14:53:01 +02:00
Tim Roes
6c057a2ee2 Rename KuiGalleryButton to KuiGalleryItem (#14118) 2017-10-02 11:30:15 +02:00
Peter Pisljar
308c77c141 pie chart design guidelines (#13661) 2017-10-02 11:16:34 +02:00
Spencer
9510b415fb [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

(cherry picked from commit 07eca00f83)
2017-09-29 21:10:33 -07:00
CJ Cenizal
56a9d2602e Rename all $global-prefixed SCSS vars to use $kui-prefix for compatibility with K7. (#14222) 2017-09-29 15:48:21 -07:00
Tim Sullivan
93f4c0c7b7 [Test/FTR] Add getPropertyAll to testSubjects service (#14210) 2017-09-28 11:10:12 -07:00