Commit graph

844 commits

Author SHA1 Message Date
Jenkins CI bc5b51554d Migrate x-pack-kibana source to kibana 2018-04-24 13:49:26 -07:00
Spencer 383d590cb3
[grunt] remove .rej file check (#17805) (#17806)
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-20 02:26:25 -07:00
Spencer 7621b410f9
[6.x] Move to Yarn 1.6.0 (#17741) (#17749) 2018-04-17 10:35:22 -07:00
Aleh Zasypkin 2fe8a8c099
[kbn/pm] Get rid of --skip-kibana in favour of --exclude kibana. (#17686) 2018-04-12 21:57:03 +02:00
archana a03e37cb9c
[CLI] Readable logs on Windows with chalk colors (#15557) (#17636)
* [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

* [color] update yarn.lock
2018-04-10 10:57:56 -05:00
Spencer a16fa8422e
[6.x] Using Jest on all tests in src/server (#16373) (#17553)
* 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 16:13:01 -07:00
Spencer af79bdb5fc
[6.x] Add/generate/verify NOTICE.txt file (#17504) (#17550)
* [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 11:52:58 -07:00
Spencer c462488853
[licenses] resolve license for private:true packages (#17537) (#17547)
* [licenses] resolve license for private:true packages

* [licenses] remove outdated test

* [licenses] fix test
2018-04-04 09:35:30 -07:00
Jen Huang c0b715dde7
Add aria-label attributes to indexed fields table, and use EuiIconTip (#17427) (#17436)
* 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 11:26:43 -07:00
Rashmi Kulkarni 54f3a803a8
Large fileds 6.x (#17404)
* adding large_string_test (#17312)

* adding large_string_test

* removed a failing test, modified the existing one

* new line at the end of mappings.json

* removed the data.json file and also removed the navigateTo() and clickKibanaIndices() as createIndexPattern() takes care of it

* more modifications

* 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-03-26 13:29:39 -07:00
Tyler Smalley ffd2fe83e3
[kbn-es] Package for managing Elasticsearch during dev and testing (#17168) (#17273)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-21 17:48:49 -07:00
Lukas Olson 12246483d6 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:56:18 -07:00
Spencer 3ba95d2bff
[yarn] upgrade sha.js pre-emptively due to license changes (#17292) (#17293) 2018-03-20 16:32:33 -07:00
Tyler Smalley 9f16b6af66 Adds additional CC licenses (#16969)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-16 16:41:25 -07:00
Jonathan Budzenski 209c4df1c0
[build] Turn on optimizeBuild logging (#16205) 2018-03-15 12:34:49 -05:00
archana aa81248d5a 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-15 01:59:22 -05:00
Spencer 2013bb986d
[@kbn/ui-framework] move ui-framework to a package (#17085) (#17128)
* [@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 12:54:05 -07:00
Kim Joar Bekkelund 1429347c97
[kbn-pm] Include Kibana's transitive _projects_ in build (#16813) (#17097) 2018-03-12 12:01:11 +01:00
Jonathan Budzenski 1def6ed78f
[6.x][license csv report] Support directory flag (#17075)
* [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:39 -06:00
Kim Joar Bekkelund d346ebae54
Move running projects tests into Grunt task (#16946) (#17063) 2018-03-09 16:00:49 +01:00
Aleh Zasypkin 1ee793c633
[6.x] Introduce Jest integration tests. (#16830) 2018-02-20 23:02:29 +01:00
Spencer 2197cdab12
[kbn-pm] rename from kbn-build (#16739) (#16742) 2018-02-14 11:51:40 -07:00
Kim Joar Bekkelund 352966720e
Production package example: datemath (#16531) (#16719) 2018-02-13 23:58:49 +01:00
CJ Cenizal 358d0d82bb
Add test-subj-selector module to packages dir. (#16623) (#16709)
* 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 12:56:25 -08:00
Spencer acd74a2b6b
[6.x] Condense build task (#16687) (#16689)
* [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 17:46:12 -07:00
Kim Joar Bekkelund 6e393901cf
Use execFile instead of exec when installing deps in build (#16587) (#16589)
* Clarify lockfile is used for resolution

* Use 'execFile' instead of 'exec'
2018-02-08 09:00:57 +01:00
Spencer 73ad7e0545
[6.x] Babel preset package (#16479) (#16511)
* [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-05 08:49:10 -07:00
Kim Joar Bekkelund 20d8d8c15d
Rename @elastic/kbn-build to @kbn/build (#16507) (#16508) 2018-02-03 13:39:40 +01:00
Kim Joar Bekkelund 96d8995315
Build multiple Kibana packages for production (#16313) (#16496)
* 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 22:47:18 +01:00
Kim Joar Bekkelund c9b602b395
Handle licenses for 'private: true' packages (#16480) (#16494) 2018-02-02 21:55:34 +01:00
CJ Cenizal 7bd9876453
Extract fatal notification into fatalError service, add support for EuiToast notifications (#15749) (#16330)
* 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-27 18:00:51 -08:00
Court Ewing 9f76635fdf
Remove angular-translate (#13066) (#16015)
* remove angular translate

* remove angular-translate deps from yarn.lock
2018-01-27 10:47:35 -08:00
Kim Joar Bekkelund 9c38fae1e2
Upgrade license checker (#16147) (#16149) 2018-01-19 09:46:46 +01:00
Kim Joar Bekkelund 9b3524d5a7
Licenses csv overrides (#16136) (#16138)
* Actually override licenses when writing csv

* Cleaner overrides

* Remove all the unnecessary overrides
2018-01-18 22:42:44 +01:00
Tyler Smalley 1a79309a2e
[optimizer] More aggressive chunking of common/vendor code (#15907) (#16051)
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 12:38:19 -08:00
Kim Joar Bekkelund a817517574
[6.x] Switch to Yarn (#15485) (#15955)
* 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

* Update lockfile
2018-01-10 16:54:20 +01:00
Spencer ccb794980a
[6.x] [optimizer] run webpack compilation ASAP (no more laziness) (#15795) (#15917)
* [optimizer] run webpack compilation ASAP (no more laziness)

* [optimize] fix variable reference
2018-01-09 10:09:44 -07:00
Court Ewing 73eced9e52
Revert "[optimizer] More aggressive chunking of common/vendor code (#15816)" (#15878) (#15879)
This reverts commit 92b373b304.
2018-01-07 09:31:15 -05:00
Tyler Smalley 303f98a25a [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:13:06 -08:00
CJ Cenizal d67d6206e6
EUI: Reset CSS #2 (#15657) (#15676)
* 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 17:39:06 -08:00
Spencer ea0139b56a
[6.x] [optimizer] extract plugin discovery (#14745) (#15443)
* [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

* [server/rootRedirect] fix root_redirect view location
2017-12-05 19:40:24 -07:00
Spencer b4bd640a17
[6.x] [CI] Produce junit test reports (#15281) (#15437)
* [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 18:21:38 -07:00
Spencer 466fb4b010
[6.x] [savedObjects] Use index template (#14271) (#15103)
* [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 18:26:29 -07:00
Jonathan Budzenski a492c01fcd
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:30:52 -06:00
Spencer 09e582f82d
[6.x] [precommit hook] add dev script (#14890) (#15065)
* [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 17:00:37 -07:00
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