* [es][savedObjects/index] put template on each savedObject write
The elasticsearch plugin currently checks for the Kibana index on each iteration of the healthCheck, and creates it if it does not exist. This removes that step from the healthCheck and instead, before each savedObject is written to elasticsearch, ensures that Elasticsearch has the necessary index template should the write result in index creation.
The healthCheck still has the `patchKibanaIndex()` logic, which checks the type in the Kibana index and adds any missing types. This step now does nothing when the Kibana index does not exist, and does what it has always done when it does.
* [ftr] remove unused kibanaIndex service
(cherry picked from commit b1ef897dafeb6d43fe279776e44a9d793a389dc3)
* [savedObjects/integration] create now creates kibana index
* [es/healthCheck] remove use of format()
* [es/healthCheck/tests] use sinon assertions
* [es/patchKibanaIndex] test for kibana index missing behavior
* [savedObjects/errors] add tests for EsAutoCreateIndexError
* [savedObjects/config] deprecate and remove savedObjects.indexCheckTimeout config
* use dangling commas consistently
* [ui/error_auto_create_index] fix class names
* [ui/savedObjectsClient] no need to specify basePath
* [eslint] fix linting issue
Also adds some stabilization by refactoring some retries and
expectations.
and fixes a bug that snuck in between two PRS where the pie slice css
changed.
* [ftr/mocha] revert Mocha UI assigments after loading test files
* [ftr] add beforeTopLevelSuite and afterTopLevelSuite lifecycle hooks
* [ftr] add defaultWindowWidth and defaultWindowHeight options
Adds two configuration parameters to the functional test runner which
will set the windowSize before running the tests in any file and
restores the original window size when the tests complete.
Individual test files can set the windowSize within its own before() or
beforeEach() handlers using the same `command.setWindowSize()` command.
* [ftr/assignmentProxy] use better naming
* [ftr] restore initial window size after each suite
* [ftr] improve error message for unexpected suite definitions
* [ftr/remote] remove configuration option, rely on suite-level changes
* [ftr] fix stack manipulation order
* [ftr/remote] write tests for window size management
* Add a couple tests with queries and saved searches linked to visualizations
Fix issue when edit link is clicked too soon and embeddable hasn't finished loading
* attempt to fix flakiness
* remove duplicate lines
* pie labels
* add simple unit test
* fixing dashboard test
* fixing basedo on review
* simplifying conflict resolution
* removing unused code
* cleanup code
* minor changes based on review
* updating option templates to match new design
* updating truncate_labels to work with chars instead pixels
* [eslint] upgrade to 4.10.0
* [eslint-config-kibana] limit jest config to jest test files
* [ui_framework] remove trailing comma from rest-spreads
* [dashboard/tests] tag jest helpers with .test.js suffix
* explicitly import expect.js where used
* [eslint] apply auto-fixes
* [eslint] manually add/wrap some parens for compliance
* [npm] point to local packages for testing/review
* [jest] remove .test extension from jest helpers
* [ui_framework] fix trailing comma removal from 3bc661a1c8
* [packages] upgrade eslint packages
This PR removes the ability to create scripted fields with the expression language. It also adds an error message to the scripted field list page if any expression scripts already exist which instructs the user to convert all their scripts to painless.
* introduce a mechanism to load a dashboard by title is a single one is found, if not, to refill the search box on the listing page
* Make case insensitive and prevent listing page from "blipping" up on the screen before the redirect
* Add tests
* add a test that will fail due to the current TSVB bug
* add a test to catch the latest bug with saved searches
* reorder array so tests pass
* Update tests since the first panel is TSVB and won't have a spy pane toggle
* Don't update panels in state one at a time when layout changes
* Add test that would have caught the bug
* fix test
Hmmm, I thought grabbing the panels the second time would change their
order predictably but seems no. Still unsure if the order is
garaunteed.
* Need to split out merging panel updates action and setting panels
Tests caught this issue, woot.
* Fix remaining setState warnings by not calling getEmbeddableHander in render
* Add an option to add margins between panels
Make it a boolean useMargins to make this even simpler
* Fix issue with undefined not matching false and triggering a dirty state
* add some test helpers and css for plugin use-age
* default to margins on for new dashboards.
* use const variable syntax for margins
* Fix issue with older dashboards being bumped into useMargins: true mode
* Add tests to catch error
* Fix test
* Don't store column and sort state in panel uiState unless explicitly overridden in a dashboard.
* add debug messages
* Elements can go stale between the find by and the click event so wrap in a retry
* fix bad merge with master
* Adding a check to make sure everything is available to render
* Adding some safety
* Fixing a bug with the label
* Adding an additional sleep to wait for the new data to arrive.
* Refactor focus state logic to use the React lifecycle correctly.
* Update KuiPopover snapshots.
* Remove unnecessary isVisible prop from KuiContextMenu.
* Allow user to both tab AND use the arrow keys for navigation.
* Reinstate ability to tab and shift-tab to the title of KuiContextMenuPanel.
* Release focus from Dashboard panel options KuiContextMenu by closing it when you select an option.
* Update KuiContextMenu example to demonstrate best practice of closing the menu when an item is clicked.
* Replace native transitionend event handler with onAnimationEnd React event handler.
* update histogram agg to fetch min and max when search request started
* scale interval when too many buckets are created
* move min and max params into autoBounds param, remove typo in help text
* use decorated property instead of params to avoid changing agg state, add functional test
* remove sleep from functional test
* make args for onSearchRequest functions specific. Add getters and setters for autoBounds to AggConfig. Protect against divide by zero
* add unused arguments with eslint comment
* Initial check in of introducing redux in dashboard
* Use redux-actions and redux-thunks to reduce boilerplate
* Make sure all panels are minimized from the start when a dashboard is loaded - we don't want a panel id from a different dashboard in the state tree on a fresh open.
* Remove unused file
* use classnames dependency instead of manual logic
* First pass on selectors, handleActions, and more segmented reducers.
* Fix bugs with selectors and reducers and add tests that would have caught them.
* Fix issue plus tests
discover was not returning a promise
* Make expanding a panel purely a css modification which avoids all re-renders
* Found another bug with initial state not being set correctly on a hard refresh
* Remove check for change handlers now that the event handler bug is fixed
* rename dashboardState => dashboard for reducers and redux state tree
* Remove unnecessary top level describe in jest tests
* Navigate back to landing page at the end of the newly added test suite
* Fix lint errors
* Stabilize flaky tests by waiting until saved object search is finished loading results
* Don't leak subscriptions to the store.
* use selectors to grab dashboard panel off state.
* Remove use of getState in dispatcher to avoid circular reference and still use selectors
* use spread over object.assign
* No need to pass second param in when the input is simply returned as-is.
Integration tests should go into the corresponding directory under
`test` and should use the appropriate testing framework that is designed
for long-running tests like those. Tests under __tests__ directories
should be fast-running unit tests only.
Integration tests should go into the corresponding directory under
test and should use the appropriate testing framework that is designed
for long-running tests like those. Tests under tests directories
should be fast-running unit tests only.
* [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
* [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
* 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