-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init I18n before Notifications start #23902
Conversation
…ialized in CoreSystem
src/core/public/core_system.ts
Outdated
const injectedMetadata = this.injectedMetadata.start(); | ||
this.i18nService.start({ injectedMetadata }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialization of i18n engine should be before Notifications start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't need src/ui/public/chrome/api/translations.js
anymore, can you please remove it (including its usage in src/ui/public/chrome/chrome.js
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I believe usage of i18n.init
in src/ui/ui_render/bootstrap/app_bootstrap.js
(and hence usage of await server.getUiTranslations()
in src/ui/ui_render/ui_render_mixin.js
) isn't not needed anymore as well. Can you please double check and remove everything redundant where possible? With this we'll have just 2 places where we init i18n
- one for server and one for client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azasypkin sure.
Done.
src/core/public/i18n/i18n_service.ts
Outdated
injectedMetadata: InjectedMetadataStartContract; | ||
} | ||
export class I18nService { | ||
public start({ injectedMetadata }: Deps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method isn't actually a start method, but I named as start
to be consistent with other services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe at some point we'll do more than just i18n.init
, so I'm +1 for consistency.
@@ -28,7 +27,4 @@ import { | |||
uiModules.get('i18n') | |||
.provider('i18n', I18nProvider) | |||
.filter('i18n', i18nFilter) | |||
.directive('i18nId', i18nDirective) | |||
.config((i18nProvider) => { | |||
i18nProvider.init(metadata.translations); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed initialization of i18n
from here, because it will be already initialized at very beginning of loading application (https://github.com/elastic/kibana/pull/23902/files#diff-ac3204e754680bbed67c8193da8cc11bR103)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a bunch of nits here and there.
@spalger could you please let us know if this PR looks good to you (it touches CoreSystem)?
packages/kbn-i18n/src/index.ts
Outdated
@@ -22,3 +22,4 @@ import * as loader from './loader'; | |||
|
|||
export const i18n = i18nCore; | |||
export const i18nLoader = loader; | |||
export { PlainMessages } from './messages'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: We'll eventually rename PlainMessages
to something that is clearer in one of the upcoming PRs (I believe there is one is ready for review already).
src/core/public/i18n/i18n_service.ts
Outdated
injectedMetadata: InjectedMetadataStartContract; | ||
} | ||
export class I18nService { | ||
public start({ injectedMetadata }: Deps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe at some point we'll do more than just i18n.init
, so I'm +1 for consistency.
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
const mockI18n = jest.fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: same nit about new lines here as well, + new line before beforeEach
, it
etc.
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
const mockI18n = jest.fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe mockI18nInit
to make it clearer what we actually mock.
const i18nService = new I18nService(); | ||
expect(mockI18n).not.toHaveBeenCalled(); | ||
i18nService.start({ injectedMetadata }); | ||
expect(mockI18n.mock.calls).toMatchSnapshot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for such small snapshots I'd better use toMatchInlineSnapshot
or even better something like this:
expect(mockI18nInit).toHaveBeenCalledTimes(1);
expect(mockI18nInit).toHaveBeenCalledWith(translations);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, done.
src/core/public/core_system.ts
Outdated
const injectedMetadata = this.injectedMetadata.start(); | ||
this.i18nService.start({ injectedMetadata }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't need src/ui/public/chrome/api/translations.js
anymore, can you please remove it (including its usage in src/ui/public/chrome/chrome.js
)?
src/core/public/core_system.ts
Outdated
const injectedMetadata = this.injectedMetadata.start(); | ||
this.i18nService.start({ injectedMetadata }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I believe usage of i18n.init
in src/ui/ui_render/bootstrap/app_bootstrap.js
(and hence usage of await server.getUiTranslations()
in src/ui/ui_render/ui_render_mixin.js
) isn't not needed anymore as well. Can you please double check and remove everything redundant where possible? With this we'll have just 2 places where we init i18n
- one for server and one for client.
…pBootstrap were changed
💚 Build Succeeded |
src/core/public/i18n/i18n_service.ts
Outdated
|
||
export class I18nService { | ||
public start({ injectedMetadata }: Deps) { | ||
i18n.init(injectedMetadata.getLegacyMetadata().translations); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a while to track this down and figure out how everything was taking advantage of the translations without consuming the new platform at all, turns out it's because we are just using new platform constructs to store the translations in @kbn/i18n
module. Based on this I don't think the I18nService
is necessary, and I don't really think this does what we want for the new platform.
I'm down to move this to the new platform, but if we are going to do that then we should be instantiating something that will wrap the translations
, and exposing that on the I18nService
start contract, not by caching the state in @kbn/i18n
.
In order to address https://github.com/elastic/kibana/pull/23603/files#r225105739 all we would really need to do is move the call to i18n.init()
out of an angular .config()
function, and we can just do that by adding it to src/ui/public/i18n/index.js
for now until we want to move @kbn/i18n
fully to the new platform:
diff --git a/src/ui/public/chrome/chrome.js b/src/ui/public/chrome/chrome.js
index cfae977feb..fe0cc3011f 100644
--- a/src/ui/public/chrome/chrome.js
+++ b/src/ui/public/chrome/chrome.js
@@ -21,6 +21,7 @@ import _ from 'lodash';
import angular from 'angular';
import { metadata } from '../metadata';
+import '../i18n';
import '../state_management/global_state';
import '../config';
import '../notify';
diff --git a/src/ui/public/i18n/index.js b/src/ui/public/i18n/index.js
index 5def86410e..1f4b435f61 100644
--- a/src/ui/public/i18n/index.js
+++ b/src/ui/public/i18n/index.js
@@ -18,12 +18,16 @@
*/
import { uiModules } from 'ui/modules';
+import { metadata } from 'ui/metadata';
+import { i18n } from '@kbn/i18n';
import {
I18nProvider,
i18nFilter,
i18nDirective,
} from '@kbn/i18n/angular';
+i18n.init(metadata.translations);
+
uiModules.get('i18n')
.provider('i18n', I18nProvider)
.filter('i18n', i18nFilter)
(or something like that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spalger The main reason for this PR is that Notifications template is rendered earlier than i18n
is initialized with specified locale.
It's important because to make labels, passing in Notifications, translatable we should wrap Notifications template by I18nProvider
https://github.com/elastic/kibana/pull/22757/files#diff-53c9b70520405921f846a26c104aeb23R40 which is used to setup the i18n context for a tree. And in the case when we setup the locale in src/ui/public/i18n/index.js
, the i18n context for Notifications will be defined with a default locale not counting the data specified in src/ui/public/i18n/index.js
.
Here the order of files loading:
That's why I placed i18n
initialization just before Notifications template is rendered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I didn't see that we were going to start consuming <I18nProvider />
from the new platform. In that case, can we just move the init() call to the entry file so it's initialized before any other code is run? I just don't want to have an i18n service in the new platform unless it's useful, and I don't think this version is really there.
diff --git a/src/ui/ui_bundles/app_entry_template.js b/src/ui/ui_bundles/app_entry_template.js
index 764e70eaa1..a74ef61848 100644
--- a/src/ui/ui_bundles/app_entry_template.js
+++ b/src/ui/ui_bundles/app_entry_template.js
@@ -33,10 +33,15 @@ import 'whatwg-fetch';
import 'abortcontroller-polyfill';
import 'childnode-remove-polyfill';
+import { i18n } from '@kbn/i18n';
import { CoreSystem } from '__kibanaCore__'
+const injectedMetadata = JSON.parse(document.querySelector('kbn-injected-metadata').getAttribute('data'));
+i18n.init(injectedMetadata.legacyMetadata.translations);
+
new CoreSystem({
- injectedMetadata: JSON.parse(document.querySelector('kbn-injected-metadata').getAttribute('data')),
+ injectedMetadata: injectedMetadata,
rootDomElement: document.body,
requireLegacyFiles: () => {
${bundle.getRequires().join('\n ')}
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I don't have any translations to test, but the logic looks good!
@spalger I've checked this code with translations. |
* Init I18n before Notifications start * Remove i18n initialization in AngularJS since it will be already initialized in CoreSystem * Remove unused translationsApi * Remove redundant i18n.init invocation * Remove i18n tests since i18n.init was removed and input params for AppBootstrap were changed * Move i18n initialization to the entry file.
* Init I18n before Notifications start * Remove i18n initialization in AngularJS since it will be already initialized in CoreSystem * Remove unused translationsApi * Remove redundant i18n.init invocation * Remove i18n tests since i18n.init was removed and input params for AppBootstrap were changed * Move i18n initialization to the entry file.
commit 7739410 Author: markharwood <markharwood@gmail.com> Date: Mon Oct 22 09:30:16 2018 +0100 Graph fix: Remove “step” property which makes values other than 1, 1001, 2001 etc illegal (elastic#23610) Closes elastic#22054 commit 3ca2231 Author: markharwood <markharwood@gmail.com> Date: Mon Oct 22 09:27:17 2018 +0100 Remove “step” property which makes values other than 1, 1001, 2001 etc illegal (elastic#23610) Closes elastic#22054 commit 98f7667 Author: Andrew Wilkins <axwalk@gmail.com> Date: Mon Oct 22 08:54:46 2018 +0800 [APM] Update Go agent instructions (elastic#24111) - Update the Go agent instructions to refer to the new import path. - Change some of the wording to align with other agents. - Drop "beta" warning. commit f6ba696 Author: Maryia Lapata <mary.lopato@gmail.com> Date: Sun Oct 21 15:39:15 2018 +0300 Fix broken link on Watcher (elastic#24317) commit 3fc8b35 Author: Josh Dover <me@joshdover.com> Date: Sat Oct 20 10:45:14 2018 -0500 Add server OS information to telemetry stats (elastic#23793) * Add server OS data to monitoring collector and telemetry * Fixup naming * Fix functional tests commit 9904bd9 Author: Spencer <email@spalger.com> Date: Fri Oct 19 20:29:38 2018 -0700 [uiSettings] upgrade old config on read (elastic#24108) * doing config migration during config get if necessary * fixing issue with writing new config when user does not have write privilege * [uiSettings] only log about config upgrade on success * [uiSettings/createOrUpgradeSavedConfig] add onWriteError option * [uiSettings] return the upgradeAttributes if reader is unable to write upgrade * [uiSettings] update route tests to cover upgrade on get * [spaces/integration-tests] add config doc to expected objects * [uiSettings] avoid shadowed variable name commit ab29946 Author: dave.snider@gmail.com <dave.snider@gmail.com> Date: Fri Oct 19 18:30:06 2018 -0700 update eui to 4.5.1 (elastic#24218) * update eui to 4.5.1 * icons declared for logging / infra * remove eui types that are now in EUI directly * clean up duplicated EUI typescript definitions * Fix EuiSelect usage in beats enrollment commit 6b4b0fe Author: Tyler Smalley <tylersmalley@me.com> Date: Fri Oct 19 17:15:29 2018 -0700 Updates build file unit tests to be Windows Compatible (elastic#24296) POSTIX permissions are not available on windows and libuv reports only 666 and 444 for if it's read or writeable. Additionally, on Windows and being reported on OSX, modifying directory timestamps in the same stream often does not work. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> commit 8ee620d Author: Tim Sullivan <tsullivan@users.noreply.github.com> Date: Fri Oct 19 15:44:23 2018 -0700 Add note about automatic inclusion of all stats (elastic#24309) commit 208bd51 Author: Spencer <email@spalger.com> Date: Fri Oct 19 15:28:12 2018 -0700 [core/public/chrome] migrate controls, theme, and visibility apis (elastic#22987) * [core/public/chrome] migrate controls, theme, and visibility apis * [core/public] stop uiSettings service * [core/public/chrome] test that observables stop immedaiately after stop() * fix typos * [core/public/legacyPlatform] test globalNavState init * [ui/chrome] don't pass extra params * [core/public/chrome] test for dedupe-handling * [ui/chrome/theme] test with different values for logo and smallLogo commit 2fa5ee5 Author: Josh Dover <me@joshdover.com> Date: Fri Oct 19 17:22:54 2018 -0500 Add euiIconType for InfraOps and Logs links (elastic#24289) commit 938d130 Author: Tyler Smalley <tylersmalley@me.com> Date: Fri Oct 19 15:10:27 2018 -0700 Updates file unit tests to be Windows compatible (elastic#24281) Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> commit bd3f840 Author: Tim Sullivan <tsullivan@users.noreply.github.com> Date: Fri Oct 19 15:00:38 2018 -0700 [docs/reporting] note about data table pdf (elastic#23921) commit 9189c06 Author: Chris Cowan <chris@chriscowan.us> Date: Fri Oct 19 13:54:58 2018 -0700 [Infra UI] Test for waffle map GraphQL endpoint (elastic#24184) * [Infra UI] Test for metrics GraphQL endpoint * Moving apollo-boost to devDeps * Converting tests to typescript * Renaming infraops to infra * Converting to typescript * renaming from infraops to infra * Adding waffle tests back in commit 73d8bb9 Author: Peter Pisljar <peter.pisljar@gmail.com> Date: Fri Oct 19 20:40:05 2018 +0200 always start with closed context menu (elastic#24252) commit d8d2a18 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 21:02:58 2018 +0300 Translations for Management -> Objects (elastic#23905) * fix tests and update snapshots * fix id names * fix test and update snapshots * Update unit test snapshots * fix issues * Update snapshots * Fix issues commit 371eca2 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:56:50 2018 +0300 Translations for Advanced Settings (elastic#23881) * translate kbn.management.advanced_settings * fix tests and update snapshots * fix tests * fix issues * fix id in get_category-name.js * Update unit test snapshot * update snapshot * Fix issues commit a5c28d5 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:49:37 2018 +0300 Feature/translate watcher(part_3) (elastic#24066) * translate watcher(part_3) * fix default message in monitoring_watch.js * fix issues * fix issues * fix issues * fix issues commit fa95143 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:48:31 2018 +0300 Feature/translate watcher(part_2) (elastic#24017) * translate watcher(pad_2) * fix issues * fix issues commit 6247189 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:47:05 2018 +0300 Feature/translate watcher(part_1) (elastic#23989) * translate watcher(pad_1) * fix test * fix issues * fix the same id name * fix default message * fix issues commit 3c15067 Author: Chris Cowan <chris@chriscowan.us> Date: Fri Oct 19 10:39:21 2018 -0700 [Infra UI] Test for metrics GraphQL endpoint (elastic#24179) * [Infra UI] Test for metrics GraphQL endpoint * Moving apollo-boost to devDeps * Converting tests to typescript * Renaming infraops to infra commit c5e61c3 Author: Stacey Gammon <gammon@elastic.co> Date: Fri Oct 19 13:21:12 2018 -0400 EAH - Typescript state_monitor_factory (elastic#23945) * Typescript state_monitor_factory * Fix linter error with possibly undefined * Expand typings to include hash stuff and expand the State type definition more. * Mark readonly commit cc75547 Author: tibmt <pavelyukhnevich@yandex.ru> Date: Fri Oct 19 18:25:55 2018 +0300 Translate Gauge and Goal (elastic#23882) * Translate Gauge and Goal * fix some names, rewrite some code and add 'kbnVislibVisTypes' to '.i18nrc.json' * add 'Required' translation * fix 'requiredText' bug * use \' instead of " * update heatmap component * Update gauge.js * Update gauge.js * Update gauge.js commit 4b9e13c Author: Maryia Lapata <mary.lopato@gmail.com> Date: Fri Oct 19 17:59:07 2018 +0300 Init I18n before Notifications start (elastic#23902) * Init I18n before Notifications start * Remove i18n initialization in AngularJS since it will be already initialized in CoreSystem * Remove unused translationsApi * Remove redundant i18n.init invocation * Remove i18n tests since i18n.init was removed and input params for AppBootstrap were changed * Move i18n initialization to the entry file. commit 03d14a7 Author: Bill McConaghy <bill.mcconaghy@elastic.co> Date: Fri Oct 19 10:48:41 2018 -0400 fixing mangling of floating point numbers by console (elastic#23685) * fixing mangling of floating point numbers by console * fixing tests * fixing issue with large requests * restoring old code for server side as it handles large responses better commit a23124e Author: Matt Apperson <me@mattapperson.com> Date: Fri Oct 19 10:17:45 2018 -0400 [BeatsCM] Fixes and issue where if security is disabled, BeatsCM breaks Kibana (elastic#24249) * fix spelling * fix license and security checks * removed unused vars * cleanup * remove security check from route def as it is already managed in-route commit da26fcb Author: Melissa Alvarez <melissa.alvarez@elastic.co> Date: Fri Oct 19 09:42:21 2018 +0100 [ML] Ensure applying/removing groups menu is keyboard accessible (elastic#24212) * add group list arrow nav * up/down moved into own functions * always prevent default on arrow key press commit db905c0 Author: dave.snider@gmail.com <dave.snider@gmail.com> Date: Thu Oct 18 18:12:39 2018 -0700 remove eui css import from beats/infra (elastic#24245) commit 314d1c4 Author: Lukas Olson <olson.lukas@gmail.com> Date: Thu Oct 18 13:37:44 2018 -0700 Canvas function/argument/value autocomplete (elastic#23200) * feat: canvas autocomplete * fix: remove unused files * autocomplete ui cleanup * fix: handle stuff inside quotes * fix: canvas suggestion comparator * fix: spaces at the beginning of expressions * fix: move header out of autocomplete component itself * fix: add tests * fix: failing test * fix: pointed to wrong module commit db77feb Author: Stacey Gammon <gammon@elastic.co> Date: Thu Oct 18 14:20:09 2018 -0400 Extend the timeout used to check if something exists. (elastic#24140) commit a2172b9 Author: Maryia Lapata <mary.lopato@gmail.com> Date: Thu Oct 18 20:41:23 2018 +0300 Fix structure of plural message (elastic#24208) commit 4cc0103 Author: Catherine Liu <catherineqliu@outlook.com> Date: Thu Oct 18 13:03:57 2018 -0400 Adds Canvas to Kibana Home (elastic#24038) * Adds Canvas to the feature registry * Removes timelion from the home page commit 2b6cd21 Author: Justin Kambic <justin.kambic@elastic.co> Date: Thu Oct 18 12:43:52 2018 -0400 [Logstash] [Pipeline Viewer] Improve LS monitoring accessibility (elastic#24169) * Update test data shape to conform to component proptypes. * Add aria-labels for pipeline viewer buttons. commit 9f4ec18 Author: Brandon Kobel <brandon.kobel@gmail.com> Date: Thu Oct 18 09:30:42 2018 -0700 Reporting cookies (elastic#24177) * Switching Reporting to use session cookies explicitly * Fixing bug when security is explicitly disabled * Responding to feedback * Fixing yarn.lock commit 49168a9 Author: Brandon Kobel <brandon.kobel@gmail.com> Date: Thu Oct 18 09:28:18 2018 -0700 Using ES list privileges API to determine the authorization mode (elastic#24211) * Making it easier and more terse to specify the user for a test * Using ES list privileges API to determine the authorization mode This let's us correct use RBAC authorization for the proper users when security is enabled, and spaces is disabled to detect whether they have privileges of any kind and if so use RBAC. * Fixing authorization service test * Fixing tests referencing wrong expects * Putting create test back * Update x-pack/plugins/security/server/lib/authorization/mode.js * Update x-pack/plugins/security/server/lib/authorization/mode.js commit 612bd74 Author: Matt Apperson <me@mattapperson.com> Date: Thu Oct 18 12:16:31 2018 -0400 [BeatsCM] check for security after license, add support for standard license (elastic#24210) commit 46d1a81 Author: Matt Apperson <me@mattapperson.com> Date: Thu Oct 18 12:16:01 2018 -0400 merge RPM and DEB as they are the same command (elastic#24209) commit 7d0eaed Author: Gil Raphaelli <g@raphaelli.com> Date: Thu Oct 18 11:47:51 2018 -0400 update apm-server start instructions for deb/rpm/windows (elastic#24104) * update apm-server start instructions for deb/rpm * update apm-server start instructions for windows commit 2be837e Author: Jake Landis <jake.landis@elastic.co> Date: Thu Oct 18 10:28:42 2018 -0500 console: ingest node updates for auto-complete (elastic#24100) * add bytes processor * add dissect processor * add pipeline processor * add drop processor * add if conditional to each processor * add on_failure to each processor commit 5441d74 Author: Felix Stürmer <weltenwort@users.noreply.github.com> Date: Thu Oct 18 17:00:08 2018 +0200 Move mustache typings to devDependencies (elastic#24165) This moves the `@types/mustache` package from `dependencies` to `devDependencies` to avoid unnecessary inclusion in the build artifacts. commit b4cbac6 Author: Tim Roes <mail@timroes.de> Date: Thu Oct 18 15:49:48 2018 +0200 Fix memory leak in vislib on auto refresh (elastic#24134) commit f382ee2 Author: Chris Roberson <chrisronline@gmail.com> Date: Thu Oct 18 09:05:27 2018 -0400 Fixes from the demo (elastic#23922) commit 8fc52b4 Author: Pete Harverson <peteharverson@users.noreply.github.com> Date: Thu Oct 18 13:34:44 2018 +0100 [ML] Focus View Results link on Job wizards when job finishes (elastic#24190) * [ML] Focus View Results link on Job wizards when job finishes * [ML] Move function to set View Results link focus to new_job_utils commit 9a3414c Author: tibmt <pavelyukhnevich@yandex.ru> Date: Thu Oct 18 14:17:06 2018 +0300 Translate heatmap and heatmap_options (elastic#23812) Translation of Heatmap visualization component commit 58ba301 Author: tibmt <pavelyukhnevich@yandex.ru> Date: Thu Oct 18 13:58:57 2018 +0300 Translate Area, Line, Horizontal and Vertical Bar (elastic#23823) Translation of Line, Area, Vertical and Horizontal Bar visualization components commit c5d9583 Author: Pete Harverson <peteharverson@users.noreply.github.com> Date: Thu Oct 18 11:14:14 2018 +0100 [ML] Lowers multi-bucket impact thresholds used for anomaly display (elastic#24136) * [ML] Lowers multi-bucket impact thresholds used for anomaly display * [ML] Adjust thresholds used in multi bucket impact unit tests
Squashed commit of the following: commit 7739410 Author: markharwood <markharwood@gmail.com> Date: Mon Oct 22 09:30:16 2018 +0100 Graph fix: Remove “step” property which makes values other than 1, 1001, 2001 etc illegal (elastic#23610) Closes elastic#22054 commit 3ca2231 Author: markharwood <markharwood@gmail.com> Date: Mon Oct 22 09:27:17 2018 +0100 Remove “step” property which makes values other than 1, 1001, 2001 etc illegal (elastic#23610) Closes elastic#22054 commit 98f7667 Author: Andrew Wilkins <axwalk@gmail.com> Date: Mon Oct 22 08:54:46 2018 +0800 [APM] Update Go agent instructions (elastic#24111) - Update the Go agent instructions to refer to the new import path. - Change some of the wording to align with other agents. - Drop "beta" warning. commit f6ba696 Author: Maryia Lapata <mary.lopato@gmail.com> Date: Sun Oct 21 15:39:15 2018 +0300 Fix broken link on Watcher (elastic#24317) commit 3fc8b35 Author: Josh Dover <me@joshdover.com> Date: Sat Oct 20 10:45:14 2018 -0500 Add server OS information to telemetry stats (elastic#23793) * Add server OS data to monitoring collector and telemetry * Fixup naming * Fix functional tests commit 9904bd9 Author: Spencer <email@spalger.com> Date: Fri Oct 19 20:29:38 2018 -0700 [uiSettings] upgrade old config on read (elastic#24108) * doing config migration during config get if necessary * fixing issue with writing new config when user does not have write privilege * [uiSettings] only log about config upgrade on success * [uiSettings/createOrUpgradeSavedConfig] add onWriteError option * [uiSettings] return the upgradeAttributes if reader is unable to write upgrade * [uiSettings] update route tests to cover upgrade on get * [spaces/integration-tests] add config doc to expected objects * [uiSettings] avoid shadowed variable name commit ab29946 Author: dave.snider@gmail.com <dave.snider@gmail.com> Date: Fri Oct 19 18:30:06 2018 -0700 update eui to 4.5.1 (elastic#24218) * update eui to 4.5.1 * icons declared for logging / infra * remove eui types that are now in EUI directly * clean up duplicated EUI typescript definitions * Fix EuiSelect usage in beats enrollment commit 6b4b0fe Author: Tyler Smalley <tylersmalley@me.com> Date: Fri Oct 19 17:15:29 2018 -0700 Updates build file unit tests to be Windows Compatible (elastic#24296) POSTIX permissions are not available on windows and libuv reports only 666 and 444 for if it's read or writeable. Additionally, on Windows and being reported on OSX, modifying directory timestamps in the same stream often does not work. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> commit 8ee620d Author: Tim Sullivan <tsullivan@users.noreply.github.com> Date: Fri Oct 19 15:44:23 2018 -0700 Add note about automatic inclusion of all stats (elastic#24309) commit 208bd51 Author: Spencer <email@spalger.com> Date: Fri Oct 19 15:28:12 2018 -0700 [core/public/chrome] migrate controls, theme, and visibility apis (elastic#22987) * [core/public/chrome] migrate controls, theme, and visibility apis * [core/public] stop uiSettings service * [core/public/chrome] test that observables stop immedaiately after stop() * fix typos * [core/public/legacyPlatform] test globalNavState init * [ui/chrome] don't pass extra params * [core/public/chrome] test for dedupe-handling * [ui/chrome/theme] test with different values for logo and smallLogo commit 2fa5ee5 Author: Josh Dover <me@joshdover.com> Date: Fri Oct 19 17:22:54 2018 -0500 Add euiIconType for InfraOps and Logs links (elastic#24289) commit 938d130 Author: Tyler Smalley <tylersmalley@me.com> Date: Fri Oct 19 15:10:27 2018 -0700 Updates file unit tests to be Windows compatible (elastic#24281) Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> commit bd3f840 Author: Tim Sullivan <tsullivan@users.noreply.github.com> Date: Fri Oct 19 15:00:38 2018 -0700 [docs/reporting] note about data table pdf (elastic#23921) commit 9189c06 Author: Chris Cowan <chris@chriscowan.us> Date: Fri Oct 19 13:54:58 2018 -0700 [Infra UI] Test for waffle map GraphQL endpoint (elastic#24184) * [Infra UI] Test for metrics GraphQL endpoint * Moving apollo-boost to devDeps * Converting tests to typescript * Renaming infraops to infra * Converting to typescript * renaming from infraops to infra * Adding waffle tests back in commit 73d8bb9 Author: Peter Pisljar <peter.pisljar@gmail.com> Date: Fri Oct 19 20:40:05 2018 +0200 always start with closed context menu (elastic#24252) commit d8d2a18 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 21:02:58 2018 +0300 Translations for Management -> Objects (elastic#23905) * fix tests and update snapshots * fix id names * fix test and update snapshots * Update unit test snapshots * fix issues * Update snapshots * Fix issues commit 371eca2 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:56:50 2018 +0300 Translations for Advanced Settings (elastic#23881) * translate kbn.management.advanced_settings * fix tests and update snapshots * fix tests * fix issues * fix id in get_category-name.js * Update unit test snapshot * update snapshot * Fix issues commit a5c28d5 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:49:37 2018 +0300 Feature/translate watcher(part_3) (elastic#24066) * translate watcher(part_3) * fix default message in monitoring_watch.js * fix issues * fix issues * fix issues * fix issues commit fa95143 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:48:31 2018 +0300 Feature/translate watcher(part_2) (elastic#24017) * translate watcher(pad_2) * fix issues * fix issues commit 6247189 Author: Nox911 <nox.911@gmail.com> Date: Fri Oct 19 20:47:05 2018 +0300 Feature/translate watcher(part_1) (elastic#23989) * translate watcher(pad_1) * fix test * fix issues * fix the same id name * fix default message * fix issues commit 3c15067 Author: Chris Cowan <chris@chriscowan.us> Date: Fri Oct 19 10:39:21 2018 -0700 [Infra UI] Test for metrics GraphQL endpoint (elastic#24179) * [Infra UI] Test for metrics GraphQL endpoint * Moving apollo-boost to devDeps * Converting tests to typescript * Renaming infraops to infra commit c5e61c3 Author: Stacey Gammon <gammon@elastic.co> Date: Fri Oct 19 13:21:12 2018 -0400 EAH - Typescript state_monitor_factory (elastic#23945) * Typescript state_monitor_factory * Fix linter error with possibly undefined * Expand typings to include hash stuff and expand the State type definition more. * Mark readonly commit cc75547 Author: tibmt <pavelyukhnevich@yandex.ru> Date: Fri Oct 19 18:25:55 2018 +0300 Translate Gauge and Goal (elastic#23882) * Translate Gauge and Goal * fix some names, rewrite some code and add 'kbnVislibVisTypes' to '.i18nrc.json' * add 'Required' translation * fix 'requiredText' bug * use \' instead of " * update heatmap component * Update gauge.js * Update gauge.js * Update gauge.js commit 4b9e13c Author: Maryia Lapata <mary.lopato@gmail.com> Date: Fri Oct 19 17:59:07 2018 +0300 Init I18n before Notifications start (elastic#23902) * Init I18n before Notifications start * Remove i18n initialization in AngularJS since it will be already initialized in CoreSystem * Remove unused translationsApi * Remove redundant i18n.init invocation * Remove i18n tests since i18n.init was removed and input params for AppBootstrap were changed * Move i18n initialization to the entry file. commit 03d14a7 Author: Bill McConaghy <bill.mcconaghy@elastic.co> Date: Fri Oct 19 10:48:41 2018 -0400 fixing mangling of floating point numbers by console (elastic#23685) * fixing mangling of floating point numbers by console * fixing tests * fixing issue with large requests * restoring old code for server side as it handles large responses better commit a23124e Author: Matt Apperson <me@mattapperson.com> Date: Fri Oct 19 10:17:45 2018 -0400 [BeatsCM] Fixes and issue where if security is disabled, BeatsCM breaks Kibana (elastic#24249) * fix spelling * fix license and security checks * removed unused vars * cleanup * remove security check from route def as it is already managed in-route commit da26fcb Author: Melissa Alvarez <melissa.alvarez@elastic.co> Date: Fri Oct 19 09:42:21 2018 +0100 [ML] Ensure applying/removing groups menu is keyboard accessible (elastic#24212) * add group list arrow nav * up/down moved into own functions * always prevent default on arrow key press commit db905c0 Author: dave.snider@gmail.com <dave.snider@gmail.com> Date: Thu Oct 18 18:12:39 2018 -0700 remove eui css import from beats/infra (elastic#24245) commit 314d1c4 Author: Lukas Olson <olson.lukas@gmail.com> Date: Thu Oct 18 13:37:44 2018 -0700 Canvas function/argument/value autocomplete (elastic#23200) * feat: canvas autocomplete * fix: remove unused files * autocomplete ui cleanup * fix: handle stuff inside quotes * fix: canvas suggestion comparator * fix: spaces at the beginning of expressions * fix: move header out of autocomplete component itself * fix: add tests * fix: failing test * fix: pointed to wrong module commit db77feb Author: Stacey Gammon <gammon@elastic.co> Date: Thu Oct 18 14:20:09 2018 -0400 Extend the timeout used to check if something exists. (elastic#24140) commit a2172b9 Author: Maryia Lapata <mary.lopato@gmail.com> Date: Thu Oct 18 20:41:23 2018 +0300 Fix structure of plural message (elastic#24208) commit 4cc0103 Author: Catherine Liu <catherineqliu@outlook.com> Date: Thu Oct 18 13:03:57 2018 -0400 Adds Canvas to Kibana Home (elastic#24038) * Adds Canvas to the feature registry * Removes timelion from the home page commit 2b6cd21 Author: Justin Kambic <justin.kambic@elastic.co> Date: Thu Oct 18 12:43:52 2018 -0400 [Logstash] [Pipeline Viewer] Improve LS monitoring accessibility (elastic#24169) * Update test data shape to conform to component proptypes. * Add aria-labels for pipeline viewer buttons. commit 9f4ec18 Author: Brandon Kobel <brandon.kobel@gmail.com> Date: Thu Oct 18 09:30:42 2018 -0700 Reporting cookies (elastic#24177) * Switching Reporting to use session cookies explicitly * Fixing bug when security is explicitly disabled * Responding to feedback * Fixing yarn.lock commit 49168a9 Author: Brandon Kobel <brandon.kobel@gmail.com> Date: Thu Oct 18 09:28:18 2018 -0700 Using ES list privileges API to determine the authorization mode (elastic#24211) * Making it easier and more terse to specify the user for a test * Using ES list privileges API to determine the authorization mode This let's us correct use RBAC authorization for the proper users when security is enabled, and spaces is disabled to detect whether they have privileges of any kind and if so use RBAC. * Fixing authorization service test * Fixing tests referencing wrong expects * Putting create test back * Update x-pack/plugins/security/server/lib/authorization/mode.js * Update x-pack/plugins/security/server/lib/authorization/mode.js commit 612bd74 Author: Matt Apperson <me@mattapperson.com> Date: Thu Oct 18 12:16:31 2018 -0400 [BeatsCM] check for security after license, add support for standard license (elastic#24210) commit 46d1a81 Author: Matt Apperson <me@mattapperson.com> Date: Thu Oct 18 12:16:01 2018 -0400 merge RPM and DEB as they are the same command (elastic#24209) commit 7d0eaed Author: Gil Raphaelli <g@raphaelli.com> Date: Thu Oct 18 11:47:51 2018 -0400 update apm-server start instructions for deb/rpm/windows (elastic#24104) * update apm-server start instructions for deb/rpm * update apm-server start instructions for windows commit 2be837e Author: Jake Landis <jake.landis@elastic.co> Date: Thu Oct 18 10:28:42 2018 -0500 console: ingest node updates for auto-complete (elastic#24100) * add bytes processor * add dissect processor * add pipeline processor * add drop processor * add if conditional to each processor * add on_failure to each processor commit 5441d74 Author: Felix Stürmer <weltenwort@users.noreply.github.com> Date: Thu Oct 18 17:00:08 2018 +0200 Move mustache typings to devDependencies (elastic#24165) This moves the `@types/mustache` package from `dependencies` to `devDependencies` to avoid unnecessary inclusion in the build artifacts. commit b4cbac6 Author: Tim Roes <mail@timroes.de> Date: Thu Oct 18 15:49:48 2018 +0200 Fix memory leak in vislib on auto refresh (elastic#24134) commit f382ee2 Author: Chris Roberson <chrisronline@gmail.com> Date: Thu Oct 18 09:05:27 2018 -0400 Fixes from the demo (elastic#23922) commit 8fc52b4 Author: Pete Harverson <peteharverson@users.noreply.github.com> Date: Thu Oct 18 13:34:44 2018 +0100 [ML] Focus View Results link on Job wizards when job finishes (elastic#24190) * [ML] Focus View Results link on Job wizards when job finishes * [ML] Move function to set View Results link focus to new_job_utils commit 9a3414c Author: tibmt <pavelyukhnevich@yandex.ru> Date: Thu Oct 18 14:17:06 2018 +0300 Translate heatmap and heatmap_options (elastic#23812) Translation of Heatmap visualization component commit 58ba301 Author: tibmt <pavelyukhnevich@yandex.ru> Date: Thu Oct 18 13:58:57 2018 +0300 Translate Area, Line, Horizontal and Vertical Bar (elastic#23823) Translation of Line, Area, Vertical and Horizontal Bar visualization components commit c5d9583 Author: Pete Harverson <peteharverson@users.noreply.github.com> Date: Thu Oct 18 11:14:14 2018 +0100 [ML] Lowers multi-bucket impact thresholds used for anomaly display (elastic#24136) * [ML] Lowers multi-bucket impact thresholds used for anomaly display * [ML] Adjust thresholds used in multi bucket impact unit tests
Issue: Since Notifications are rendered before i18n engine initializing with specified locale, labels in Notifications are not localized with the specified locale, they are displayed in default locale.
Solution: initialize i18n engine before Notifications are rendered.
Fixed: #23903
With this fix there will be no need for wrapping constants with translated labels into a function in client code. Like I'm trying to make translations to work here and here
In addition I found out that these, these and these translations are currently broken without this fix.