* [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
- 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
* 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
* 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
* [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
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.
* [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
* [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
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.
* [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
* Initial code for testbed
* Fixing the routing
* Updating README
* Removing unnecessary line
* Fixing port in README
* Remove testbed source code from build
* [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
* 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
* 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.
* [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
* 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
* 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.
* 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
* 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
* 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;
* [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
* [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
- Make table-layout use the default, instead of fixed.
- Fix flexbox bug with ToolBar.
- Update ui_framework task to serve on port 8020.
- Add babel-core/polyfill to UI Framework docs site.
Remove libsass as a dependency
libsass is platform specific, therefore we can not ship it as a dependency. Instead, we will commit the compiled CSS for the UI Framework to the repository. This is updated when running `npm run uiFramework:start` which also starts the docs site.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Adds support for Tribe nodes
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* @spalger review feedback
* Close create{Admin,Data}Cluster handles closing the connection
* Remove callAsKibanaUser argument from tests
* ClientLogger uses ES6 properties for tags and logQueries
* Ensure were destructuring cluster to access callAsKibanaUser
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [tribe] Use class syntax on new data sources
* [tribe] Use includes instead of indexOf in call_client
* [tribe] DocRequest --> AbstractDocRequest
* [tribe] Fix AbstractDoc test rename
* Removes factory objects and adds addClientPlugin to Cluster (#9467)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Resolves eslint error
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Use properties on the instance instead of class properties
Class properties are still in the very eary stages and not widely supported.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [tribe] Remove disabled dev tools app, do not bundle console when tribe is enabled
* [tribe] Use destructuring, don't reassign args
* [tribe] Use class syntax for client request wrapper
* [tribe] callAsKibanaUser -> callWithInternalUser
* [tribe] Remove clients from module context, service is a singleton
* [tribe] Use instance property shorthand for admin and data DocRequests
* Removes questions
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Fixes typo in tests
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Correctly names test case
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Revert "Use properties on the instance instead of class properties"
This reverts commit ebd06ae591.
* Adds tests for create_{admin,data}_cluster
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Persists clusters to server
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [tribe] Move cluster config requests to distinct getters
* Adds getClient and removes addClientPlugin
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Expose createClient, consolidate config parsing
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Removes createClients from Cluster
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Prevent status change from red to red
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Updates esvm:tribe ports to be consistant with dev
9200 is admin
9201:9202 are both data clusters
9203 is a tribe node connecting to both data clusters
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [tribe] Get ssl.ca from serverConfig
* [tribe/esvm] Remove plugin configuration
* Removes unused variable
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [tribe] Named exports for creating clusters
* [tribe] Named exports for client logger, cluster
* [tribe] Named exports for health check
* Remove invalid comment
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [tribe] Comment explaining difference between admin and data browser clients
* Rename ES checks to be consistant with functionality
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Organize NOOP functions
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Removing function comments
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Explicitly check for presence of url in tribe
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* [grunt/eslint] fix precommit linting
- remove use of `minimatch.makeRe()` because it does not support the entire glob syntax
- log a warning whenever a js file is excluded by the `lintStagedFiles` task
- eslint globs are relative to the project root, ensure that we check against relative version
* [grunt/eslint] only log warning wtr grunt paths
* Add low level i18n plugin
Manages languages that are available and is responsible for loading translated
content at the granularity of a plugin.
To be done:
- APIs for store and retrieval
* Use Kibana install as root for the translation store directory
Setting the path for storing the bundled language translation files to
<KIBANA_INSTALL>/data/store_translations/<PLUGIN_NAME>
* Updated i18n core plugin APIs to be asynchronous
To be done:
- Better error handling in APIs
- Fix threading issue with storePluginLanguageTranslations API
* Fix thread synchroization issue in storePluginLanguageTranslations
* Update error handling in i18n core plugin
* Change to use NodeJS mkdirp function for creating directories recursively
Updates with review comments from @srl295. Changed export syntax to show the
exported functions at end of file.
* Add REST API for getting translations of a language for a plugin
To be done:
- Add algorithm to decide on the language for a plugin by comparing the accept languages
from the REST call and the plugin supported languages
- Add REST API tests
* Add algorithm for determining plugin language when retrieving translations
Client would pass languages used in the 'accept-language' header. These
languages would then be compared against the plugin supported languages
and best compared language would be selected.
To be done:
- Add REST API tests
* Add API to return all registered plugin language translations
* Add HAPI API to get all plugins translation files
* Update register translations API to be independent of plugin name and language
The register API is updated to be independent of plugin name and language. The API will now
traverse the path given and create language bundles as per language files it traverses.
The translations files structure has also been simplified to be just key/value objects.
To be done:
- Add hapi API to get translations
- Extend the API tests to test responses
* Update API test
* Add eslint fix for API test
* Update with review comments
From review https://github.com/elastic/kibana/pull/7545#issuecomment-231147435
following comments updated:
- README, .gitignore, and .eslintrc are not needed in a core plugin
- package.json only needs name and version
- unit tests need to go in a tests directory otherwise they won't get picked up
by the grunt tasks. Also our convention is to name the test file with the same
name as the module it's testing (so i18n_tests.js should just be i18n.js)
- For consistency with the rest of the code base, rename the data directory to fixtures.
- Prefer const (or let if necessary). Don't use var.
- Use ES6 imports/exports rather than commonjs style
- Only export the i18n module's public API. For instance, I don't think getPluginTranslationDetails is used outside of the i18n module, so it shouldn't be exposed publicly. If you want to expose it for testing purposes, I would recommend creating an i18n directory with an index.js file that exports the module's public API, and a separate i18n.js file with the "private" API. index.js will be for public use, i18n.js will be for private internal use.
* Update after review comments
From review (https://github.com/elastic/kibana/pull/7545#issuecomment-231884490):
- i18n module API should return promises for async operations instead of using
callbacks
- All filesystem access should be async
- Unit tests need to be updated based on new proposed plugin structure
(single language file, not split by view)
From design (https://github.com/elastic/kibana/issues/6515#issuecomment-231400097):
- Removed API as will consider in later phase
TODO:
- Make write function async
* Update after review comments
Updated write function to be asynchronous
* Update registerTranslations API to take absolute translation file as argument
The API originally took the directory as the argument but following reviews it
was decided to change to absolute file because it will be less brittle
since it is more explicit.
* Translate the Kibana welcome message
Translates the start-up message (“Kibana is loading ...”)in the Jade template.
To be done:
- Means to register the core plugin translations. They are currently added
in the fixtures directory as static files. Need to be generated on the fly.
* Add build task to generate core plugin translations
Task which calls registerTranslations API and then a task which copies the
regsitered translations to <kibana_root>/build/kibana
* Add hook to optimize module to add registration during dev startup
Registration of the core plugin translations during development start of
Kibana server. The translations include the welcome message and server error
startup message.
* Handle scenario when the user preferred language header is not passed
The UI when loading asks i18n plugin which language translation to use
depending on the user preferred language header 'accept-language'.
This commit is to handle scenario where header is not passed. The algorithm
then chooses the default language.
* Replace registering of translations at plugin install time to the plugin init phase
This change follows review comments in:
https://github.com/elastic/kibana/issues/6515#issuecomment-236237218
* Update after review comments
Comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72890673
- https://github.com/elastic/kibana/pull/7545#discussion-diff-72894762
* Update after plugin folder layout changes in Kibana
This require to use <kibana_root>/data for registered translations
and i18n plugin moved to core_plugins from plugins.
Refer to PR for more details:
https://github.com/elastic/kibana/pull/7562
* Update translation registration to file path rather than bundling
After review discussions it was agreed to just register the absolute paths
to translation files rather than bundling each file into one central file
at registration.
* Update review comments
This commit contains the following review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661282
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74661392
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74662271
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74663235
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669201
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669269
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669419
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669628
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74799382
* Update review comments
The following review comments are included in the commit:
- https://github.com/elastic/kibana/pull/7545#discussion_r74663515
- https://github.com/elastic/kibana/pull/7545#discussion_r74666995
- https://github.com/elastic/kibana/pull/7545#discussion_r74805552
* Expose the i18n APIs in the server object for plugin access
Plugins should call the i18n plugin APIs through the server object
and not directly from the module.
This closes he following comments:
- https://github.com/elastic/kibana/pull/7545#discussion_r74662598
- https://github.com/elastic/kibana/pull/7545#discussion_r74669327
- https://github.com/elastic/kibana/pull/7545#discussion_r74669765
* Update accept-language-parser module to 1.2.0
Module version 1.2.0 fixes issue:
https://github.com/opentable/accept-language-parser/issues/8
This commit updates review comments:
https://github.com/elastic/kibana/pull/7545#discussion-diff-75525214https://github.com/elastic/kibana/pull/7545#issuecomment-240290461
* Add i18n default locale as a configurable item
Adds 'defaultLocale' configurable item to the i18n plugin configuration.
The default locale is used for translations if the locale specified by user
is not supported.
This commit satisfies the review comment:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74669970
* Move UI i18n wrapper functionality into a module
This commit better structures the i18n capability so that it can be called
in UI code in a clearly defined fashion with minimum code. It also fixes
potential race conditions.
This commit updates review comments:
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74804791
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74801802
- https://github.com/elastic/kibana/pull/7545#discussion-diff-74670457
* Fill any missing translations using translations from default locale
The default language translations are loaded and are compared against the selected
language translations. The comparison can then highlight any missing translation
keys and can load the default translations keys as needed. This helps to unsure
where possible that a translation string is available in most scenarios even if not
in the locale requested.
This commit resolves review comments:
- https://github.com/elastic/kibana/pull/7545#issuecomment-239202583
- https://github.com/elastic/kibana/pull/7545#issuecomment-239203734
* Add unit tests for the i18n UI wrapper functions
* Fix issues after rebase with master
* Add translation keys verification tool
This tool helps to check that translation keys are translated. This tool can be
used for non-angular translation constructs like the Jade templates.
* Updates after review comments
Updates for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-3748114
* Update after review comments
Update for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-3937958
To be done:
- Update of unit tests for UI and server
- Call of verify translations
* Update unit tests after review changes
There was a number of changes to the i18n module and the ui i18n wrapper
following review comments. This commit is to update the unit tests with
respect.
* Add build task for verify translations
* Update the kibana i18n IDs to be prefixed with kibana
* Update verify translations to test registered translations
It was testing the static translation files. It is now updated to
test the translations registered when Kibana server is started and
the plugins have initialized.
* Update after review comments
Updates following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-5529711
* Update after review
This commit contain updates after the following review:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-5707951
* Updates after review
Updates for review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-6656571
* Update after review
Updates for the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-6911265
* Update after review
Updates after the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-7084765
* Update unit tests to use expect throwError
* Update after rebase with master
Loading message changed following merge of commit
26c53e8a8d (diff-e25d7fee746a4f249e17f87c02fd95f8R55)
This required update to the welcome message and how it is called.
* Update following review
Updated the following review comments:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9297662
* Update the algorithm to return the locale
The algorithm to return which locale to use for translations based on the user
locale list and the regsitered locales is updated in this commit. The algorithm
previously did an exact match on all the user locales first before (by priority)
then checking for best case match. The algorithm is now modified to check each
user locale starting with the highest priority first for an exact match and then
for best case match. If no match it then moves to the next user locale with
the next highest priority. This is to follow the priority list that a user
browser is configured for where there maybe a locale translation available
but might not be the exact match with regard to the locale code and/or script.
An example of this is that the highest priority locale of the user is 'en-US'
but the locale translation available is 'en'. It is better select the 'en'
locale rather than select the next highest locale which is an exact match.
* Update after review comments
Updates after the following reviews:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-9785665https://github.com/elastic/kibana/pull/7545#pullrequestreview-9786404
* Fix after merge with master
Change in the flo and layout of ui index meant that acceptLanguages were not
being passed. This commit is an update to fix this so that the welcome
messages are loaded.
* Update after review comments
This commit is for updates after the following review:
https://github.com/elastic/kibana/pull/7545#pullrequestreview-10435175
* Fix issue when unit test run in CI as core translations are registered
When unit tests are run on a test server (like in the CI), it will start
Kibana server and register the core translations. This means that the i18n
unit tests need to be able to store the existing registration prior to
testing and replace after testing.
* [server/ui] move i18n into ui module
* [server/ui] restore renderApp() method signature
* [server/ui] unify i18n logic in UiI18n class
* [server] move translation files into "translations" dir
* Update i18n module to loaded by multiple server instances within the one process
* Update i18n module to a class
Moving the i18n module into a class so as to encapsulate the registered
translations which means there can be different and distinct instances per process.
This is to accomodate the user case where there might be multiple Kibana server
instances in a process and the localization should be at the server level.
* Identify private members in a class with underscore-prefix convention
* Remove redundant translation from core translation file
Message starting with 'Give me a moment...' is no longer part of loading
message folowing a rebase with master.
* [ui/i18n] reject translations files that do not use absolute paths
* Update config item locale to defaultLocale
* Update after review comments
- Update after following review: https://github.com/elastic/kibana/pull/7545#pullrequestreview-12775161
- Also, fix syntax mess following rebase with master of src/optimize/index.js
* Fix rebase with master error
* Add task for verifying translations in CI
* Fix lint errors
* [uiFramework] include sass deps in production so we can rebuild
* [build] do not copy the doc_site source into the final build
* [licenses] allow code that uses the `Unlicense`
* upgrade eslint, all related deps, and config files
* replace gruntify-eslint with basic eslint-cli wrapper
* arrow-IIFEs must be invoked outside of the parens
* move import statements before their use
* reindent to satisfy new indentation check algorithm
* place missing semicolon
* ignore copy-pasted decode geohash code
* [grunt/eslint] fix argument spacing
* [gurnt/eslint] add comment about contents of report
* [grunt/tasks] use `export default`
The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.
* Update PageObjects for Visualize, Dashboard, and Discover to use data-test-subj selectors for menu items.
* Run checkPlugins task as part of test:ui:runner task.
While working on some functional tests I had to re-run the `test:ui:server` task several times to rebuild the front-end assets. I'm not sure why that should be necessary, so this updates the server used in that specific task to auto-rebuild the assets.
The tests in master are currently failing regularly because our current browser tests are serious memory hogs. Investigation reveals that nearly every test is retaining all of the memory it causes to be allocated. We have made some progress to being able to diagnose the problems, but we expect that problem to take some serious work to fix. We need a short-term solution though, and this is it.
Rather than modify the bundling process, we will shard the top-level test suites by name. For now, we've created 4 shards, but adding new shards is trivial if we need to.
Sharding is accomplished by creating a murmur3 hash of the top level suite names, then bucketing based on the hash output. If a test suite resolves to shard2, but we are running shard1, we simply never pass the function to `mocha.describe()`. Rather than redefine every describe statement, we have shimmed the global `window.describe()` function to accomplish this.
Currently, `npm start` and `npm run test:dev` use the same webpack "working directory". This allows them to share assets, which seems great, but when webpack writes it's record-keeping files to disk it can lead to difficult to debug "Property call of undefined is not a function" errors. By writing it's optimization output to a different directory we prevent those collisions so that both the test server and the dev server can be run side-by-side
This is a manual revert of 28aa6c9, which is not very useful with the
new build tasks, completely brittle, and a flawed idea from the start. I
regret having written it.
We do not release zip archives for any operating system except windows,
and we do not release tar.gz archives for windows. For consistency and
clarity sake, we'll explicitly list the architecture (x86) of the
windows build as well.
- Now you'll see a path of the parent dependencies when a dependency fails to licenses task, so you can identify the offending root dependency.
- ES2015ify the licenses task.
Production builds should never be published directly from a local
machine. Instead, the release command will now publish to a
commit-specific staging URL, so you use it to publish a release
candidate, and then when those builds have been verified, you need to
copy the RC builds from on the staging location on s3 to the production
folder.
These changes are necessary for Kibana to be compatible with Elastic's
unified release process from 5.0 onward. The way artifacts get created
has not changed, but the naming conventions have.
The target directory is created by the archives task, but it is not
created by the ospackages task, so if you do not have a target
directory and try to skip archives, the build will fail.
- Add 'test:visualRegression' grunt task.
- Run 'test:visualRegression' as part of npm script 'test'.
- Add 'clean:screenshots task'.
- Clean screenshots/session when funtional tests are run.
The default behavior of the build task is to now apply the -snapshot
suffix dynamically rather than us manually hardcoding and managing it
within the source code itself. The `--release` flag will drop the
-snapshot suffix on a build, which should be used for any release
candidate.
The default behavior of the build task has also changed to create
rpm/deb packages as well. Since we've only confirmed that this works on
linux, you can override that behavior by passing `skip-os-packages`.
If you do not want to create any zip or tar.gz archives, you can pass
`--skip-archives`.
This is useful for when a pre-release build is completely tested and
could be released as-is if it weren't for the pre-release suffix and
commit hash. It will extract the archives in the target, replace the
version, sha, and build numbers with the current working copy's, and
then recreate the archives and shas.
V8 will not trigger a full mark-sweep & mark-compact until there is memory pressure for the max-old-space-size, which is 1.6GB on a 64bit system. This means that Kibana will, at times, consume over 1.6GB of RSS memory.
Bypassing this can be done by starting with `--dev` or explicitally setting `max-old-space-size`. For example: `NODE_OPTIONS="--max-old-space-size=1024" ./bin/kibana`
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
In 180aacd470 a "pathsToIngore" filter was introduced that didn't work properly and caused all paths to be ignored. This behavior was likely intended to prevent snake_case filename checking on files in the webpackShims directory but that is being properly handled by [check_added_filename](8f9ec7d932/tasks/check_added_filenames.js (L11)).
.rej are the byproduct of failed patches via git-apply or artifacts of
the backporting process through jasper. Any build that has them should
be rejected early.
with https://github.com/elastic/kibana/pull/5553 we added command line flags the told mocha it was supposed to use babel. This changes the strategy here and instead uses mocha's -r option (and it's mocha.opts file to specify it). This means that using mocha directly from the command line still works, and that we have a place where we can do other setup work.