Skip to content

Commit

Permalink
Merge branch 'master' into config_tsvb
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Apr 8, 2020
2 parents d576423 + 184f594 commit 586c347
Show file tree
Hide file tree
Showing 495 changed files with 43,701 additions and 18,509 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,26 +69,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/legacy/core_plugins/expressions/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: [
'src/legacy/core_plugins/vis_default_editor/public/components/controls/**/*.{ts,tsx}',
],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/ui/public/vis/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/es_ui_shared/**/*.{js,ts,tsx}'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"tileMap": "src/legacy/core_plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/legacy/core_plugins/vis_type_timelion", "src/plugins/timelion"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/legacy/core_plugins/vis_default_editor",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/legacy/core_plugins/vis_type_markdown",
"visTypeMetric": "src/legacy/core_plugins/vis_type_metric",
"visTypeTable": "src/legacy/core_plugins/vis_type_table",
Expand Down
Binary file added docs/apm/images/service-maps-java.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/apm/images/service-maps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docs/apm/service-maps.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[[service-maps]]
=== Service maps

beta::[]

A service map is a real-time diagram of the interactions occurring in your application’s architecture.
It allows you to easily visualize data flow and high-level statistics, like average transaction duration,
requests per minute, errors per minute, and metrics, allowing you to quickly assess the status of your services.

Our beta offering creates two types of service maps:

* Global: All services and connections are shown.
* Service-specific: Selecting a specific service will highlight it's connections.

[role="screenshot"]
image::apm/images/service-maps.png[Example view of service maps in the APM app in Kibana]

[float]
[[visualize-your-architecture]]
=== Visualize your architecture

Select the **Service Map** tab to get started.
By default, all services and connections are shown.
Whether your onboarding a new engineer, or just trying to grasp the big picture,
click around, zoom in and out, and begin to visualize how your services are connected.

If there's a specific service that interests you, select that service to highlight its connections.
Clicking **Focus map** will refocus the map on that specific service and lock the connection highlighting.
From here, select **Service Details**, or click on the **Transaction** tab to jump to the Transaction overview.
You can also use the tabs at the top of the page to easily jump to the **Errors** or **Metrics** overview.

While it's not possible to query in service maps, it is possible to filter by environment.
This can be useful if you have two or more services, in separate environments, but with the same name.
Use the environment drop down to only see the data you're interested in, like `dev` or `production`.

[role="screenshot"]
image::apm/images/service-maps-java.png[Example view of service maps with Java highlighted in the APM app in Kibana]

[float]
[[service-maps-legend]]
=== Legend

Nodes appear on the map in one of two shapes:

* **Circle**: Instrumented services. Interior icons are based on the language of the agent used.
* **Diamond**: Databases, external, and messaging. Interior icons represent the generic type,
with specific icons for known entities, like Elasticsearch.
Type and subtype are based on `span.type`, and `span.subtype`.
2 changes: 2 additions & 0 deletions docs/apm/using-the-apm-ui.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ include::transactions.asciidoc[]

include::spans.asciidoc[]

include::service-maps.asciidoc[]

include::errors.asciidoc[]

include::metrics.asciidoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ Registering a feature consists of the following fields. For more information, co
|An array of applications this feature enables. Typically, all of your plugin's apps (from `uiExports`) will be included here.

|`privileges` (required)
|{repo}blob/{branch}/x-pack/plugins/features/server/feature.ts[`FeatureWithAllOrReadPrivileges`].
|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
|See <<example-1-canvas,Example 1>> and <<example-2-dev-tools,Example 2>>
|The set of privileges this feature requires to function.

|`subFeatures` (optional)
|{repo}blob/{branch}/x-pack/plugins/features/common/feature.ts[`FeatureConfig`].
|See <<example-3-discover,Example 3>>
|The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher.

|`icon`
|`string`
|"discoverApp"
Expand Down Expand Up @@ -192,3 +197,78 @@ server.route({
}
});
-----------

[[example-3-discover]]
==== Example 3: Discover

Discover takes advantage of subfeature privileges to allow fine-grained access control. In this example,
a single "Create Short URLs" subfeature privilege is defined, which allows users to grant access to this feature without having to grant the `all` privilege to Discover. In other words, you can grant `read` access to Discover, and also grant the ability to create short URLs.

["source","javascript"]
-----------
init(server) {
const xpackMainPlugin = server.plugins.xpack_main;
xpackMainPlugin.registerFeature({
{
id: 'discover',
name: i18n.translate('xpack.features.discoverFeatureName', {
defaultMessage: 'Discover',
}),
order: 100,
icon: 'discoverApp',
navLinkId: 'kibana:discover',
app: ['kibana'],
catalogue: ['discover'],
privileges: {
all: {
app: ['kibana'],
catalogue: ['discover'],
savedObject: {
all: ['search', 'query'],
read: ['index-pattern'],
},
ui: ['show', 'save', 'saveQuery'],
},
read: {
app: ['kibana'],
catalogue: ['discover'],
savedObject: {
all: [],
read: ['index-pattern', 'search', 'query'],
},
ui: ['show'],
},
},
subFeatures: [
{
name: i18n.translate('xpack.features.ossFeatures.discoverShortUrlSubFeatureName', {
defaultMessage: 'Short URLs',
}),
privilegeGroups: [
{
groupType: 'independent',
privileges: [
{
id: 'url_create',
name: i18n.translate(
'xpack.features.ossFeatures.discoverCreateShortUrlPrivilegeName',
{
defaultMessage: 'Create Short URLs',
}
),
includeIn: 'all',
savedObject: {
all: ['url'],
read: [],
},
ui: ['createShortUrl'],
},
],
},
],
},
],
}
});
}
-----------
7 changes: 6 additions & 1 deletion docs/user/security/authorization/kibana-privileges.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ Assigning a feature privilege grants access to a specific feature.
`all`:: Grants full read-write access.
`read`:: Grants read-only access.

===== Sub-feature privileges
Some features allow for finer access control than the `all` and `read` privileges.
This additional level of control is available in the Gold subscription level and higher.

===== Assigning feature privileges
From the role management screen:

Expand All @@ -62,7 +66,8 @@ PUT /api/security/role/my_kibana_role
{
"base": [],
"feature": {
"dashboard": ["all"]
"visualize": ["all"],
"dashboard": ["read", "url_create"]
},
"spaces": ["marketing"]
}
Expand Down
Binary file modified docs/user/security/images/assign_feature_privilege.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions src/dev/run_check_published_api_changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ interface Options {
accept: boolean;
docs: boolean;
help: boolean;
filter: string;
}

async function run(
Expand Down Expand Up @@ -205,6 +206,7 @@ async function run(
const extraFlags: string[] = [];
const opts = (getopts(process.argv.slice(2), {
boolean: ['accept', 'docs', 'help'],
string: ['filter'],
default: {
project: undefined,
},
Expand All @@ -222,6 +224,8 @@ async function run(
opts.help = true;
}

const folders = ['core/public', 'core/server', 'plugins/data/server', 'plugins/data/public'];

if (opts.help) {
process.stdout.write(
dedent(chalk`
Expand All @@ -240,9 +244,13 @@ async function run(
{dim # Checks for and automatically accepts and updates documentation for any changes to the Kibana Core API}
{dim $} node scripts/check_published_api_changes --accept
{dim # Only checks the core/public directory}
{dim $} node scripts/check_published_api_changes --filter=core/public
Options:
--accept {dim Accepts all changes by updating the API Review files and documentation}
--docs {dim Updates the Core API documentation}
--only {dim RegExp that folder names must match, folders: [${folders.join(', ')}]}
--help {dim Show this message}
`)
);
Expand All @@ -258,9 +266,11 @@ async function run(
return false;
}

const folders = ['core/public', 'core/server', 'plugins/data/server', 'plugins/data/public'];

const results = await Promise.all(folders.map(folder => run(folder, { log, opts })));
const results = await Promise.all(
folders
.filter(folder => (opts.filter.length ? folder.match(opts.filter) : true))
.map(folder => run(folder, { log, opts }))
);

if (results.find(r => r === false) !== undefined) {
process.exitCode = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
EuiSelect,
} from '@elastic/eui';

import { VisOptionsProps } from 'src/legacy/core_plugins/vis_default_editor/public';
import { VisOptionsProps } from 'src/plugins/vis_default_editor/public';
import { IIndexPattern } from 'src/plugins/data/public';
import { ControlEditor } from './control_editor';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { EuiForm, EuiFormRow, EuiSwitch } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { EuiSwitchEvent } from '@elastic/eui';

import { VisOptionsProps } from 'src/legacy/core_plugins/vis_default_editor/public';
import { VisOptionsProps } from 'src/plugins/vis_default_editor/public';

interface OptionsTabParams {
updateFiltersOnChange: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ function createDocTableModule() {
.directive('docTable', createDocTableDirective)
.directive('kbnTableHeader', createTableHeaderDirective)
.directive('toolBarPagerText', createToolBarPagerTextDirective)
.directive('toolBarPagerText', createToolBarPagerTextDirective)
.directive('kbnTableRow', createTableRowDirective)
.directive('toolBarPagerButtons', createToolBarPagerButtonsDirective)
.directive('kbnInfiniteScroll', createInfiniteScrollDirective)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ export const [getUrlTracker, setUrlTracker] = createGetterSetter<{
setTrackedUrl: (url: string) => void;
}>('urlTracker');

// EXPORT legacy static dependencies, should be migrated when available in a new version;
export { wrapInI18nContext } from 'ui/i18n';
import { search } from '../../../../../plugins/data/public';
import { createGetterSetter } from '../../../../../plugins/kibana_utils/common';
export const { getRequestInspectorStats, getResponseInspectorStats, tabifyAggResponse } = search;
Expand Down
Loading

0 comments on commit 586c347

Please sign in to comment.