Commit graph

979 commits

Author SHA1 Message Date
Tiago Costa dc956a0a79
Fix non-conforming licenses on devDependencies and add the ability to whitelisting devOnly licenses (#23859)
* chore(19834): upgraded yargs dependency to 4.8.1 in order to remove pkg-conf dependency license conflict.

* chore(19834): override xmldom to one of the allowed licenses (MIT).

* chore(19834): added some overrides and whitelistenig for Apache2.

* chore(19834): correct overides for some apache2 licenses.

* chore(NA): updated specific dependency needs.

* chore(19834): added some more info on updated licenses.

* chore(19834): small note on dependencies use versions.

* feat(NA): add the ability to white list licenses only valid for dev only dependencies.

* chore(NA): update yarn lock files to include integrity check.

* fix(NA): yarn lock file for kbn ui framework.

* docs(NA): fix uncompleted comment left on the code.
2018-11-09 02:11:17 +00:00
liza-mae fabbfdcd12
Replace xvfb with headless browser (#24904)
* Replace xvfb with headless browser

* Update karma to run in headless chrome

Update Karma tests for an option to run chrome in headless.

* Fix lint issues

* Fix spaces
2018-11-05 10:40:42 -07:00
Tyler Smalley a76645b095
Removes defunct function test runner Grunt task (#24673)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-10-30 10:41:54 -07:00
liza-mae 7d35a49d4a
Use chrome instead of IE for karma on windows (#24053) 2018-10-16 14:53:35 -06:00
Jonathan Budzenski c2bae26e87
[tests/browser] generate css before testsBundle, include css (#23794) 2018-10-04 11:10:20 -05:00
Josh Dover eb1cfaf0f8
Add jenkins:report task for test failures (#22682)
* Add jenkins:report task

* PR comments
2018-09-21 09:31:51 -05:00
Jonathan Budzenski 03553dedbc [ci] Run ES snapshot when possible (#22663)
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.
2018-09-06 16:31:47 -07:00
Leanid Shutau 1e5d82c2ab
Integrate main i18n tool into build pipeline (#22254)
* Integrate main i18n tool to build process

* Resolve comments

* Remove old task

* Replace default Error with FailError
2018-08-29 11:55:34 +03:00
Spencer 4d9bc2f121
[devUtils/toolingLog] give tooling log configurable writers (#22110)
* [devUtils/toolingLog] give tooling log configurable writers

* property shorthand

* remove redundant parameter

* call Error.captureStackTrace when subclassing Error

* describe why we skip stack trace logging for CliError

* always return true/false from log writers

* improve type definitions, writeTo is just an object with write method

* get rid of weird dedent for failures
2018-08-21 17:09:27 -07:00
Tim Roes 743edc6c0e
Make panel action tests more generic (#22174)
* Make panel action tests more generic

* Remove test file

* Add simple app tests

* Shorten/fix import

* Remove unneeded task

* Add debug output

* Allow duplicate --plugin-path params

* Remove debugging options

* Add README
2018-08-20 21:48:38 +02:00
archana cb8c1de733 [Tests] Add http integration test setup (#19261)
* [Tests] Add http integration test setup

* Base path tests

* SSL tests

* Eslint fixes

* Remove env from config schema

* Rename folders so no_rewrite and rewrite match configs/tests

* wip

* Use self-signed cert for SSL test

* Improve basepath tests

* Run base path proxy server in dev mode for now

* Remove env from x-pack reporting config

* Remove redundant base-path tests

* Test SSL with redirectHttpFromPort set

* Test SSL with redirectHttpFromPort set

* Flesh out comments

* Remove some cruft

* Add SSL tests to CI run
2018-08-17 08:36:14 +02:00
Spencer b4e1193015
Revert "Run some functional tests against kibana in production mode (#21899)" (#22111)
This reverts commit 63df7cb2e4.

It seems this caused unintended failures on master, will resubmit after CI is green
2018-08-16 23:28:37 -07:00
Spencer 63df7cb2e4
Run some functional tests against kibana in production mode (#21899)
Right now the functional tests are run against a distributable of Kibana in CI, but that distributable is running with `--env.name=development`. That causes the optimizer to run again before the tests can start and prevents the functional tests from running against the actual version of the application users will end up getting. This seems necessary for some tests, but not all of them, but I would like to get all of the tests running against the production version of Kibana soon.

This PR implements a second ftr config, `test/functional_production` that uses basically a copy of the `test/functional` config but with a few minor adjustments, removing the `--env.name=development` kbnServerArg and using a unique junit report name. To accomplish this I needed to modify the `@kbn/test` module to only pass the `--dev` flag to the Kibana server if it is being run in development mode, which it currently does by testing the args for `--env.name=development` or two args next to each other: `'--env.name'` and `'development'`. It does this by converting the `extraKbnOpts` option into an `addExtraKbnArgs` function, which is called with the final args just before passing them to the proc runner and given a chance to modify then after all other args are resolved (pulling from different places in config based on the build type, etc.)

Over the next couple weeks I'll push up PRs for individual test suites, migrating them over to the new production config, hopefully in a short period of time we will have all the function test suites back under that `test/function` config and can run them all against the Kibana server in production mode.
2018-08-16 12:15:58 -07:00
Spencer 141a97d93c
[TypeScript] add type-check script (#19325)
* [TypeScript] add type-check script

* [ci] run scripts/type_check after linting

* [ts] improve filterProjectsByFlag readability

* fix typo

* simplify type signature
2018-08-09 17:19:24 -07:00
Spencer 8d0b7e7f7e
[junitReports] Rename reports so they are auto-discovered by CI (#21502)
In order for the runbld project we use in CI to auto-discover the junit reports we generate they need to match `TEST-*.xml`, which will allow us to include more details in the failure emails, and push failure info to the build-stats cluster.
2018-07-31 12:47:34 -07:00
Stacey Gammon bed72f224d
Add pluggable panel action tests (#20163)
* Add pluggable panel action tests

* address code review comments

* update inspector snapshot

* remove temp declared ts module now that eui has EuiFlyout typings

* address code comments
2018-07-28 10:41:57 -04:00
Brandon Kobel 15e3e59249
Switching from jade to pug (#21047)
* Upgrading pug

* Switching .jade to .pug and fixing templates

* Renaming the I18N usages of jade to pug

* No more jade in I18N
2018-07-27 07:21:27 -04:00
archana d1cb0a44f5
Deprecate test:ui commands (#21092)
* Deprecate test:ui commands
2018-07-23 14:48:27 -05:00
archana 757e7d2e05
Run functional test dev server from snapshot by default (#20312) 2018-06-29 13:36:48 -05:00
Maxim Tolochko f522b31ac9
Add draft implementation of I18n engine (#19555)
* Add draft implementation of I18n engine

* Add i18n loader

* kbn-i18n refactoring

* Fix react i18n context and update doc

* i18n engine refactoring

* Fix locales data loading and add more jsdoc comments

* Fix verify_translations task

* I18n tests refactoring

* Add build scripts to kbn-i18n package

* Fix some bugs

* Move uiI18nMixin into ui_i18n folder

* Add 'browser' field to kbn-i18n package.json

* Get rid of "showError" method

* Make i18n and i18nLoader a singleton object

* Add default locale as fallback if translation files were not registered

* Update yarn.lock

* kbn-i18n fix

* Add default formats

* Try to fix build

* Add more examples into kbn-i18n/README.md

* kbn-i18n fix

* Fix app_bootstrap tests

* Add links to issues in TODO comments
2018-06-28 12:38:39 +03:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
archana b03243f5d8
[Functional Tests] Use @kbn/test on Kibana CI (#18967)
* Replace test:api with @kbn/test runTests

* Improve CLI help menu 🆘

* Use --es-from

* Replace jenkins:selenium with kbn-test

* Validate cli args, fixing test in the process

* Clean up some stuff

* Code review fixes

* Explanation for collectCliArgs

* Remove exit codes, they're useless anyway.

* Make markdown vis test pass with dev_mode setting

* Tests

* Remove unneeded export

* Code review: move console logging up to cli.js

* Code review: refactor startServers and runTests to take single options collection

* Code review: Remove all things I am sure we do not use

* Improve tests

* Code review fixes

* Pass created log to runFtr, runElasticsearch, runKibanaServer

* Update --es-from option to --esFrom
2018-06-26 18:08:40 -05:00
Tim Roes 2885e871e3
Replace spy panels by Inspector (#16387)
* Add Inspector feature

* So long, and thanks for all the fish, spy panel

* Fix several functional tests

* Fix unit tests

* Fix spy panel button tests

* Replace old spy panel documentation

* Disable test temporarily until we have dashboard triggers

* Enter edit mode for dark theme test

* Fix some more functional tests

* Fix more functional tests

* More test fixing

* Fix more functional tests

* Allow opening the inspector via loader handler

* Refactor InspectorViewChooser, remove unused CSS

* Remove dead code

* Fix data download button style

* Remove redundant code

* Load inspectorViews for dashboard_viewer

* Extract inspector views to custom core_plugin

* Switch API to TypeScript 🎉

* Design changes

* Remove icons from views

* Design changes

* Improve typings of API

* Add typing to all adapters

* Show loading spinner in request selector

* Rewrite InspectorView to TypeScript

* Fix help text for data view

* Remove deprecated React lifecycle methods

* Embed inspector into dashboard panel actions

* Remove temporary inspector trigger

* Remove old CSS

* Fix dashboard trigger for new panel action

* Add tests for InspectorPanel and DataAdapter

* Produce a hierarchical table if the vis is hierarchical

* Remove allowJs option again

* Add missing Apache license headers

* Close inspector on dashboard when navigating away

* Use proper title for dashboard panels

* Fix functional tests

* Skip broken test for now

* Flush view chooser button

* Add request adapter tests

* Skip more tests, broken due to typescript

* Add Request Time description

* Add description for courier request

* Fix tests

* Replace icon by new (not yet released) icon

* Finalize design of inspector

* Remove discover test, that relied on spy panels

* Change API to be properly mockable in tests

* Add aria-live region for request status

* Replace old method in functional tests

* Replace abitrary magic number

* Use object destructuring in vis

* Fix issue with crashing requests view

* Add request time tooltip

* Get request body of correct search source

* Make filter buttons properly keyboard accessible

* Follow Dave's design suggestions

* Remove redundant request from name

* Remove unneeded comments

* WIP raw-formatted values

* Fix filtering issue

* Fix tests and more license headers

* Add data view tests

* Remove search from table

* Fix typos

* Implement review suggestion

* Remove artificial delays for testing

* Fix new panel action structure

* Minor design adjustments

* Fix failing functional test

* Update failing snapshot test

* Implement final wording

* Apply new EUI styling

* Fix closing inspector in tests

* Fix sorting of table

* Align punctuation between tooltips
2018-06-20 11:07:44 +02:00
Spencer 6a429d7fa3
[npm] upgrade to RxJS 6 (#18885)
This PR upgrades RxJS to version 6 and switches to a fork of `stream-to-observable` which includes an updated version of `any-observable` that supports RxJS 6 until https://github.com/jamestalmage/stream-to-observable/pull/10 is merged. The primary change in this version of RxJS is the movement of stream operators from `Obersable.prototype` to the `rxjs/operators` module. Some of the operators, like `catch` and `do`, have been renamed (`catchError`, and `tap`). The Obsevable factories have also been moved from static methods on the `Observable` class to named exports of the root `rxjs` module. Some of those factories have also changed slightly, like `fromEvent` which now emits arrays if the event handler is called with multiple arguments.

```js
// import the Rx namespace to get the Observable factories
import * as Rx from 'rxjs';
// import the operators as named imports
import { map, tap, switchMap } from 'rxjs/operators';
```
2018-06-18 10:16:38 -07:00
Tiago Costa 6ed5e7095b
chore(19502): change license checker and generator behaviour to only add dev dependencies with --dev flag. (#19626) 2018-06-12 07:56:10 -07:00
Spencer f0cc432faf
Apache 2.0 license headers (#19383)
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.

Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:

```
node scripts/eslint --fix && node scripts/tslint --fix
```
2018-05-28 20:06:30 -07:00
Spencer e50fd2403b
Check filename casing in CI (#19282)
* [dev/checkCasing] add script to find casing violations

* [dev/casingCheck] fix es-ES.json violation
2018-05-24 11:38:42 -07:00
Spencer 4c2a90dbdd
[tslint] lint typescript code (#19105)
* [tslint] lint typescript code

* [tslint] filter projects when running specific project

* [dev/ts] use more explicit types

* [dev/ts] add note about why using glob

* [dev/ts] rely on ts, use fewer getters
2018-05-22 14:00:02 -07:00
Spencer f24a725144
[mocha] remove grunt-simple-mocha (#19079)
* [mocha] run tests with mocha script, remove grunt-simple-mocha

* [ci] force colored output

* [ci] disable color when reading the yarn bin

* [dev/build/exec] support tooling log having its own chalk

* [dev/mocha] avoid changing the cwd of the process

* [dev/mocha] only match files, speed up negative matches

* [cli/serve/test] strip ansi control characters from logs

* [ci] disable color in all `yarn bin` invocations

* [dev/mocha] cleanup old runInBand check

* [dev/mocha] enable gloabl leak checks
2018-05-16 10:43:55 -07:00
Søren Louv-Jansen acc3af0c59
Align x-pack and kibana devDeps (#19022)
* Align Node deps

* Added grunt task

* Update name
2018-05-14 19:33:04 +02:00
archana b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Spencer dea6062f9d
[grunt] remove .rej file check (#17805)
The old backport tool we used, Jasper, would create PRs with .rej files
when it couldn't merge a backport cleanly. That lead to this task which
would skip the tests if .rej files were found. Now we don't use Jasper
and this check takes about 1 minute to run on CI, so we can remove it
and save some time.
2018-04-19 13:36:31 -07:00
Kim Joar Bekkelund 6be9df01af Move to Yarn 1.6.0 (#17741) 2018-04-17 09:53:12 -07:00
Aleh Zasypkin 35e01f288f
[kbn/pm] Get rid of --skip-kibana in favour of --exclude kibana. (#17684) 2018-04-12 20:56:28 +02:00
Kim Joar Bekkelund 6730849028 Using Jest on all tests in src/server (#16373)
* Move src/server to Jest

* ESLint overrides for src/server tests

* Rename files

* Fix renamed files

* Remove unnecessary changes

* Remove exclude of src/server tests
2018-04-04 11:01:21 -07:00
Spencer 608a1e3553
Add/generate/verify NOTICE.txt file (#17504)
* [dev/notice] add scripts for generating NOTICE.txt file

* [notice] react-resize-detector@0.6.0 was removed in b445389b79

* [notice] move notice text into relevant source

* [dev/notice] Generate NOTICE.txt file

* [jenkins] verify that notice.txt is up to date in CI

* [tasks/notice] update test to use new NOTICE.txt file

* [dev/notice] update company name in NOTICE.txt

* [notice/cli] exit with 0 when --help requested

* [notice/cli] add helpful logging

* [notice/cli] use --validate flag name instead

* [notice/cli] simplify NEWLINE_RE, ignore obscure line endings

* [utils/decode_geo_hash] fixup comment

* [utils/decode_geo_hash] remove useless comment
2018-04-04 09:12:44 -07:00
Spencer 5cde84b9c1
[licenses] resolve license for private:true packages (#17537)
* [licenses] resolve license for private:true packages

* [licenses] remove outdated test

* [licenses] fix test
2018-04-04 08:44:57 -07:00
Jen Huang ef4d26294b
Add aria-label attributes to indexed fields table, and use EuiIconTip (#17427)
* Add aria-label attributes to indexed fields table, and use EuiIconTip
* Use EUI 0.0.35
* Add `Apache License, Version 2.0` to list
2018-03-28 10:37:37 -07:00
archana 0f49d67db3
Replace tooling-log instances with @kbn/dev-utils (#17324) 2018-03-23 10:54:38 -05:00
Lukas Olson 6bac181a74
Create grunt task to generate parsers from peg files (#17069)
* Create grunt task to generate parsers from peg files

* Leave comment

* Move grunt config to config/
2018-03-21 16:42:23 -07:00
Spencer 2eb019ffd2
[yarn] upgrade sha.js pre-emptively due to license changes (#17292) 2018-03-20 16:09:10 -07:00
Tyler Smalley 82e17f435f
[kbn-es] Package for managing Elasticsearch during dev and testing (#17168)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-20 08:30:15 -07:00
Tyler Smalley dc0ce9e2b9 Adds additional CC licenses (#16969)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-16 16:40:29 -07:00
Jonathan Budzenski b9928ce3e3
[build] Turn on optimizeBuild logging (#16205) 2018-03-15 12:33:16 -05:00
archana 409af00d4d
Move proc_runner from x-pack-kibana into kibana (#17120)
* [tests] add proc_runner from x-pack-kibana

* [tests] implement proc_runner deps

* [tests] fix proc_runner dep

* [packages] move proc_runner into kbn-proc-runner

* [kbn-proc-runner] Package it

* [kbn-proc-runner] Chalk it up

* [kbn-proc-runner] Package.json

* Both kbn-proc-runner and kbn-utils depending on review. Sigh.

* Rename to kbn-dev-util, remove kbn-proc-runner

* Test proc-runner

* Add babel

* [proc-runner] build fixes

* Recreate yarn.locks, add mocha tests to simplemocha config
2018-03-14 19:55:50 -05:00
Spencer ef3339bd7a
[@kbn/ui-framework] move ui-framework to a package (#17085)
* [@kbn/ui-framework] move ui-framework to a package

* [@kbn/ui-framework] restore doc_site index.html and fix build task names

* [jest] always ignore modules in target dirs
2018-03-13 10:43:39 -07:00
Kim Joar Bekkelund 48f8dc323c
[kbn-pm] Include Kibana's transitive _projects_ in build (#16813) 2018-03-12 11:00:27 +01:00
Jonathan Budzenski eb85636d74
[master][license csv report] Support directory flag (#17073)
* [license csv report] Support directory flag (#17070)

* [license report] support directory flag

* override png-js

* override eslint-plugin-kibana-custom

* remove eslint-plugin-kibana-custom override
2018-03-09 16:53:31 -06:00
Kim Joar Bekkelund e5d33e992a
Move running projects tests into Grunt task (#16946) 2018-03-09 14:28:47 +01:00
Aleh Zasypkin f2fda4aca3
Introduce Jest integration tests. (#16735) 2018-02-19 17:02:01 +01:00
Spencer 4d246a10a8
[kbn-pm] rename from kbn-build (#16739) 2018-02-14 10:57:13 -07:00
Kim Joar Bekkelund 1c3b404774
Production package example: datemath (#16531) 2018-02-13 21:49:55 +01:00
CJ Cenizal eb49a8c449
Add test-subj-selector module to packages dir. (#16623)
* Add test-subj-selector module to packages dir.
* Rename to @kbn/test-subj-selector.
* Simplify rejectRejFiles Grunt task and ignore nested node_modules.
* Update jenkins_unit script to use yarn kbn CLI.
2018-02-13 10:34:47 -08:00
Spencer ff4213a306
Condense build task (#16687)
* [build] don't copy unwanted files

* [build] condense mkdir/touch tasks

* [i18n] verifyTranslations task has nothing to do with the build, just run in tests
2018-02-12 14:40:47 -07:00
Kim Joar Bekkelund 287c45e162
Use execFile instead of exec when installing deps in build (#16587)
* Clarify lockfile is used for resolution

* Use 'execFile' instead of 'exec'
2018-02-08 00:37:00 +01:00
Kim Joar Bekkelund 43dfbf01dc Babel preset package (#16479)
* [babel-preset] turn into a package

* switch to @kbn namespace

* [babel] pin babel-preset-env to 1.4.0, newer versions don't shim symbols

* [yarn] update lockfile
2018-02-03 12:24:16 -07:00
Kim Joar Bekkelund c8f3efd4ef
Rename @elastic/kbn-build to @kbn/build (#16507) 2018-02-03 12:04:35 +01:00
Kim Joar Bekkelund 136ded978f
Build multiple Kibana packages for production (#16313)
* Build packages before running ESLint on CI

* Add production task to kbn-build

* Ensure packages are bootstrapped before running the build

* Run ESLint on kbn-build
2018-02-02 20:49:57 +01:00
Kim Joar Bekkelund ec62e4f942
Handle licenses for 'private: true' packages (#16480) 2018-02-02 17:01:00 +01:00
Rashmi Kulkarni 7586401cf9
Test for Large number of Fields in Kibana. (#16237)
* test huge data

* new file for testing large number of fields
*  testing large fields
* large_fields_test
* add the unload of es_archiver
* incorporated the changes in kibana.yml
* Revert "incorporated the changes in kibana.yml"
This reverts commit 8682121678.
* cleanup
* code simplification
* removed commented code
2018-02-01 13:27:35 -08:00
Court Ewing 829985d96a
Remove tribe node support (#16397)
* Remove tribe node support

Tribe node is being removed from Elasticsearch since it has been
superseded by Cross-Cluster-Search.

* console: remove unnecessary isEnabled

The default behavior for the plugin is to be disabled when its `enabled`
configuration is set to false, so this custom isEnabled function is not
necessary any longer.
2018-01-30 14:36:38 -05:00
CJ Cenizal 6e9fc7328b
Extract fatal notification into fatalError service, add support for EuiToast notifications (#15749)
* Reorganize notify/lib files. Extract fatal notification into a fatalError service.
* Convert notify/lib tests to use Jest.
* Add ToastNotifications, GlobalToastList, and documentation.
* Remove notify.info method.
* Add createFirstIndexPatternPrompt.
* Update testSubjects.exists to accept a timeout argument.
* Skip some flaky tests.
2018-01-26 20:14:28 -08:00
Kim Joar Bekkelund fa6736f31d
Upgrade license checker (#16147) 2018-01-19 08:49:55 +01:00
Kim Joar Bekkelund 92ea635691
Licenses csv overrides (#16136)
* Actually override licenses when writing csv

* Cleaner overrides

* Remove all the unnecessary overrides
2018-01-18 21:34:34 +01:00
Tyler Smalley 41d905309b
[optimizer] More aggressive chunking of common/vendor code (#15907)
Previously, we were not aggressive in combining common code which resulted in duplicates included in the bundles.

As an example `node_modules/elasticsearch-browser/elasticsearch.angular.js` is present in the following chunks:

* kibana.bundle.js
* dashboardViewer.bundle.js
* apm.bundle.js
* monitoring.bundle.js
* ml.bundle.js
* timelion.bundle.js
* graph.bundle.js

Vendored code (anything inside node_modules) is placed in vendors.bundle.js while everything else with more than two references is placed in commons.bundle.js.

This has a couple positive side-effects (numbers are with x-pack & canvas):

* Decreased build time. Seeing builds go from 475.76 seconds to 274.72.
* Decreased memory overhead. Uses roughly 1/3 the memory overhead.
* Decreased bundle size. A 68% reduction in overall bundle size. Going from 66.16 MB to 21.13 MB.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-01-15 08:15:28 -08:00
Court Ewing 61c7f21111
Remove angular-translate (#13066)
* remove angular translate

* remove angular-translate deps from yarn.lock
2018-01-12 09:13:42 -05:00
Spencer 0fde087ca2 Switch to Yarn (#15485)
* switch to yarn

* cleanup misc references to npm

* [yarn] loosen dependency ranges so yarn will merge more deps

* fix linting error now that moment uses ESM

* [licenses] font-awesome changed the format of its license id

* Use local yarn

* Misc fixes

* eslintignore built yarn file

* Remove mkdir which doesn't do what it should do

* Check build without upgrading lots of versions

* Fix license check

* too many moments

* Better description

* Review fixes

* Lock to angular@1.6.5

* More specific version locks

* Revert "More specific version locks"

This reverts commit 11ef81102e.

* Revert "Lock to angular@1.6.5"

This reverts commit 3ade68c14c.

* rm yarn.lock; yarn

* Forcing a specific version of React, Angular, Moment

* Using vendored version of yarn in ci

* Use --frozen-lockfile

* fixes
2018-01-10 13:23:43 +01:00
Spencer 499f7cec77
[optimizer] run webpack compilation ASAP (no more laziness) (#15795)
* [optimizer] run webpack compilation ASAP (no more laziness)

* [optimize] fix variable reference
2018-01-09 00:46:16 -07:00
Court Ewing 4634aa633b
Revert "[optimizer] More aggressive chunking of common/vendor code (#15816)" (#15878)
This reverts commit 92b373b304.
2018-01-07 09:27:06 -05:00
Tyler Smalley 92b373b304
[optimizer] More aggressive chunking of common/vendor code (#15816)
Previously, we were not aggressive in combining common code which resulted in duplicates included in the bundles.

As an example `node_modules/elasticsearch-browser/elasticsearch.angular.js` is present in the following chunks:

* kibana.bundle.js
* dashboardViewer.bundle.js
* apm.bundle.js
* monitoring.bundle.js
* ml.bundle.js
* timelion.bundle.js
* graph.bundle.js

Vendor code (anything inside Kibana's node_modules) is placed in vendors.bundle.js while everything else with more than two references is placed in commons.bundle.js.

This has a couple positive side-effects (numbers are with x-pack & canvas):

* Decreased build time. Seeing builds go from 475.76 seconds to 274.72.
* Decreased memory overhead. Uses roughly 1/3 the memory overhead.
* Decreased bundle size. A 68% reduction in overall bundle size. Going from 66.16 MB to 21.13 MB.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-01-05 10:05:17 -08:00
CJ Cenizal b0e25a9466
EUI: Reset CSS #2 (#15657)
* Add EUI v0.0.7 as a dependency.
- Add support for using dark theme EUI CSS in Dashboard.
- Set light theme as the default.
- Add comments to chrome.jade about role of theme node.
- Add (WTFPL OR MIT) to acceptable licenses.

* Remove old reset CSS.
- Remove naked element selectors from base.less.
- Remove Bootstrap resets.
- Remove UI Framework reset.
- Remove unused reset styles from UI Framework.

* Fix CSS regressions caused by removal of CSS reset.
- Replace usage of sr-only with euiScreenReaderOnly.
- Apply euiButtonEmpty classes to the 'Add a filter' button.
- Fix Notification padding and layout.
- Apply euiTabs styles to Timepicker mode tabs.
- Fix layout of Available Fields heading in Discover.
- Add padding to Popular Fields container in Discover.
- Push down Selected Fields heading in Discover sidebar.
- Fix appearance of links in Discover sidebar.
- Fix height of pills in Filter Bar.

* Fix timepicker tests.
- Remove kbn-accessible-click from timepicker buttons.

* Fix functional tests.
- Use byCssSelector inside of testSubjects.find.
- Delete flaky view_edit.js test: 'when time changed is stored with dashboard'.
- Delete flaky view_edit.js test: 'and preserves edits on cancel > when time changed is stored with dashboard'.
- Delete flake Gauge Chart tests. EUI changed the font size, and the text within the gauges doesn't render when the window is too small.
2017-12-18 16:43:32 -08:00
archana 36652c2dbc
[CLI] Readable logs on Windows with chalk colors (#15557)
* [colors] try new cli colors

* [colors] try magentaBright instead of magenta

* [colors] try white for log text

* [colors] replace all remaining ansicolors with chalk

* [colors] try yellowBright instead of yellow

* remove ansicolors from package.json

* [tests] attempt to fix tests

* [tests] attempt to fix tests again

* [color] backgrounds, cleanup
2017-12-15 14:35:10 -06:00
Spencer c65da14d7c
[optimizer] extract plugin discovery (#14745)
* [plugins] extract plugin discover from the kibana server

* integrate plugin discovery module with server

* [pluginDiscovery] fully extend config before checking enabled status

* [pluginDiscovery] limit arbitrary defaults in PluginSpec

* [ui/navLink] fix tests

* [ui/injectedVars] fix tests

* [ui/app] fix tests

* [server/plugins] convert init to callPluginHook tests

* [build/verifyTranslations] update verify logic

* [pluginDiscovery] remove rx utils

* fix i18n transaltion key name

* [pluginDiscovery] do kibana version checks as a part of discovery

* [pluginDiscovery/createPacksInDirectory$] clarify error handling

* [eslint] fix lint errors

* [uiApp/modules] ensure load order matches master

* [uiBundle] use known uiExport type for providers

* [uiExports] use the `home` export type

* [uiExports] validate that all uiExport types are known

* [timelion] remove archaic/broken bwc check

* revert some stragler changes

* [pluginSpecs] reformat comments

* [uiBundle] rebel and use more fcb 😬

* correct comment

* [server/waitForPluginsInit] describe queues var

* [server/plugins] prevent multiple calls to next() by using single then()

* [uiApp] remove archaic deprecation warning

* [uiApp] tighten up tests

* [pluginDiscovery/errors] remove $ from symbol var

* [pluginDiscovery/reduceExportSpecs] update docs

* [pluginDiscovery/findPluginSpecs] rightVersion -> isRightVersion

* [pluginDiscovery/findPluginSpecs] fix typos

* [uiApps/getById] use Map() rather than memoize

* save

* [savedObjects/mappings] use uiExports.savedObjectMappings

* [server/mapping/indexMapping] update tests, addRootProperties method removed

* [uiExports] "embeddableHandlers" -> "embeddableFactories"

* [pluginDiscovery] fix pluralization of invalidVersionSpec$

* [pluginDiscover] add README

* [pluginDiscovery/reduceExportSpecs] don't ignore fasly spec values, just undefined

* [ui/exportTypes] use better reducer names

* [ui/uiExports] add README

* fix links

* [pluginDiscovery/readme] expand examples

* [pluginDiscovery/readme] clean up reduceExportSpecs() doc

* [ui/uiExports/readme] cleanup example

* [pluginDiscovery] remove needless use of lodash

* [pluginDiscovery/waitForComplete] use better name

* [pluginDiscovery/findPluginSpecs] use fixtures rather than core_plugins

* [pluginDiscovery/stubSchema] use deafult: false

* [plguinDiscovery/pluginConfig] add tests

* typo

* [uiExports/readme] fix link

* [pluginDiscovery/packAtPath] fail with InvalidPackError if path is not a string

* [pluginDiscovery/packAtPath] rely on error.code to detect missing package.json file

* [pluginDiscovery/packAtPath] only attempt to get pack when observable is subscribed

* [pluginDiscovery/packAtPath] add tests

* [pluginDiscovery/pluginPack] move absolute path checks into fs lib

* [pluginDiscovery/packsInDirectory] fix error type check

* [pluginDiscovery/pluginPack/tests] share some utils

* [pluginDiscovery/packsInDirectory] add tests

* [pluginDiscovery/pluginPack] only cast undefined to array

* [pluginDiscovery/pluginPack] add tests

* [pluginDiscovery/pluginSpec/isVersionCompatible] add tests

* [pluginDiscovery/InvalidPluginError] be less redundant

* [pluginDiscovery/pluginSpec] verify config service is passed to isEnabled()

* [pluginDiscovery/pluginSpec] add tests

* fix "existent" spelling
2017-12-05 18:11:50 -07:00
Spencer f71ec29bd6
[CI] Produce junit test reports (#15281)
* [mocha] use custom reporter for legible results in jenkins

* [jest] use custom result processor for legible results in jenkins

* [karma] enable junit output on CI

* [mocha/junitReporter] accept rootDirectory as configuration

* [jest/reporter] use reporters option added in jest 20

* [toolingLog] remove black/white specific colors

* [dev/mocha/junit] no reason for junit to be a "reporter"

* typos

* [dev/mocha/junit] use else if

* [karma/junit] use string#replace for explicitness

* [junit] use test file path as "classname"

* [ftr/mocha] no longer a "console" specific reporter
2017-12-05 17:29:48 -07:00
Jonathan Budzenski 999911b9a7
[build] Clear the node version used to optimize (#15264) 2017-12-05 13:33:35 -06:00
Jonathan Budzenski 218986c07e
Create separate startup scripts for development and production (#13806)
* Use separate startup scripts for development and production

* build kibana directly

* [build] Use downloaded node when pre-optimizing

* clearer variable name

* Add breaking changes docs
2017-11-22 12:49:37 -06:00
Spencer 90e2aa001b
[savedObjects] Use index template (#14271)
* [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
2017-11-21 17:05:46 -07:00
Jonathan Budzenski ace0173adf
Adds task to export a CSV of all dependencies (#15068)
* Adds task to export a CSV of all dependencies

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Fixes tests and changes argument name to `out`

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Uses csv as argument for output file

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Removes unused columns

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* [license csv] Fetch all licenses by default, add release flag to only generate release dependencies
2017-11-21 10:29:12 -06:00
Spencer 95329c581f
[precommit hook] add dev script (#14890)
* [precommitHook] move to dev script

* [eslint] fix lint error

* [dev/eslint] do simply boolean checks first

* [dev] use shared REPO_ROOT constant

* [dev/File] precompute relative/ext of path

* [dev/eslint] fix relative import

* [dev/eslint] fix typos

* [grunt] remove unused run:eslintStaged config

* [dev/run] only create log if we are going to use it

* [dev/run/isFailError] ensure return value is Boolean

* [dev/precommitHook] use less intermediate vars
2017-11-20 14:22:24 -07:00
CJ Cenizal b0985f9f2c
Add (MIT AND Zlib) to acceptable licenses. (#14985) 2017-11-15 17:12:32 -08:00
Spencer 5cddc10077
Upgrade to eslint 4 (#14862)
* [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 18:16:59 -07:00
Spencer a3014d7a63
[eslint] add eslint dev script (#14889) 2017-11-14 10:11:59 -07:00
Jonathan Budzenski 7c5ccf03fb
[ci] Build docs (#14130)
* [ci] Build docs

* fix context

* remove docs task from jenkins:unit
2017-11-03 13:59:50 -05:00
Spencer f60639fccb
Upgrade to webpack 3 (#14315)
* [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
2017-10-31 16:31:22 -07:00
Jonathan Budzenski 32a74e1ad1
[build] Clean examples from node modules (#14587) 2017-10-31 13:07:01 -05:00
Spencer 3e08a7e765
[flot-charts] move into ui/public (#14669) 2017-10-30 12:43:12 -07:00
Chris Cowan 9c9fb17fef 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:54:45 -07:00
Matt Apperson b423997c46 [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-18 15:45:42 +02:00
Tim Roes 2a145027c1 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:20:06 +02:00
Court Ewing e635d25b26 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:27:47 -04:00
Kim Joar Bekkelund 6a2bb74407 Use Object spread instead of Object.assign where it makes sense (#13903)
* Prefer Object spread

* Add eslint rules for Object spread

* no slice
2017-10-10 14:50:56 +02:00
archana 1fb8c82da7 [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:33:41 -07:00
Spencer e84761217e [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:51:58 -07:00
Jonathan Budzenski e2dbf77a6c [build] Commit generated init scripts (#11205) 2017-09-28 14:55:35 -05:00
Spencer 48d35f81fd 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
2017-09-19 17:44:47 -07:00
Spencer e72a20670d [ftr] remove timestamp prefix, jenkins has it built in now (#13825) 2017-09-14 19:21:56 -07:00
Brandon Kobel 5a4a4f5ad6 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:18:30 -04:00
CJ Cenizal 720297d8da [UI Framework] Reorganize UI Framework and add Yeoman generator (#13172)
* 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 08:48:48 -07:00
Spencer 7e16d19249 [npm] move personal forks into elastic org (#13410) 2017-08-09 12:31:30 -07:00
CJ Cenizal 08719cd863 [UI Framework] Spawn compileCss as a child process to prevent a node-sass fatal error from killing the watch process (#13222)
* Spawn compileCss as a child process to prevent a node-sass fatal error from killing the watch process.
* Document tasks.
2017-08-01 14:11:23 -07:00
Spencer 6748b22d03 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
2017-07-28 09:47:41 -07:00
Court Ewing 8d5eac959f 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.
2017-07-27 14:02:30 -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
Shaunak Kashyap 24b9b229af Testbed for aiding development in Kibana (#11571)
* Initial code for testbed

* Fixing the routing

* Updating README

* Removing unnecessary line

* Fixing port in README

* Remove testbed source code from build
2017-05-08 09:20:27 -07:00
spalger f15477a82c [tasks/ftr] downgrade log level to debug 2017-05-05 15:47:39 -07:00
Spencer e6d3beaee3 [ftr] still trying to debug random remote start failures (#11611) 2017-05-04 23:39:05 -07:00
Spencer f76bef46c0 [ftr] remove digdug, use chromedriver directly (#11558)
* [ftr] remove digdug, use chromedriver directly

why?
 - digdug is meant to be used by intern, and expects a certain lifecycle that the FTR has tried and continuously fails to mimic
 - rather than continue trying to force digdug into the stack, just spawn chromedriver ourselves. We know how to handle it
 - cleans up verbose remote logging while we're in there, since selenium-standalone-server went with digdug, which was previously doing the verbose logging
 - deprecate config.servers.webdriver
 - add config.chromedriver.url
 - if url at config.chromedriver.url points to a server that responds to http requests use it as the chromedriver instance, enables running chrome in a VM or container
 - if pings to config.chromedriver.url fail a local chromedriver is started

* address review requests
2017-05-04 13:27:18 -07:00
CJ Cenizal 1f76e7508e [UI Framework] Add uiFramework:build task. (#11402)
* Add uiFramework:build task.
2017-04-27 11:41:36 -07:00
archana 476031b4ea Run tests against an actual Kibana build (#11237)
* build before running selenium

* change directory into built snapshot

* WIP: what is in the build dir

* WIP: skip unit tests

* run selenium on build

* [functional tests on build] Derive version

* [functional tests on build] Missing folder name prefix

* WIP: debug on ubuntu VM

* WIP: double kibana stabilize timeout

* WIP: remove ubuntu VM debug change

* WIP: add logs for docParams

* WIP: add logs for es

* build release version without -SNAPSHOT-

* [functional test release] Cleanup
2017-04-21 11:08:36 -05:00
Jonathan Budzenski 3a6e68a601 Revert update pleaserun (#11304)
* Revert "Update pleaserun.js to use `--log-directory` with 0.0.28 (#11286)"

This reverts commit e96a8d8273.

* Revert "[jenkins] update call to pleaserun with --log-path (#11275)"

This reverts commit be609d9505.
2017-04-18 10:21:05 -05:00
archana e96a8d8273 Update pleaserun.js to use --log-directory with 0.0.28 (#11286) 2017-04-17 15:19:20 -05:00
archana be609d9505 [jenkins] update call to pleaserun with --log-path (#11275)
* [jenkins] update pleaserun with --log-path for 0.0.28

* [jenkins] update contributing guide pleaserun version
2017-04-17 11:08:06 -05:00
Spencer ea838ec900 [functional_test_runner] fix grunt failure logging (#11172) 2017-04-12 07:52:26 -07:00
Spencer 90434765c0 [functionalTestRunner] replace intern (#10910)
* [functional_test_runner] replace functional testing tools with custom/pluggable solution

* [functional_test_runner] Convert unit tests to commonjs format

* [functional_test_runner] Fix dashboard test in wrong mode

* [functional_test_runner] Add dashboardLandingPage test subject

* [functional_test_runner] Get Visualize page object

* [functional_test_runner] Fix outdated references

* [functional_test_runner] Fix more outdated refs

* [functional_test_runner] Remove duplicate tests

* [functional_test_runner] Improve test readability

* [functional_test_runner] 😞 So many duplicate methods

* [functional_test_runner] Move mgmt `before` outside toplevel describe

* [functional_test_runner] Settings page obj missing methods

* [functional_test_runner] Add improvements from @gammon

* [functional_test_runner] Fix return statements in async funcs

* [functional_test_runner] Move before() to correct scope

* [functional_test_runner] Add after() hooks to remove index patterns

* [functional_test_runner] Attempt to fix vertical bar chart tests

* [functional_test_runner] Clean up

* [functional_test_runner] Reinstate unit tests

* [functional_test_runner] Set default loglevel back to info

* [functional_test_runner] Replace `context`s with `describe`s

* [functional_test_runner] Better error handling

* [functional_test_runner] Add in new Tile Map tests

* Incorporate changes from master

* [functional_test_runner] validate that every test file has a single top-level suite

* Update contributing doc with link to full doc

* [docs] Spelling and grammar fixes

* docs: writing and running functional tests

* [docs] Move plugin doc to plugin area

* [docs] Housekeeping. Doc in wrong place

* [docs] Remove dup doc file

* [grunt] Only run mocha_setup when running tests, not every grunt task
2017-04-11 17:01:06 -05:00
Stacey Gammon 8eb17b330e Refactor table sort properties (#11073)
* Refactor sorting capabilities

* clean up and comments

* Move to ui_framework/services

- add tests
- address code review feedback
- Include new folders in build output.

* Rename to sortableProperties

Require initial sorted property name.

* fix a refactor miss
2017-04-11 12:47:33 -04:00
Kim Joar Bekkelund 90be7e882f Move Jest test setup to root (#10963) 2017-04-05 21:24:01 -04:00
CJ Cenizal b604911720 [UI Framework] Create Button React components in UI Framework. (#10646)
* Create KuiButton, KuiLinkButton, KuiSubmitButton, and KuiButtonIcon React components in UI Framework.
* Add Jest test coverage for UI Framework, generate report in ui_framework/jest/report.
* Add UI Framework to linting task.
* Update UI Framework README with instructions on creating and testing React components.
* Add both React and HTML examples.
* Add UI Framework Jest tests to npm test script. Create separate scripts for watching and generating coverage reports.
* Fix appearance of kuiButtons with icons throughout Kibana, by adding a flexbox wrapper.
* Improve accessibility of kuiButtonIcon.
* Remove disabled attribute from KuiLinkButton.
* Remove kuiButton-isDisabled class from KuiButton and KuiSubmitButton.
2017-03-29 13:25:43 -07:00
Spencer e67790037a [esArchiver] combine elasticDump and ScenarioManager (#10359)
* As a part of bringing functional testing to plugins, esArchiver gives these plugins a way to capture and reload es indexes without needing to write a bunch of custom code. It works similarly to the elasticDump and ScenarioManager tools that it replaces.

Differences:
  - Streaming implementation allows for much larger archives
  - CLI for creating and using archives
  - Configurable archive location
  - Stores the data in gzipped files (better for source control, searching, large archives)
  - Automatically identifies and upgrades Kibana config documents

Methods:
  - `#load(name)`: import an archive
  - `#loadIfNeeded(name)`: import an archive, but skip the documents what belong to any existing index
  - `#unload(name)`: delete the indexes stored in an archive

CLI operations:
  - `./bin/es_archiver save <name> [index patterns...]`: save the mapping and documents in one or more indexes that match the wild-card patterns into an the `<name>` archive
  - `./bin/es_archiver load <name>`: load the mapping and documents from the `<name>` archive

* [functional_tests/common/nagivate] check for statusPage

* [es_archiver] move bins into new scripts dir

* [functional_tests/apps/context] use esArchiver

* [esArchiver] general improvements after showing to a few folks

 - remove auto-upgrading config doc logic (until we have better access to kibana version info)
 - export unload command
 - remove preemptive checks in favor of reacting to errors
 - use type "doc" vs "hit" for doc records (consistency)
 - wrote a bunch of pending tests to think though and plan

* [esArchiver] make log a stream that writes to itself

* [esArchiver] fill in stats and archive format tests

* [esArchiver] splitup action logic

* [esArchiver/cli] fix cli --help output and comment

* [esArchiver] remove type-based param coercion

* [esArchiver/log] use strings for log levels

* [esArchvier] remove unused var

* [esArchiver/indexDocRecordsStream] add tests

* [esArchive] fill in remaining tests

* [esArchiver] fix dem tests

* [eslint] remove unused vars

* [esArchiver/loadIfNeeded] fix call to load()

* [esArchiver] remove loadDumpData helpers
2017-03-27 15:29:14 -04:00
Spencer d8d65526c6 [eslint] enable no undef (#10825)
* [codeshift] add proper ignore comments

* [codeshift] apply require-to-import transform

* [codeshift/fixup] remove duplicate imports

* [eslint] upgrade config for react "unused" support

* [codeshift] apply remove-unused-imports transform

* [codeshift] apply remove-unused-basic-requires transform

* [codeshift] apply remove-unused-function-arguments transform

* [lintroller] fix argument list spacing

* [codeshift] apply remove-unused-basic-bars transform

* [codeshift/fixup] fixup unused basic var removals

* manually apply remove-unused-assignments transform

* [codeshift] reapply remove-unused-imports transform

* [codeshift] reapply remove-unused-function-arguments transform

* [eslint] autofix param spacing

* manually fix remaining no-undef errors

* use more descriptive file ignore pattern

* add eslint-plugin-react peerDependency

* replace values that looked unused in tests

* remove // kibana-jscodeshift-no-babel comment

* remove import statements from code required by api tests

* Remove '// kibana-jscodeshift-ignore' comments

* address review feedback

* remove remnant of removed if condition
2017-03-22 07:08:23 -07:00
Martin Hickey 3aa5938daa Kibana Globalization - Phase 2 (#8766)
* Integrate angular-translate globalization framework with i18n engine
* Provide template for enabling translations in an AngularJS view by translating a view
* Verification tool for translation keys used in angular-translate
* Documentation
2017-03-20 14:09:06 -04:00
Chris Cowan a38ae49884 Moving front-end code out of devDependencies (#10670)
* Moving front-end code out of devDependencies

* removing range specifier

* overriding ua-parser-js@0.7.12 to MIT

* upgrading react-color; upgrading react; upgrading pui-tooltip;
2017-03-03 09:13:46 -07:00
Jonathan Budzenski e1b677ac9f [build] Add notice file (#10344)
* [build] Add notice file

* [build] Include license text if available

* [build] Look for both license and notice files

* [build] Add node license to notice

* [build] Add a base notice file including info on committed dependencies

* Bump license copyright year

* [build] Kibana at top of notice
2017-02-16 11:41:09 -05:00
Richard Hoffman 8b4c052889 babel 6 upgrade (#9702)
* [npm] upgrade babel

The upgrade to babel 6 requires an upgrade to all of the associated modules, which meant that a few other things changed at the same time. The most notable is the way that we handle our babel-options, which is now done with an npm module and includes using the babel-loader's "presets" query string param.

This meant changes to the babel_options.js module and extending it to help setting up the "babel-register" module, which was previously copy-pasted in several places.

* [mtodules] upgrade to support babel6 module semantics

* [eslint] fix lint errors

* [babel] ignoer massive fixture files

* [cli/errors] use Object.setPrototypeOf since subclassing Error is broken

* [babel] Upgrading core babel libraries

[babel] Use WIP babel-6-fix branch of babel-preset-kibana

* Fix broken test

* [babel] Reverse unnecessary module.exports changes

* Fix notifier

* Use babel presets and plugins directly

* [babel/options] resolve preset/plugins paths for better plugin compatibility

* [babel/options] use babel-preset-env for correct node settings

* [babel] cache babel compilation in webpack like we thought we were
2017-02-09 14:48:55 -07:00