Skip to content

Commit

Permalink
Merge branch 'master' into feature/tutorial-translations-part7
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/core_plugins/kibana/server/tutorials/apm/apm_client_instructions.js
#	src/core_plugins/kibana/server/tutorials/apm/apm_server_instructions.js
#	src/core_plugins/kibana/server/tutorials/apm/elastic_cloud.js
#	src/core_plugins/kibana/server/tutorials/apm/index.js
#	src/core_plugins/kibana/server/tutorials/apm/on_prem.js
  • Loading branch information
pavel06081991 committed Aug 29, 2018
2 parents 957eeec + 22d3bcf commit 04ea98f
Show file tree
Hide file tree
Showing 339 changed files with 6,712 additions and 3,352 deletions.
14 changes: 14 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"paths": {
"kbn": "src/core_plugins/kibana",
"common.server": "src/server",
"common.ui": "src/ui",
"xpack.idxMgmt": "xpack/plugins/index_management"
},
"exclude": [
"src/ui/ui_render/bootstrap/app_bootstrap.js",
"src/ui/ui_render/ui_render_mixin.js",
"x-pack/plugins/monitoring/public/components/cluster/overview/alerts_panel.js",
"x-pack/plugins/monitoring/public/directives/alerts/index.js"
]
}
7 changes: 1 addition & 6 deletions docs/apm/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ configuration is required.
If you also use Elastic Stack for logging and server-level metrics, you can
optionally import the APM dashboards that come with the APM Server. You can use
these APM-specific visualizations to correlate APM data with other data sources.
To get the dashboards, run the following command on the APM server:

[source,shell]
----------------------------------------------------------
./apm-server setup
----------------------------------------------------------
To get the dashboards, click the "Load Kibana objects" button at the bottom of the Getting Started guides for APM in Kibana.

For more setup information, see
{apm-get-started-ref}/index.html[Getting Started with APM].
13 changes: 6 additions & 7 deletions docs/management/dashboard_only_mode/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
== Kibana Dashboard Only Mode

If {security} is enabled, you can use the `kibana_dashboard_only_user` built-in role to limit
what users see when they log in to {kib}.
what users see when they log in to {kib}. The `kibana_dashboard_only_user` role is
preconfigured with read-only permissions to {kib}.

IMPORTANT: You must also assign roles that grant the user appropriate access to the data indices.
For information on roles and privileges, see {xpack-ref}/authorization.html[User Authorization].

Users assigned this role are only able to see the Dashboard app in the navigation
pane. When users open a dashboard, they will have a limited visual experience.
Expand All @@ -13,12 +17,7 @@ All edit and create controls are hidden.
image:management/dashboard_only_mode/images/view_only_dashboard.png["View Only Dashboard"]

To assign this role, go to *Management > Security > Users*, add or edit
a user, and add the `kibana_dashboard_only_user` role. You must assign roles
that grant the user appropriate data access. For information on roles
and privileges, see {xpack-ref}/authorization.html[User Authorization].

The `kibana_dashboard_only_user` role is
preconfigured with read-only permissions to {kib}.
a user, and add the `kibana_dashboard_only_user` role.

IMPORTANT: If you assign users the `kibana_dashboard_only_user` role, along with a role
with write permissions to {kib}, they *will* have write access,
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/known-plugins.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This list of plugins is not guaranteed to work on your version of Kibana. Instea
* https://github.com/JuanCarniglia/area3d_vis[3D Graph] (JuanCarniglia)
* https://github.com/TrumanDu/bmap[Bmap](TrumanDu) - integrated echarts for map visualization
* https://github.com/mstoyano/kbn_c3js_vis[C3JS Visualizations] (mstoyano)
* https://github.com/aaronoah/kibana_calendar_vis[Calendar Visualization] (aaronoah)
* https://github.com/elo7/cohort[Cohort analysis] (elo7)
* https://github.com/DeanF/health_metric_vis[Colored Metric Visualization] (deanf)
* https://github.com/JuanCarniglia/dendrogram_vis[Dendrogram] (JuanCarniglia)
Expand Down
5 changes: 3 additions & 2 deletions docs/security/securing-kibana.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ You can manage privileges on the *Management / Security / Roles* page in {kib}.

If you're using the native realm with Basic Authentication, you can assign roles
using the *Management / Security / Users* page in {kib} or the
{ref}/security-api.html#security-user-apis[user management APIs]. For example, the following
creates a user named `jacknich` and assigns it the `kibana_user` role:
{ref}/security-api.html#security-user-apis[user management APIs]. For example,
the following creates a user named `jacknich` and assigns it the `kibana_user`
role:

[source,js]
--------------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ xpack.apm.enabled:: Set to `false` to disabled the APM plugin {kib}. Defaults to
xpack.apm.ui.enabled:: Set to `false` to hide the APM plugin {kib} from the menu. Defaults to
`true`.

apm_oss.indexPattern:: Index pattern is used for integrations with Machine Learning and Kuery Bar. It must match all apm indices. Defaults to `apm-*`.
apm_oss.indexPattern:: Index pattern is used for integrations with Machine Learning and Kuery Bar. It must match all apm indices. Defaults to `apm-*`.

apm_oss.errorIndices:: Matcher for indices containing error documents. Defaults to `apm-*-error-*`.
apm_oss.errorIndices:: Matcher for indices containing error documents. Defaults to `apm-\*-error-*`.

apm_oss.onboardingIndices:: Matcher for indices containing onboarding documents. Defaults to `apm-*-onboarding-*`.
apm_oss.onboardingIndices:: Matcher for indices containing onboarding documents. Defaults to `apm-\*-onboarding-*`.

apm_oss.spanIndices:: Matcher for indices containing span documents. Defaults to `apm-*-span-*`.
apm_oss.spanIndices:: Matcher for indices containing span documents. Defaults to `apm-\*-span-*`.

apm_oss.transactionIndices:: Matcher for indices containing transaction documents. Defaults to `apm-*-transaction-*`.
apm_oss.transactionIndices:: Matcher for indices containing transaction documents. Defaults to `apm-\*-transaction-*`.
4 changes: 2 additions & 2 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The minimum value is 100.

`server.ssl.redirectHttpFromPort:`:: Kibana will bind to this port and redirect all http requests to https over the port configured as `server.port`.

`server.ssl.supportedProtocols:`:: *Default: TLSv1, TLSv1.1, TLSv1.2* Supported protocols with versions. Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2`
`server.ssl.supportedProtocols:`:: *Default: TLSv1, TLSv1.1, TLSv1.2* An array of supported protocols with versions. Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2`

`status.allowAnonymous:`:: *Default: false* If authentication is enabled, setting this to `true` allows
unauthenticated users to access the Kibana server status API and status page.
unauthenticated users to access the Kibana server status API and status page.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"url": "https://github.com/elastic/kibana.git"
},
"dependencies": {
"@elastic/eui": "3.6.1",
"@elastic/eui": "3.7.0",
"@elastic/filesaver": "1.1.2",
"@elastic/numeral": "2.3.2",
"@elastic/ui-ace": "0.2.3",
Expand Down Expand Up @@ -310,10 +310,12 @@
"mutation-observer": "^1.0.3",
"nock": "8.0.0",
"node-sass": "^4.9.0",
"normalize-path": "^3.0.0",
"pixelmatch": "4.0.2",
"postcss": "^7.0.2",
"prettier": "^1.14.0",
"proxyquire": "1.7.11",
"regenerate": "^1.4.0",
"simple-git": "1.37.0",
"sinon": "^5.0.7",
"strip-ansi": "^3.0.1",
Expand Down
19 changes: 1 addition & 18 deletions packages/kbn-dev-utils/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,4 @@
* under the License.
*/

import { Readable } from 'stream';

type LogLevel = 'silent' | 'error' | 'warning' | 'info' | 'debug' | 'verbose';

export class ToolingLog extends Readable {
public verbose(...args: any[]): void;
public debug(...args: any[]): void;
public info(...args: any[]): void;
public success(...args: any[]): void;
public warning(...args: any[]): void;
public error(errOrMsg: string | Error): void;
public write(...args: any[]): void;
public indent(spaces: number): void;
public getLevel(): LogLevel;
public setLevel(level: LogLevel): void;
}

export function createToolingLog(level?: LogLevel): ToolingLog;
export * from './src/tooling_log';
2 changes: 1 addition & 1 deletion packages/kbn-dev-utils/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
*/

export { withProcRunner } from './proc_runner';
export { createToolingLog, pickLevelFromFlags } from './tooling_log';
export { ToolingLog, ToolingLogTextWriter, pickLevelFromFlags } from './tooling_log';
3 changes: 0 additions & 3 deletions packages/kbn-dev-utils/src/proc_runner/__tests__/proc.sh

This file was deleted.

2 changes: 1 addition & 1 deletion packages/kbn-dev-utils/src/proc_runner/proc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function createProc(name, { cmd, args, cwd, env, stdin, log }) {
name = name;

lines$ = Rx.merge(observeLines(childProcess.stdout), observeLines(childProcess.stderr)).pipe(
tap(line => log.write(` ${gray('proc')} [${gray(name)}] ${line}`)),
tap(line => log.write(` ${gray('proc')} [${gray(name)}] ${line}`)),
share()
);

Expand Down
79 changes: 79 additions & 0 deletions packages/kbn-dev-utils/src/proc_runner/with_proc_runner.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { ToolingLog } from '../tooling_log';
import { withProcRunner } from './with_proc_runner';
import { ProcRunner } from './proc_runner';

it('passes proc runner to a function', async () => {
await withProcRunner(new ToolingLog(), proc => {
expect(proc).toBeInstanceOf(ProcRunner);
});
});

it('calls procRunner.teardown() if function returns synchronously', async () => {
let teardownSpy;
await withProcRunner(new ToolingLog(), proc => {
teardownSpy = jest.spyOn(proc, 'teardown');
});

expect(teardownSpy).toHaveBeenCalled();
});

it('calls procRunner.teardown() if function throw synchronous error, and rejects with the error', async () => {
const error = new Error('foo');
let teardownSpy;

await expect(
withProcRunner(new ToolingLog(), proc => {
teardownSpy = jest.spyOn(proc, 'teardown');
throw error;
})
).rejects.toThrowError(error);

expect(teardownSpy).toHaveBeenCalled();
});

it('waits for promise to resolve before tearing down proc', async () => {
let teardownSpy;

await withProcRunner(new ToolingLog(), async proc => {
await new Promise(resolve => setTimeout(resolve, 500));
teardownSpy = jest.spyOn(proc, 'teardown');
});

expect(teardownSpy).not.toBe(undefined);
expect(teardownSpy).toHaveBeenCalled();
});

it('waits for promise to reject before tearing down proc and rejecting with the error', async () => {
const error = new Error('foo');
let teardownSpy;

await expect(
withProcRunner(new ToolingLog(), async proc => {
await new Promise(resolve => setTimeout(resolve, 500));
teardownSpy = jest.spyOn(proc, 'teardown');
throw error;
})
).rejects.toThrowError(error);

expect(teardownSpy).not.toBe(undefined);
expect(teardownSpy).toHaveBeenCalled();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`parses valid log levels correctly: debug 1`] = `
Object {
"flags": Object {
"debug": true,
"error": true,
"info": true,
"silent": true,
"verbose": false,
"warning": true,
},
"name": "debug",
}
`;

exports[`parses valid log levels correctly: error 1`] = `
Object {
"flags": Object {
"debug": false,
"error": true,
"info": false,
"silent": true,
"verbose": false,
"warning": false,
},
"name": "error",
}
`;

exports[`parses valid log levels correctly: info 1`] = `
Object {
"flags": Object {
"debug": false,
"error": true,
"info": true,
"silent": true,
"verbose": false,
"warning": true,
},
"name": "info",
}
`;

exports[`parses valid log levels correctly: silent 1`] = `
Object {
"flags": Object {
"debug": false,
"error": false,
"info": false,
"silent": true,
"verbose": false,
"warning": false,
},
"name": "silent",
}
`;

exports[`parses valid log levels correctly: verbose 1`] = `
Object {
"flags": Object {
"debug": true,
"error": true,
"info": true,
"silent": true,
"verbose": true,
"warning": true,
},
"name": "verbose",
}
`;

exports[`parses valid log levels correctly: warning 1`] = `
Object {
"flags": Object {
"debug": false,
"error": true,
"info": false,
"silent": true,
"verbose": false,
"warning": true,
},
"name": "warning",
}
`;

exports[`throws error for invalid levels: bar 1`] = `"Invalid log level \\"bar\\" (expected one of silent,error,warning,info,debug,verbose)"`;

exports[`throws error for invalid levels: foo 1`] = `"Invalid log level \\"foo\\" (expected one of silent,error,warning,info,debug,verbose)"`;

exports[`throws error for invalid levels: warn 1`] = `"Invalid log level \\"warn\\" (expected one of silent,error,warning,info,debug,verbose)"`;
Loading

0 comments on commit 04ea98f

Please sign in to comment.