Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-49129
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Nov 14, 2019
2 parents 86f0bde + 6a7435b commit 901752b
Show file tree
Hide file tree
Showing 137 changed files with 3,002 additions and 965 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
84 changes: 0 additions & 84 deletions docs/management/dashboard_only_mode/index.asciidoc

This file was deleted.

6 changes: 6 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ This page has moved. Please see {stack-ov}/create-jobs.html#job-tips[Machine lea
== Extend your use case

This page was deleted. See <<xpack-graph>> and <<xpack-ml>>.

[role="exclude",id="xpack-dashboard-only-mode"]
== Dashboard-only mode

Using the `kibana_dashboard_only_user` role is deprecated.
Use <<kibana-feature-privileges,feature privileges>> instead.
3 changes: 2 additions & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ strongly recommend that you keep the default CSP rules that ship with Kibana.

`csp.strict:`:: *Default: `false`* Blocks access to Kibana to any browser that
does not enforce even rudimentary CSP rules. In practice, this will disable
support for older, less safe browsers like Internet Explorer.
support for older, less safe browsers like Internet Explorer.
See <<csp-strict-mode, Content Security Policy>> for more information.

`csp.warnLegacyBrowsers:`:: *Default: `true`* Shows a warning message after
loading Kibana to any browser that does not enforce even rudimentary CSP rules,
Expand Down
1 change: 0 additions & 1 deletion docs/user/dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ To open an element for editing, put the dashboard in *Edit* mode,
and then select *Edit* from the panel menu. The changes you make appear in
every dashboard that uses the element.

include::{kib-repo-dir}/management/dashboard_only_mode/index.asciidoc[]



Expand Down
8 changes: 4 additions & 4 deletions docs/user/graph/configuring-graph.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ image::user/graph/images/graph-read-only-badge.png[Example of Graph's read only

[discrete]
[[disable-drill-down]]
=== Disabling drill down configuration
=== Disabling drilldown configuration

By default, users can configure _drill down_ URLs to display additional
By default, users can configure _drilldown_ URLs to display additional
information about a selected vertex in a new browser window. For example,
you could configure a drill down URL to perform a web search for the selected
you could configure a drilldown URL to perform a web search for the selected
vertex term.

To prevent users from adding drill down URLs, set
To prevent users from adding drilldown URLs, set
`xpack.graph.canEditDrillDownUrls` to `false` in `kibana.yml`:

[source,yaml]
Expand Down
109 changes: 85 additions & 24 deletions docs/user/graph/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
[[graph-getting-started]]
== Using Graph

Graph is automatically enabled in {es} and {kib}.
You must index data into {es} before you can create a graph.
<<index-patterns, Learn how>> or get started with a <<add-sample-data, sample data set>>.

[float]
[[exploring-connections]]
To start exploring connections in your data:
=== Graph connections in your data

. From the side navigation, open the graph explorer.

. Select an index pattern to specify what indices you want to explore.
. From the side navigation, open *Graph*.
+
For example, if you are indexing log data with Logstash, you could select the
`logstash-*` index pattern to visualize connections within the log entries.
If this is your first graph, follow the prompts to create it.
For subsequent graphs, click *New*.

. Select a data source to explore.

. Select one or more multi-value fields that contain the terms you want to
. Add one or more multi-value fields that contain the terms you want to
graph.
+
The vertices in the graph are selected from these terms. If you're
visualizing connections between Apache log entries, you could select the
`url.raw` field and the `geo.src` field so you can look at which pages are
being accessed from different locations.
The vertices in the graph are selected from these terms.

. Enter a search query to discover relationships between terms in the selected
fields.
+
For example, to generate a graph of the successful requests to
For example, if you are using the {kib} sample web logs data set, and you want
to generate a graph of the successful requests to
particular pages from different locations, you could search for the 200
response code. The weight of the connection between two vertices indicates how strongly they
are related.
Expand All @@ -38,25 +38,86 @@ image::user/graph/images/graph-url-connections.png["URL connections"]
[role="screenshot"]
image::user/graph/images/graph-link-summary.png["Link summary"]

. Use the toolbar buttons to explore
. Use the control bar on the right to explore
additional connections:
+
* To display additional vertices that connect to your graph, click Expand
image:user/graph/images/graph-expand-button.jpg[Expand Selection].
* To display additional vertices that connect to your graph, click the expand icon
image:user/graph/images/graph-expand-button.png[Expand Selection].
* To display additional
connections between the displayed vertices, click Link
image:user/graph/images/graph-link-button.jpg[Add links to existing terms]
connections between the displayed vertices, click the link icon
image:user/graph/images/graph-link-button.png[Add links to existing terms].
* To explore a particular area of the
graph, select the vertices you are interested in, and click Expand or Link.
* To step back through your changes to the graph, click Undo
image:user/graph/images/graph-undo-button.jpg[Undo].
graph, select the vertices you are interested in, and then click expand or link.
* To step back through your changes to the graph, click undo
image:user/graph/images/graph-undo-button.png[Undo] and redo
image:user/graph/images/graph-redo-button.png[Redo].

. To see more relationships in your data, submit additional queries.
+
[role="screenshot"]
image::user/graph/images/graph-add-query.png["Adding networks"]

. *Save* your graph.

[float]
[[style-vertex-properties]]
=== Style vertex properties

Each vertex has a color, icon, and label. To change
the color or icon of all vertices
of a certain field, click the field badge below the search bar, and then
select *Edit settings*.

To change the color and label of selected vertices,
click the style icon image:user/graph/images/graph-style-button.png[Style]
in the control bar on the right.


[float]
[[edit-graph-settings]]
=== Edit graph settings

By default, *Graph* is configured to tune out noise in your data.
If this isn't a good fit for your data, use *Settings > Advanced settings*
to adjust the way *Graph* queries your data. You can tune the graph to show
only the results relevant to you and to improve performance.
For more information, see <<graph-troubleshooting, Graph troubleshooting>>.

You can configure the number of vertices that a search or
expand operation adds to the graph.
By default, only the five most relevant terms for any given field are added
at a time. This keeps the graph from overflowing. To increase this number, click
a field below the search bar, select *Edit Settings*, and change *Terms per hop*.

[float]
[[graph-block-terms]]
=== Block terms from the graph
Documents that match a blocked term are not allowed in the graph.
To block a term, select its vertex and click
the block icon
image:user/graph/images/graph-block-button.png[Block selection]
in the control panel.
For a list of blocked terms, go to *Settings > Blocked terms*.

[float]
[[graph-drill-down]]
=== Drill down into raw documents
With drilldowns, you can display additional information about a
selected vertex in a new browser window. For example, you might
configure a drilldown URL to perform a web search for the selected vertex term.

Use the drilldown icon image:user/graph/images/graph-info-icon.png[Drilldown selection]
in the control panel to show the drilldown buttons for the selected vertices.
To configure drilldowns, go to *Settings > Drilldowns*. See also
<<disable-drill-down, Disabling drilldown configuration>>.

NOTE: By default, when you submit a search query, Graph searches all available
fields. You can constrain your search to a particular field using the Lucene
query syntax. For example, `machine.os: osx`.
[float]
[[graph-run-layout]]
=== Run and pause layout
Graph uses a "force layout", where vertices behave like magnets,
pushing off of one another. By default, when you add a new vertex to
the graph, all vertices begin moving. In some cases, the movement might
go on for some time. To freeze the current vertex position,
click the pause icon
image:user/graph/images/graph-pause-button.png[Block selection]
in the control panel.
Binary file modified docs/user/graph/images/graph-add-query.png
100644 → 100755
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/user/graph/images/graph-block-button.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 removed docs/user/graph/images/graph-expand-button.jpg
Binary file not shown.
Binary file added docs/user/graph/images/graph-expand-button.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/user/graph/images/graph-info-icon.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 removed docs/user/graph/images/graph-link-button.jpg
Binary file not shown.
Binary file added docs/user/graph/images/graph-link-button.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 modified docs/user/graph/images/graph-link-summary.png
100644 → 100755
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/user/graph/images/graph-pause-button.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/user/graph/images/graph-redo-button.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/user/graph/images/graph-style-button.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 removed docs/user/graph/images/graph-undo-button.jpg
Binary file not shown.
Binary file added docs/user/graph/images/graph-undo-button.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 modified docs/user/graph/images/graph-url-connections.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/user/graph/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[role="xpack"]
[[graph-troubleshooting]]
== Graph Troubleshooting
== Graph troubleshooting
++++
<titleabbrev>Troubleshooting</titleabbrev>
++++
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@elastic/charts": "^14.0.0",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "1.0.5",
"@elastic/eui": "14.8.0",
"@elastic/eui": "14.9.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
EuiPopoverTitle,
EuiSpacer,
EuiSwitch,
EuiSwitchEvent,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
Expand Down Expand Up @@ -433,7 +434,7 @@ class FilterEditorUI extends Component<Props, State> {
this.setState({ selectedOperator, params });
};

private onCustomLabelSwitchChange = (event: React.ChangeEvent<HTMLInputElement>) => {
private onCustomLabelSwitchChange = (event: EuiSwitchEvent) => {
const useCustomLabel = event.target.checked;
const customLabel = event.target.checked ? '' : null;
this.setState({ useCustomLabel, customLabel });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ test('handleCheckboxOptionChange - multiselect', async () => {
component.update();

const checkbox = findTestSubject(component, 'listControlMultiselectInput');
checkbox.simulate('change', { target: { checked: true } });
checkbox.simulate('click');
sinon.assert.notCalled(handleFieldNameChange);
sinon.assert.notCalled(handleIndexPatternChange);
sinon.assert.notCalled(handleNumberOptionChange);
Expand All @@ -247,7 +247,9 @@ test('handleCheckboxOptionChange - multiselect', async () => {
expectedControlIndex,
expectedOptionName,
sinon.match((evt) => {
if (evt.target.checked === true) {
// Synthetic `evt.target.checked` does not get altered by EuiSwitch,
// but its aria attribute is correctly updated
if (evt.target.getAttribute('aria-checked') === 'true') {
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@ describe('OptionsTab', () => {

it('should update updateFiltersOnChange', () => {
const component = mountWithIntl(<OptionsTab {...props} />);
const checkbox = component.find('[data-test-subj="inputControlEditorUpdateFiltersOnChangeCheckbox"] input[type="checkbox"]');
checkbox.simulate('change', { target: { checked: true } });
const checkbox = component.find('[data-test-subj="inputControlEditorUpdateFiltersOnChangeCheckbox"] button');
checkbox.simulate('click');

expect(props.setValue).toHaveBeenCalledTimes(1);
expect(props.setValue).toHaveBeenCalledWith('updateFiltersOnChange', true);
});

it('should update useTimeFilter', () => {
const component = mountWithIntl(<OptionsTab {...props} />);
const checkbox = component.find('[data-test-subj="inputControlEditorUseTimeFilterCheckbox"] input[type="checkbox"]');
checkbox.simulate('change', { target: { checked: true } });
const checkbox = component.find('[data-test-subj="inputControlEditorUseTimeFilterCheckbox"] button');
checkbox.simulate('click');

expect(props.setValue).toHaveBeenCalledTimes(1);
expect(props.setValue).toHaveBeenCalledWith('useTimeFilter', true);
});

it('should update pinFilters', () => {
const component = mountWithIntl(<OptionsTab {...props} />);
const checkbox = component.find('[data-test-subj="inputControlEditorPinFiltersCheckbox"] input[type="checkbox"]');
checkbox.simulate('change', { target: { checked: true } });
const checkbox = component.find('[data-test-subj="inputControlEditorPinFiltersCheckbox"] button');
checkbox.simulate('click');

expect(props.setValue).toHaveBeenCalledTimes(1);
expect(props.setValue).toHaveBeenCalledWith('pinFilters', true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ import { IInjector } from 'ui/chrome';
// @ts-ignore
import * as filterActions from 'plugins/kibana/discover/doc_table/actions/filter';

// @ts-ignore
import { getFilterGenerator } from 'ui/filter_manager';

import {
AppStateClass as TAppStateClass,
AppState as TAppState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function createIndexPatternsStub() {
get: sinon.spy(indexPatternId =>
Promise.resolve({
id: indexPatternId,
isTimeNanosBased: () => false
isTimeNanosBased: () => false,
popularizeField: () => {},
})
),
};
Expand Down
Loading

0 comments on commit 901752b

Please sign in to comment.