Commit graph

799 commits

Author SHA1 Message Date
CJ Cenizal cf8b93180f
Add (MIT AND Zlib) to acceptable licenses. (#14985) (#14986) 2017-11-15 17:14:15 -08:00
Spencer 98a1c5a0f1
[6.x] Upgrade to eslint 4 (#14862) (#14951)
* [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
2017-11-14 20:20:37 -07:00
Spencer 242c6fae2e
[6.x] [eslint] add eslint dev script (#14889) (#14941) 2017-11-14 10:24:00 -07:00
Jonathan Budzenski 1cd87ef246
[6.x] [ci] Build docs (#14868)
* [ci] Build docs (#14130)

* [ci] Build docs

* fix context

* remove docs task from jenkins:unit

* [jenkins] Add docs script (#14769)

* [jenkins] Add docs script

* remove xvfb
2017-11-14 09:16:16 -06:00
Spencer 4a5ba237df
[6.x] Upgrade to webpack 3 (#14315) (#14824)
* [timelion] remove last remaining amd modules

* [eslint-config-kibana] remove env.amd

* [webpack] use absolute loader names

* [webpack] remove absolute node_modules/ imports

* [webpack] upgrade to webpack 3

* [uiFramework] make webpack build compatible with v3

* [eslint-import-resolver] use https://github.com/elastic/eslint-import-resolver-kibana/pull/21

* [baseOptimizer] don't break when pkg has no dependencies

* [optimize] remove unnecessary json-loader

* [optimize] remove local references to webpack vars

* [eslint] upgrade to eslint-import-resolver-kibana 0.9.0

* [baseOptimizer] comment tweaks

* [baseOptimizer] remove loader pinning

In webpack 1 the loaders defined here were resolved relative to the file they were going to load, which meant that plugins in other projects could accidentally overwrite the loaders Kibana was trying to use, which is why the aliases were used to enforce proper resolution.

In webpack 2 loaders are now resolved relative to the webpackConfig.context, which is set to the root of the Kibana repo. See https://webpack.js.org/configuration/module/#useentry

* [webpack] rely on kibana webpack shims before checking node_modules

(cherry picked from commit f60639fccb)
2017-11-07 15:54:48 -07:00
Jonathan Budzenski 8a7551f38f
[build] Clean examples from node modules (#14587) 2017-10-31 13:08:09 -05:00
Spencer c0a5788835 [flot-charts] move into ui/public (#14669)
(cherry picked from commit 3e08a7e765)
2017-10-30 12:44:00 -07:00
Matt Apperson 0638bcac6e [TSVB] change how the resize component works to not use timeouts (#14320)
* [WIP] Atempt to use a new resize component that does not use timeouts

* remove unused var

* add copyright notices
2017-10-25 09:53:40 -07:00
Chris Cowan 232ad9535e Math Aggregation to support Sibling Aggs for TSVB (#13681)
* Math Aggregation to support Sibling Aggs

* Fixing tests

* Deal with ResultSets

* including all var under params; updating docs

* Fixing bugs asscociated with blank Math aggs

* Adding aria props to elements

* Fixing aria labels; changing calculation label to bucket sript

* changing input to textarea

* Add compatability with percentiles; fix vars to be compatible with percentiles

* Adding comments

* Fixing typo in note
2017-10-24 15:55:07 -07:00
Tim Roes 401e15b156 Add (GPL-2.0 OR MIT) license as allowed (#14439)
* Add GPL-2.0 OR MIT license as allowed
* Remove ua-parser-js from overwrites
2017-10-12 13:23:27 +02: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
archana e6b6d222dd [Optimize] Fix bundlesPath by resolving optimize dir (#14309)
* [Optimize] Fix bundlesPath by prefixing optimize.bundleDir with slash

* [Optimize] Fix bundlesPath by resolving optimize dir

* [Optimize] Fix bundlesPath by resolving optimize dir
2017-10-04 13:37:16 -07:00
Spencer ddc1d9c5bf [savedObjects] fix error handling when Kibana index is missing (#14141)
* [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
2017-10-02 18:52:26 -07: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
Spencer 8da37abff8 [ftr] remove timestamp prefix, jenkins has it built in now (#13825)
(cherry picked from commit e72a20670d)
2017-09-14 19:22:45 -07:00
Brandon Kobel ed64146907 Adding "BSD 3-Clause" as a valid license (#13934)
We already have "BSD-3-Clause" as a valid license, but there's a variant
with a space instead of a '-' being used by js-base64 that we need to
accomodate for.
2017-09-11 09:19:50 -04: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
CJ Cenizal 84e74f510c [UI Framework] Spawn compileCss as a child process to prevent a node-sass fatal error from killing the watch process (#13222) (#13476)
* Spawn compileCss as a child process to prevent a node-sass fatal error from killing the watch process.
* Document tasks.
2017-08-11 09:52:34 -07: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 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
Court Ewing b39c28ed17 esvm: use branch from package.json (#13149)
Since versions are synced across the stack, the esvm config can use the
same branch configuration as Kibana itself.
(cherry picked from commit 8d5eac959f)
2017-07-28 12:34:33 -07:00
jimgoodwin 811e6922b9 Branching for 6.0: Bump version to 6.1.0 2017-07-24 15:31:28 -04:00
Tyler Smalley 3c0c0ff441 Use single ES document type (#12794)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-07-19 09:27:16 -07:00
Tyler Smalley c3713a8ef0 Bumps ua-parser-js license override (#12972)
└─┬ prop-types@15.5.8
  └─┬ fbjs@0.8.12
    └── ua-parser-js@0.7.14

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-07-19 07:50:15 -07: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
Tyler Smalley 3ef5e78354 Fixes path to the functional test runner (#12651)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2017-07-06 00:02:35 -07:00
CJ Cenizal 90834a5d5f Fix jsonify license check (#12615) (#12619)
- Alphabetize order of licenses and overrides.
- Fix jsonify override so that the license passes.
2017-06-30 12:06:26 -07:00
Jonathan Budzenski 7155a404ef [licenses] Bump ua-parser-js override (#12474) 2017-06-22 12:19:20 -05:00
CJ Cenizal 5fa94ac56a Update files_to_commit to find renamed files. (#12423)
* Update files_to_commit to find renamed files.
* Ignore blank lines and deleted files.
2017-06-20 13:49:46 -07:00
Matt Bargar dd072c8596 Include missing branch variable in built package.json (#12288) 2017-06-12 17:11:47 -04: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 262bcb411a Use es6 exports, replace module.exports (#12084)
* use es6 exports in fixtures

* use es6 exports in test_utils

* use es6 exports in src/ui

* use es6 exports in src/utils

* use es6 exports in src/server

* use es6 exports in timelion

* use es6 exports in core plugins, but not console

* use es6 exports in console

* use es6 exports in src/cli

* use eslint --fix for no-extra-semi rule

* selectively disable kibana-custom/no-default-export

* replace define() with exports

* clean up some object exports

in these cases, named exports are the better replacement

* use es6 exports in src/optimize, where possible

* fix uses of named exports

* fix some imports in console

* revert postcss optimizer to module.exports

* [timelion] put shared code in common directory

* fix url module export

don't export as default, rely on the named export

* convert define modules in src to export

* convert ui-bootstrap to cjs module

* lint webpackShims

no reason not to, they pass when the no-var rule is disabled

* fix new code not using es6 exports

* fix some straggling exports
2017-06-06 10:11:59 -07:00
Spencer e5deca679c [IndexPatterns] Support cross cluster search (#11114)
* [indexPatterns] support cross cluster patterns

* [vis] remove unused `hasTimeField` param

* [indexPatterns/create] fix method name in view

* [indexPatterns/create] disallow expanding with ccs

* [indexPatterns/create] field fetching is cheaper, react faster

* [indexPatterns/resolveTimePattern/tests] increase readability

* [tests/apiIntegration/indexPatterns] test conflict field output

* [indexPatterns/fieldCaps/readFieldCapsResponse] add unit tests

* [test/apiIntegration] ensure random word will not be valid

* [indexPatterns/ui/client] remove unused import

* remove use of auto-release-sinon

* [indexPatterns/create] don't allow expand when cross cluster

* [indexPatternsApiClient/stub] use angular promises

* [indexPatterns/create] add tests for base create ui behaviors
2017-06-02 14:26:58 -07:00
Colm O'Shea 829e0bd64d Add force-local flag to tar archiving on windows (#11914)
This commit adds the ability to archive tars on windows builds.
As windows filepaths have colons in them (i.e. c:/kibana)
tar thinks it is accessing a remote datasource.

Adding the --force-local flag tells tar to archive a local file.
2017-06-02 10:04:03 -05:00
Spencer b7f519704a [jenkins/ftr] bail on first functional test failure (#12111) 2017-05-31 14:18:58 -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 f1d862f053 [grunt/jest] fail task when jest fails (#12049)
* [grunt/jest] fail task when jest fails

* 😶
2017-05-26 17:21:45 -07:00
Spencer d4db4f5b48 [esvm] bump, remove outdated config (#12043) 2017-05-26 13:36:45 -07:00
Court Ewing c57a775060 build: remove 32 bit builds (#11941)
All builds are now 64 bit, which is what we want to support from 6.0
onward.
2017-05-25 16:15:25 -04: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
Spencer d3ba428796 [ftr] make room for more projects (#11848)
Squashed commit of the following:

commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 09:19:22 2017 -0700

    [test/*/fixtures] rename es_archives to es_archiver

commit d3667457c78e88e2d6974f3c38dd0fe61b846b91
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 08:22:03 2017 -0700

    [ftr/config] fix default directory value functions

commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 07:30:52 2017 -0700

    fix import paths

commit fcb65a877d54b5b1d36b8c81f1264b36845e826e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 21:39:57 2017 -0700

    [grunt/ftr] use named exports for configs

commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:50:04 2017 -0700

    [test] remove unnecessary directory definitions

commit 0c28984669768482f0a2ee7fc2800d5bcaf49025
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:46:29 2017 -0700

    [ftr/config] make default directories relative to config path

commit cd2f33612624cacffec138797f3fc0f4ecb46cca
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:32:12 2017 -0700

    [test/common] put server config into common

commit 7851ed811a236576c63bd20850b3ef2099be2a4e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:18:20 2017 -0700

    [grunt] "deprecate" test:api:runner task

commit b2ac4c26593a1947c94f0168191fe8123ff74122
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:15:41 2017 -0700

    [ftr] accept the project name as an unnamed arg

commit 47e292894fc70c0a04883403c50c5d2ae0738d76
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:56:34 2017 -0700

    [ftr/grunt] convert ftr task to multi-task with config

commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:54:54 2017 -0700

    [test/functional] move fixtures into test/functional project

commit 05994e9c92cf134c58f831c285b3b522a801acbc
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:02:51 2017 -0700

    [src/test_utils] merge with test/utils directory

commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:53:00 2017 -0700

    [test/api_integration] migrate api tests to functional test runner

commit ca328c34648dd7e07f70e1844e07cfc392e41103
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:50:12 2017 -0700

    [esArchiver] refresh modified indices after load

commit cde74a540850fd97578f441d6dccaefd1444e656
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:46:48 2017 -0700

    [test/functional] move shared services into test/common

commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:51:23 2017 -0700

    [scripts/mocha] run _mocha script when debugging

commit 1cc80600d90e318d4738920aa557d124075a4570
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:48:12 2017 -0700

    [ftr/config] allow child config files to have no testFiles config

commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 21:52:26 2017 -0700

    [ftr] move screenshots into test/functional
2017-05-17 18:53:45 -07:00
CJ Cenizal 2513616c31 Update UI Framework build task to not compile source maps. (#11868) 2017-05-17 11:23:32 -07:00
Spencer 31fed421ff Implement/timestamps in log (#11781)
* [utils/streams] add createMapStream()

* [utils/toolingLog] make tooling log operate in object mode

* [ci/ftr] log the time before each log message
2017-05-15 14:28:14 -07:00
Chris Roberson d23fa3689b Remove legacy npm script that is no longer used or supported (#11796) 2017-05-15 14:56:23 -04:00
Brandon Kobel 46f1bcfd76 Adding WTFPL OR ISC to the list of valid licenses (#11768) 2017-05-12 16:23:27 -04:00
Spencer 2e7fed87fd [ftr] take screenshots on failure (#11709)
* [tests/functional] move screenshots to their own service

* [ftr] add testFailure and testHookFailure lifecycle hooks

* [tests/functional/screenshots] cleanup old screenshots at startup

* [test/functional/screenshots] take screenshots when tests fail

* [cli_plugin/install] fix test

* [ui/scanner] fix test
2017-05-11 12:07:23 -07:00
Colm O'Shea 68ada6b366 Rebuild modulePath correctly if on Windows (#11439)
The module paths are split by ':' and with a Windows filepath (and the 'C:/' prefix),
the split returns the drive letter and directory path separately.
This causes the modulePath to be set incorrectly into the packagePaths object
and the subsequent call for the licenses by key returns undefined on Windows only.

This commit recombines the drive and directory paths and sets the correct key into packagePaths.
2017-05-10 06:25:23 -05:00
Spencer 36ecf130ad [babel] tweak babel options for performance and debugging (#11535)
* [babel] tweak babel options for performance and debugging

* [babel] remove babel-plugin-transform-export-extensions

* [npm] lock new deps to the patch version

* [npm] remove unused deps
2017-05-08 15:29:28 -07:00