Skip to content

Commit

Permalink
Merge branch 'master' into reporting/api-test-unify
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored May 19, 2020
2 parents 3426c86 + c192dd0 commit 4a6e200
Show file tree
Hide file tree
Showing 555 changed files with 6,463 additions and 5,347 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@

# Canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas
/x-pack/test/functional/apps/canvas/ @elastic/kibana-canvas

# Observability UIs
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
Expand Down
12 changes: 6 additions & 6 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,29 @@ Changing these settings may disable features of the APM App.
| `xpack.apm.enabled`
| Set to `false` to disable the APM app. Defaults to `true`.

| `xpack.apm.ui.enabled`
| `xpack.apm.ui.enabled` {ess-icon}
| Set to `false` to hide the APM app from the menu. Defaults to `true`.

| `xpack.apm.ui.transactionGroupBucketSize`
| Number of top transaction groups displayed in the APM app. Defaults to `100`.

| `xpack.apm.ui.maxTraceItems`
| `xpack.apm.ui.maxTraceItems` {ess-icon}
| Maximum number of child items displayed when viewing trace details. Defaults to `1000`.

| `apm_oss.indexPattern`
| `apm_oss.indexPattern` {ess-icon}
| The index pattern used for integrations with Machine Learning and Query Bar.
It must match all apm indices. Defaults to `apm-*`.

| `apm_oss.errorIndices`
| `apm_oss.errorIndices` {ess-icon}
| Matcher for all {apm-server-ref}/error-indices.html[error indices]. Defaults to `apm-*`.

| `apm_oss.onboardingIndices`
| Matcher for all onboarding indices. Defaults to `apm-*`.

| `apm_oss.spanIndices`
| `apm_oss.spanIndices` {ess-icon}
| Matcher for all {apm-server-ref}/span-indices.html[span indices]. Defaults to `apm-*`.

| `apm_oss.transactionIndices`
| `apm_oss.transactionIndices` {ess-icon}
| Matcher for all {apm-server-ref}/transaction-indices.html[transaction indices]. Defaults to `apm-*`.

| `apm_oss.metricsIndices`
Expand Down
1 change: 1 addition & 0 deletions src/core/MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ import { npStart: { plugins } } from 'ui/new_platform';
| `ui/filter_manager` | `plugins.data.filter` | -- |
| `ui/index_patterns` | `plugins.data.indexPatterns` |
| `import 'ui/management'` | `plugins.management.sections` | |
| `import 'ui/registry/field_format_editors'` | `plugins.indexPatternManagement.fieldFormatEditors` | |
| `ui/registry/field_formats` | `plugins.data.fieldFormats` | |
| `ui/registry/feature_catalogue` | `plugins.home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. |
| `ui/registry/vis_types` | `plugins.visualizations` | -- |
Expand Down
214 changes: 108 additions & 106 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ describe('start', () => {
expect(startDeps.notifications.toasts.addWarning.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
"Your browser does not meet the security requirements for Kibana.",
Object {
"title": [Function],
},
],
]
`);
Expand Down Expand Up @@ -146,18 +148,18 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
Object {},
Object {
"logo": "big logo",
"smallLogo": "not so big logo",
},
Object {
"logo": "big logo without small logo",
"smallLogo": undefined,
},
]
`);
Array [
Object {},
Object {
"logo": "big logo",
"smallLogo": "not so big logo",
},
Object {
"logo": "big logo without small logo",
"smallLogo": undefined,
},
]
`);
});
});

Expand All @@ -175,13 +177,13 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
false,
false,
false,
]
`);
Array [
false,
false,
false,
false,
]
`);
});

it('emits false until manually overridden when in embed mode', async () => {
Expand All @@ -203,13 +205,13 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
false,
true,
false,
]
`);
Array [
false,
false,
true,
false,
]
`);
});

it('application-specified visibility on mount', async () => {
Expand All @@ -230,13 +232,13 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
true,
false,
true,
]
`);
Array [
false,
true,
false,
true,
]
`);
});

it('changing visibility has no effect on chrome-hiding application', async () => {
Expand All @@ -253,12 +255,12 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
false,
false,
false,
]
`);
Array [
false,
false,
false,
]
`);
});
});

Expand All @@ -280,36 +282,36 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
Array [],
Array [
"foo",
],
Array [
"foo",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
"baz",
],
Array [
"foo",
"baz",
],
Array [
"baz",
],
]
`);
Array [
Array [],
Array [
"foo",
],
Array [
"foo",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
],
Array [
"foo",
"bar",
"baz",
],
Array [
"foo",
"baz",
],
Array [
"baz",
],
]
`);
});
});

Expand All @@ -327,19 +329,19 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
undefined,
Object {
"text": "foo",
"tooltip": "foo's tooltip",
},
Object {
"text": "bar",
"tooltip": "bar's tooltip",
},
undefined,
]
`);
Array [
undefined,
Object {
"text": "foo",
"tooltip": "foo's tooltip",
},
Object {
"text": "bar",
"tooltip": "bar's tooltip",
},
undefined,
]
`);
});
});

Expand All @@ -358,29 +360,29 @@ describe('start', () => {
service.stop();

await expect(promise).resolves.toMatchInlineSnapshot(`
Array [
Array [],
Array [
Object {
"text": "foo",
},
Object {
"text": "bar",
},
],
Array [
Object {
"text": "foo",
},
],
Array [
Object {
"text": "bar",
},
],
Array [],
]
`);
Array [
Array [],
Array [
Object {
"text": "foo",
},
Object {
"text": "bar",
},
],
Array [
Object {
"text": "foo",
},
],
Array [
Object {
"text": "bar",
},
],
Array [],
]
`);
});
});

Expand Down
46 changes: 40 additions & 6 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
*/

import { Breadcrumb as EuiBreadcrumb, IconType } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
import { BehaviorSubject, combineLatest, merge, Observable, of, ReplaySubject } from 'rxjs';
import { flatMap, map, takeUntil } from 'rxjs/operators';
import { parse } from 'url';
import { EuiLink } from '@elastic/eui';
import { mountReactNode } from '../utils/mount';
import { InternalApplicationStart } from '../application';
import { DocLinksStart } from '../doc_links';
import { HttpStart } from '../http';
Expand Down Expand Up @@ -165,12 +167,44 @@ export class ChromeService {
// Can delete
const getNavType$ = uiSettings.get$('pageNavigation').pipe(takeUntil(this.stop$));

const isIE = () => {
const ua = window.navigator.userAgent;
const msie = ua.indexOf('MSIE '); // IE 10 or older
const trident = ua.indexOf('Trident/'); // IE 11

return msie > 0 || trident > 0;
};

if (!this.params.browserSupportsCsp && injectedMetadata.getCspConfig().warnLegacyBrowsers) {
notifications.toasts.addWarning(
i18n.translate('core.chrome.legacyBrowserWarning', {
defaultMessage: 'Your browser does not meet the security requirements for Kibana.',
})
);
notifications.toasts.addWarning({
title: mountReactNode(
<FormattedMessage
id="core.chrome.legacyBrowserWarning"
defaultMessage="Your browser does not meet the security requirements for Kibana."
/>
),
});

if (isIE()) {
notifications.toasts.addWarning({
title: mountReactNode(
<FormattedMessage
id="core.chrome.browserDeprecationWarning"
defaultMessage="Support for Internet Explorer will be dropped in future versions of this software, please check {link}."
values={{
link: (
<EuiLink target="_blank" href="https://www.elastic.co/support/matrix" external>
<FormattedMessage
id="core.chrome.browserDeprecationLink"
defaultMessage="the support matrix on our website"
/>
</EuiLink>
),
}}
/>
),
});
}
}

return {
Expand Down
Loading

0 comments on commit 4a6e200

Please sign in to comment.