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
(cherry picked from commit 6998f07454)
* [Optimize] Fix bundlesPath by prefixing optimize.bundleDir with slash
* [Optimize] Fix bundlesPath by resolving optimize dir
* [Optimize] Fix bundlesPath by resolving optimize dir
* [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)
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 '
(cherry picked from commit 1ea82fa869)
* [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.
* 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
* 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
(cherry picked from commit 07eca00f83)