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.
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.
* 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
* 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
* [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
* 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
* [Optimize] Fix bundlesPath by prefixing optimize.bundleDir with slash
* [Optimize] Fix bundlesPath by resolving optimize dir
* [Optimize] Fix bundlesPath by resolving optimize dir
* 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
* [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
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.
"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.
* [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 '
* [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
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.
* 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.
* 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
* 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
* [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