* 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
In eb317804b5 I started combining custom argv with the process's argv, and naively used union to combine the lists. This breaks cli arguments that are supposed to be repeated and isn't necessary since commander handles parsing the argv and deduping/merging based on config.
* Create new interval pattern for specifying greater than or equal to a bucket size
* Updating label to add >=1m example
* Adding test case for gteAutoMatch
* WIP
* Fixes#13144 - Add ability to select percentiles for pipeline aggs
* Adding check for targetMetric
* Adding some notes for how percentiles are handled differently
* Create KuiCodeEditor component
* Add additional tests
* Add PropTypes for KuiCodeEditor
* Rename hintInactive to isHintActive
* Rename enableOverlay to stopEditing
* Rename and move configureAce method
* Rename onHintKeyDown to onKeyDownHint
* Fix broken configureAce call
* Add onBlur to editor example
* Regroup test cases
* Don't lose value in KuiCodeEditor example
* Remove window.alert, due to annoying behavior when switching tabs
* Remove unnecessary constructor
* Replace string ref by callback ref
* Add a snapshot test
* Move stop editing method
* Use mount to render editor during test
* Extract setState into method in example
* [vis/requesting] only call when actually requesting
* [courier/dataSource] use Promise.map to catch sync errors
* [courier/request] move source mutation logic out of request
* react editor example
* ensure props are not updated
* use new stageEditorParams method to stage parameter changes
* make component stateless
* use terms_vis_editor component
* get add button to work
* update vis controller to display terms input controls
* update componenent when query bar updates
* add functional test
* lay ground work for different control types in single visulization
* make editors for range and text controls
* text control
* implement type ahead suggestor for text control
* add range slider
* some CSS work
* add submit button, move control init functionallity under control_factory
* add custom options for control types
* provide buttons to move controls up and down
* Make ControlEditor component and clean up styling of editor
* styling work
* multi select for terms dropdown control
* add option to disable filter staging, only enable submit button when filters are staged
* clean up range styling
* rename top level vis folder
* cleanup
* move control type select out of each control editor
* dark theme styling
* use ui/public/filter_manager/lib/phrases.js to build phrases filter, add tests to range filter manager
* use savedObjectsClient to get index patterns
* remove text control and add id to controls for react tracking
* ensure fields get updated when index pattern changes
* update PropTypes for react 15.6.1
* update to latest react-select to avoid isMounted deprecation warnings
* fix input controls functional test
* rename termsControl to listControl to be more generic
* add function test for clear button, refactor directory structure
* functional tests for updateFiltersOnChange is true
* fix react-select clipping problem in dashboard
* try clicking option instead of pressing enter to set react-select value in functional tests
* react-select css
* clean up control_editor component, make ListControlEditor component be function
* add jest test for vis_editor component and accessibility
* add decimal places option to range slider
* add jest test for InputControlVis component
* add default to switch blocks, split editor into seperate tabs, use shallow in snapshot tests
* fix race condition in field_select, update index_pattern_select to fetch indexPatterns on each filter
* clean up control initialization
* use htmlIdGenerator to avoid html element id conflicts
* update functional test to support new editor tabs
* finish jest tests for sub componenets
* mark vis as experimental, refactor buttons for better usability
* fix bug in list control where unable to select options containing numbers and options containing commas. Truncate display of long list options
* fix chart types functional test
* fix jest tests, add margin to action buttons
* remove binds from render functions
* experement with native input range sliders
* Revert "experement with native input range sliders"
This reverts commit aed599e88a.
* Use Promise.resolve in tests and replace _createRequest with searchSource.fetch
* add inputs to range control
* [babel] create babel-preset and babel-register modules
* [babel-preset] add comments to babel-preset-env.target choices
* [babel-preset] use more normal BUILT_WITH_BABEL signal
* [babel-register] extended comment about filtering ./src in dist
* [babel-preset] stage of class properties has changed, sorta
* adding tabify response handler
* tabify should be the default response handler
* asAggResultConfig should be configurable for BWC
* update table to work with new tabify response handler
* region map needs to define responseHandler: none
* fixing tests
* markdown should set responseHandler to none
* Remove unused doc source code
Ever since the saved object api was introduced, we’ve been using that,
or querying es directly, for mget data.
* Remove commented out code
* Stop using onError because there is a memory leak there
* Restart segmented fetch errors.
* Get rid of all onError calls
* Remove unused functions
* Continue searching when a doc_table error is encountered
Otherwise a single saved search failure won’t try again when it’s on a
dashboard. The previous implementation handled this via the
request.retry in the default errorHandler.
* Fix lint error
* don't pass resolve and reject into inner function
Prior to 5.6, we would push mappings once the object type was used. Since we are now ensuring all mappings are set, there is a situation where a field with type string exists but we are pushing text.
You can not have a field with the same name, but different data type, in two different document types.
To resolve this, we are setting update_all_types when updating mappings.
Backport of #13991
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
After some trial and error trying to build a generic API that could control both kuery and legacy filters I decided it wasn't going to work well. So instead I'm taking a different approach. I'm making kuery available to visualizations alongside the existing queryFilter. Visualizations can choose to support one or both. Eventually we can just deprecate and remove queryFilter from the vis API. The standard filter_bar_click_handler still supports both, so basic visualizations that rely on that behavior will just work.
The vis API has two new members:
queryManager - contains two simple methods, one for getting and the other for setting the current app level query.
kuery - all of the functions exported by the kuery module, made available so visualization plugins don't have to import them directly from kibana
The addition of these two members should provide visualizations with everything they need to read, modify, and update kuery queries.
When functional testing UIs that contain this component for pagination, we need a way to get a handle on the "previous page" and "next page" buttons. So we add test subject attributes to these buttons' elements.