Commit graph

628 commits

Author SHA1 Message Date
CJ Cenizal 20742822bc [UI Framework] Add KuiContextMenu. (#14183) (#14427)
* Add KuiContextMenu.
- Update KuiPopover to use K7 code.
- Add KuiPanelSimple for use within KuiPopover; it's just the K7 KuiPanel renamed.
- Refactor/rewrite KuiExpression and KuiExpressionButton to depend upon KuiPopover.
- Add K7 shadow mixins and size and z-index vars to global_styling.

* Update Dashboard panel to use KuiContextMenu.
- Fix reloading issue when editing a visualization from within a dashboard.

* Completely refactor KuiContextMenu to enable a single panel.
- Move keyboard navigation logic into KuiContextPanel.
- Set focus on the item which shows the panel we're leaving within KuiContextMenu.
- Remove unnecessary logic from KuiPopoverTitle.
- Replace confusing idToPanelMap and idToPreviousPanelIdMap props with a panels prop.
- Replace panelRef prop with onHeightChange prop.
- Migrate transition state and logic from KuiContextMenu into KuiContextMenuPanel.
- Rename 'current panel' to 'incoming panel' for cohesion with 'outgoing panel.'
- Map panel items to panels up-front.
- Convert maps from state variables into instance variables.
2017-10-11 09:22:58 -07:00
Court Ewing 7799851cca fork flot into Kibana (#14366)
The flot-charts project has been abandoned since 2014, but we use it
pretty extensively in Kibana. By forking it, we can fix bugs and improve
on the library in ways that we need to for Kibana.
2017-10-10 13:28:45 -04: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
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
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
Nathan Reese 388050ea43 Input Control visualization (#13314) (#14074)
* 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
2017-09-20 07:46:58 -06:00
Spencer 96366861a9 create babel-preset and babel-register modules (#13973)
* [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

(cherry picked from commit 48d35f81fd)
2017-09-19 17:45:25 -07:00
Court Ewing c3fe4fdc02 Bump chromedriver (#14053) 2017-09-19 09:51:14 -04:00
Spencer b33299895e [npm] Upgrage wreck (#13849)
(cherry picked from commit 7866a15db7)
2017-09-14 18:48:04 -07:00
Kim Joar Bekkelund dfa1d12acb Upgrade to Jest 21 (#13863) (#13879)
* Upgrade to Jest 21

* Bump eslint-config-kibana to v0.11.0
2017-09-07 13:13:19 +02:00
spalger ea9e946df5 [npm] bump grunt-esvm
(cherry picked from commit 38cbd44658)
(cherry picked from commit 0e215e2326)
2017-09-01 11:44:19 -07:00
Søren Louv-Jansen 3095b3bffb Update react 15.6.1 (#13672) (#13724) 2017-08-28 14:12:41 +02:00
Spencer fa4378ccb1 Upgrade Angular to 1.6.5 (#13543)
* [angular/$http] remove use of .success() and .error() callbacks

* [angular/$route] remove `!` hash prefix

* [angular] upgrade

* [angular/$timeout] prevent unhandled exception "canceled" logging

* [ui/fancy_form] refactor FormController for compatibility

* [ngModelController] ensure method calls keep context

* [ui/queryBar/tests] attach $elem to DOM so "click" triggers "submit"

* [confirmModalPromise] fix test for rejected promise

* [watchMulti] specifically check watchers array for length

* [typeahead] check for property rather than own keys

* [ui/compat] add initAfterBindingsWorkaround

* [ui/fancyForms] fix _getInvalidModels()

* [fancyForm] add tests that check nested form error counting

* [ui/fancyForms] ensure that submit is blocked properly

* [ui/fancyForms] escalate soft errors on failed submit

* [ui/fancyForms] bind handlers to this in constructor

* [uiBootstrap/tooltip] describe the new error handling

* [ui/confirmModalPromise] use more sinon assertions

* [$http] resp => data before old .success() and .error() handlers

* [indices/createWizard] apply callAfterBindings workarounds

(cherry picked from commit 2eae80cd0c)
2017-08-25 15:01:32 -07:00
Tyler Smalley 854f79561d Removes webpack-directory-name-as-main dependency (#13584)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-08-25 13:05:27 -07:00
Nathan Reese f8f25d999b Upgrade kibana to leaflet 1.x (#12367) (#13688)
* upgrade leaflet modules to 1.x latest

* fix css for leaflet controls

* update draw options so it is easier to see polygon when drawing

* fix chrome touch issues with closing polygon in leaflet draw

* use canvas renderer

* use leaflet-responsive-popup to avoid tooltip cutoff

* remove radius configuration from leaflet heatmap

* make blur a factor of radius. Set maxZoom to map zoom since new values are calculated per precision

* use _.get to avoid error, cannot read property of undefined

* add cluster size slider

* experiments with image differences

* onload not onLoad

* use canvas dimensions

* compare map canvas to stored PNG of map canvas

* remove pixelmatch from project dependecies

* fix broken test - rounding error

* add expected image tests for geohash layers shaded circles and geohash grids

* bump z-index of vis-spy

* update functional test expected data

* update to leaflet 1.2.0

* revert to leaflet 1.0.3 and update expected data set for map functional tests

* test geohash_layer heatmap in unit test

* update region_map functional test since it can not longer pluck map vectors from DOM

* update documentation
2017-08-24 11:47:39 -06:00
Nathan Reese 37a63e5462 Replace "marked" with "markdown-it" (#13623) (#13667)
* add markdown functional test

* update markdown vis to use markdown-it

* migrate markdown angular filter to markdown-it

* place other uses of marked and remove dependency

* update breaking changes documenation and set linkify to true
2017-08-24 07:45:59 -06:00
CJ Cenizal 69a96ca70a [eslint-config-kibana] Upgrade eslint-config to 0.10.0. (#13323) (#13481)
* Upgrade eslint-config to 0.10.0.
* Fix linting violations with popover and typography stuff in UI Framework.
2017-08-11 11:51:34 -07:00
CJ Cenizal f8542c6b78 [UI Framework] Reorganize UI Framework and add Yeoman generator (#13172) (#13477)
* Reorganize documentation styles so they all live in doc_site/components directory. (#12809)
  - Remove global styles, e.g. body and html element selectors.
* Create global_styles dir with sub-directories. (#12833)
* Add SCSS style guide. (#12850)
* Refactor UI Framework directory structure to house everything in a src directory. (#12880)
  - Add components/index.js and services/index.js files to continue to export JS modules from the root.
* Add KUI Yeoman generator.
* Support creation of components.
* Add documentation generator for main page, demo, and sandbox.
  - Add additional documentation snippets to KUI generator. (#13076)
  - Fix incorrect use of double quotes in KUI generator snippet. (#13086)
  - Remove infrequently used imports from the KUI generator test template. (#13110)
* Mock assets files for Jest. (#13060)
* Fix broken coverage report paths in Jest config. (#13082)
* Update eslint config to lint the new UI Framework directory structure. (#13102)
* Fix positioning of doc site pagination buttons. (#13203)
* Support hasReact prop for sandboxes. (#13270)
* Remove deprecated used of component mixin from KUI generator's SCSS template. (#13377)
* Fix rebasing errors.
  - Add dashboard back to Jest config.
  - Add missing form and tool_bar variables.
* Rename tasks to createComponent and documentComponent.
* Reference correct src paths in README.
* Add children and className to templates' propTypes.
* Add default folder name for page demo.
* Add suffix to sandbox routes.
* Specify testPathIgnorePatterns more clearly.
* Rename component.test.js to test.js so that Jenkins won't try to run it.
* Update npm scripts to depend on local yo dependency, not global.
* Add ui_framework/src to copy task.
* Simplify npm scripts and remove requirement for installing Yeoman from README.
* Add services to moduleNameMapper in jest config.
* Clean up Button and Gallery examples.
2017-08-11 09:58:33 -07:00
Court Ewing 52f78dc8d1 remove @bigfunger/jsondiffpatch (#13442)
This dependency is no longer used.
2017-08-11 10:07:18 -04:00
Spencer 3a876eae54 [npm] move personal forks into elastic org (#13410)
(cherry picked from commit 7e16d19249)
2017-08-09 12:39:42 -07:00
Spencer 252024df52 [fix/UiSettings] ignore certain errors (#13079)
* [SavedObjectClient] emit detectable errors

* [uiSettingsService] consume new SavedObjectsClient errors

* [SavedObjectsClient] expose errorTypeHelpers as such

* [elasticsearch/tests] recreate error for each test

* [http] wait for elasticsearch plugin to be ready

* [shortUrl/tests] ensure that create request responds with 200

* [shortUrl] use errorTypeHelpers to filter errors

* [uiSettings/savedObjectsClientStub] stub errorTypeHelpers

* [SavedObjectsClient/errors] expose error module so tests can make errors

* [shortUrl/tests] use actual SavedObjectsClient errors

* [uiSettings/savedObjectsClientStub] use actual errors lib

* [SavedObjectsClient] use decorate instead of "wrap"

* [server/routes/uiSettings] refactor routes to forward Boom errors from uiSettings

* [uiSettings] colocate routes and service

* [testUtils/esTestCluster] use more standard api style

* [testUtils/es] add createCallCluster util

* [testUtils/esTestCluster] add getters for client/callCluster

* [es/healthcheck] ensure that healtcheck stops when server is stopped

* [uiSettings/routes] add param/payload validation

* [uiSettings/routes] add tests that verify error behaviors

(cherry picked from commit 8a64872ecb)
2017-08-08 17:57:07 -07:00
Spencer b5f20bc60a [npm] upgrade postcss-loader (#13279)
Needed to get a version that included https://github.com/postcss/postcss-loader/pull/174
(cherry picked from commit 0aa4206d2c)
2017-08-01 18:37:47 -07:00
Felix Stürmer 4182eba6d9 [6.x] Use version 0.9.0 of eslint-config-kibana (#13183)
Backports PR #13177
2017-08-01 12:00:44 +02:00
Spencer 48bfe7f1a9 Implement esTestCluster test util (#13099)
* [es/tests] remove unused module

* [testUtil/es] add utility for starting es nodes in tests

* [ftr/tests] use esTestCluster util to start es

* [es/tests/routes] use esTestCluster to start own es

* [testUtils/kbnServer] disable uiSettings unless plugins are enabled

* [testUtils/esTestCluster] use standard test es port by default

* [server/http/tests] add esTestCluster to setup

* [test/config] unify es test config into a single module

* [testUtils/esTestCluster] directory is no longer configurable

* [testUtils/esTestCluster] throw when es.start() is called again without es.stop()

* [testUtils/esTestCluster] is* checks should not mutate state

(cherry picked from commit 6748b22d03)
2017-07-28 12:37:10 -07:00
CJ Cenizal 7bffcda1ae Upgrade eslint config to 0.8.1. (#13128) (#13155)
* Fix incorrect peerDependency and bump eslint config version to 0.8.1.
* Upgrade eslint config to 0.8.1. Fix JSX to adhere to new formatting rules.
2017-07-27 11:27:05 -07:00
Chris Earle 9e1f88d3fe change branch from master to 6.x in package.json 2017-07-26 20:10:52 -04:00
Tim Roes 26dff17610 Plugin installer proxy support (#12753) (#13115)
Proxy support for plugin installer
2017-07-26 20:03:17 +02:00
jimgoodwin 811e6922b9 Branching for 6.0: Bump version to 6.1.0 2017-07-24 15:31:28 -04:00
Jonathan Budzenski 457b9fe09e Bump makelogs to 4.0.2 (#13007) 2017-07-21 11:00:23 -05:00
Court Ewing 4bf1ade6f9 bump node.js to version 6.11.1 (#12776) 2017-07-11 17:57:01 -04:00
Court Ewing d11b960994 bump version to 6.0.0-beta1 2017-07-10 13:53:05 -04:00
Jonathan Budzenski c79e22386c Revert same port http -> https redirect (#10930)
- httpolyglot is removed, we no longer automatically redirect from http to https
- server.ssl.redirectHttpFromPort option added to allow for http -> https redirect from one port to another
- We no longer start the dev server with tls by default, it can be turned on with the --ssl flag, npm start -- --ssl, or ./bin/kibana --dev --ssl
- There will currently be error log messages if you connect over the wrong protocol, we have #11209 for downgrading these
2017-07-07 17:15:56 +02:00
Spencer cca8fff6e8 [npm] upgrade grunt-esvm (#12593) 2017-06-29 22:23:27 -07:00
Kim Joar Bekkelund e7ce72e5aa Move Jest config to json (#12402) 2017-06-20 00:09:23 +02:00
Spencer 0050ea71c5 upgrade @elastic/eslint-import-resolver-kibana (#12296) 2017-06-12 14:27:56 -07:00
Joe Fleming 27b869ab04 Add eslint import resolution (#12025)
* add and configure eslint import plugins

eslint-plugin-import and eslint-import-resolver-kibana

* fix duplicate imports

* fix named exports

mostly fix the way exports works so the linter could resolve them, but fix a few incorrect imports as well

* fix import/no-named-as-default-member issues

* fix export name

don't use named export name when consuming the default export

* fix eslint namespace issue

* remove unused install_or_update_repo file

* fix metrics vis exporting

* fix multi import

* ignore resolution issues in console

custom resolver seems unable to deal with amd modules correctly

* ignore import issues in ui framework setup

resolver is unable to deal with raw imports at the moment

* add duplicates exception to select tests

* add projectRoot override to core kibana plugin

also bump @elastic/eslint-import-resolver-kibana, so the correct package.json file is used to resolve the root path

* set kibanaPath

required for the CI

* fix one last module.exports in new code
2017-06-09 11:19:31 -07:00
Joe Fleming 1ffa6df523 Replace node-uuid with uuid (#12209)
* replace node-uuid with uuid package

* fix all the uuid call sites
2017-06-06 15:15:53 -07:00
spalger 992684962b master development is now for alpha3 2017-06-06 10:08:52 -07:00
Colm O'Shea 2e5a9af100 Bump grunt-run to 0.7.0 (#12127) 2017-06-02 09:15:45 -05:00
Spencer 14014872aa [eslint] Upgrade to latest shared eslint config (#12129)
* [eslint] upgrade to latest eslint-config-kibana

* [eslint] autofix violations discovered by updated rules

* [eslint] remove import resolver
2017-06-01 17:52:39 -07:00
Aleh Zasypkin 4bc4c58d8c Get rid of auto-release-sinon in favour of built-in sinon.sandbox functionality. (#12099) 2017-06-01 10:27:08 +02:00
Spencer 132f9b4d29 [npm] remove whatwg-fetch dependency (#12110) 2017-05-31 13:58:57 -07:00
CJ Cenizal e2a862c552 Bump css-loader dependency to play nicely with Yarn. (#12103) 2017-05-31 13:52:19 -07:00
Court Ewing 2876f1fdf6 Revert "Switch to Yarn (#11637)"
This reverts commit 71a9b8b6bc.

Until we get all the relevant infra configured with yarn as well.
2017-05-27 08:51:19 -04:00
Spencer 71a9b8b6bc Switch to Yarn (#11637) 2017-05-26 19:32:03 -07:00
Spencer b6b71a6506 [tests] remove unused visual_regression suite (#12046) 2017-05-26 14:57:36 -07:00
Spencer d4db4f5b48 [esvm] bump, remove outdated config (#12043) 2017-05-26 13:36:45 -07:00
Spencer 5c04ff65fb Remove use of npm ls in grunt tasks (#11965)
* [grunt/build] refactor _build:notice task to not depend on npm

The _build:notice task used to rely on the output of `npm ls` to determine where modules were defined, but the task now just asks `license-checker` to include the `realPath` of the modules it describes in it's output, which is ultimately the same thing but works with `yarn` too.

* [grunt/licenses] convert to use lib/packages/getInstalledPackages()

* [grunt/notice/generate] test generateNoticeText()

* [grunt/licenses] tested assertLicensesValid()

* [npm] remove npm dev dep

* [tasks/lib/packages] do not include kibana in "installed packages"

* [tasks/lib/notice] join all notices with the same separator
2017-05-24 08:34:55 -07:00
Matt Bargar 5fc5a700df Change the way dynamic doc links are built so they work in dev and pre-release builds (#11913)
* Change the way dynamic doc links are built so they work even in dev and pre-release builds

* update test
2017-05-23 15:46:54 -04:00
Chris Cowan f3235ba950 Removing the auto-apply feature from Time Series Visual Builder (#11460)
* Removing the auto-apply feature

* Removing commented out code

* Adding auto apply toggle; making apply bar perminant; only make apply sensitive to data changes

* Tweaking the auto apply behavior

* Moved auto apply toggle; added local storage for setting
2017-05-22 10:02:53 -07:00