Skip to content

Commit

Permalink
Merge branch 'master' into ml-transforms-wizard-vertical-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored May 4, 2020
2 parents 7d3eaec + dccb1dc commit ee79520
Show file tree
Hide file tree
Showing 147 changed files with 4,324 additions and 3,566 deletions.
1 change: 1 addition & 0 deletions .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-d

kibanaPipeline(timeoutMinutes: 120) {
catchErrors {
retryable.enable(2)
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
parallel([
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
Expand Down
Binary file added docs/discover/images/autorefresh-interval.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 48 additions & 48 deletions docs/discover/search.asciidoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,53 @@
[[search]]
== Searching your data
You can search the indices that match the current <<index-patterns, index pattern>> by entering
your search criteria in the Query bar. By default you can use Kibana's <<kuery-query, standard query language>>
which features autocomplete and a simple, easy to use syntax. Kibana's legacy query
language (based on Lucene https://lucene.apache.org/core/2_9_4/queryparsersyntax.html[query syntax])
is still available for the time being under the options menu in the Query Bar. When this
legacy query language is selected, the full JSON-based {ref}/query-dsl.html[Elasticsearch Query DSL]
can also be used.

When you submit a search request, the histogram, Documents table, and Fields
list are updated to reflect the search results. The total number of hits
(matching documents) is shown in the toolbar. The Documents table shows the
first five hundred hits. By default, the hits are listed in reverse
chronological order, with the newest documents shown first. You can reverse
the sort order by clicking the Time column header. You can also sort the table
by the values in any indexed field. For more information, see <<sorting,
Sorting the Documents Table>>.

To search your data, enter your search criteria in the Query bar and
press *Enter* or click *Search* image:images/search-button.jpg[] to submit
the request to Elasticsearch.
Many Kibana apps embed a query bar for real-time search, including
*Discover*, *Visualize*, and *Dashboard*.

[float]
=== Search your data

To search the indices that match the current <<index-patterns, index pattern>>,
enter your search criteria in the query bar. By default, you'll use
{kib}'s <<kuery-query, standard query language>> (KQL), which
features autocomplete and a simple, easy-to-use syntax. If you prefer to use
{kib}'s legacy query
language, based on the
Lucene https://lucene.apache.org/core/2_9_4/queryparsersyntax.html[query syntax],
you can switch to it from the KQL popup in the query bar. When you enable the
legacy query language, you can use the full
JSON-based {ref}/query-dsl.html[Elasticsearch Query DSL].


[float]
[[autorefresh]]
=== Refresh search results
As more documents are added to the indices you're searching, the search results
shown in *Discover*, and used to display visualizations, get stale. Using the
time filter, you can
configure a refresh interval to periodically resubmit your searches to
retrieve the latest results.

[role="screenshot"]
image::images/autorefresh-interval.png[]

You can also manually refresh the search results by
clicking the *Refresh* button.

[float]
=== Searching large amounts of data

Sometimes you want to search through large amounts of data no matter how long
the search takes. While this might not happen often, there are times
that long-running queries are required. Consider a threat hunting scenario
where you need to search through years of data.

If you run a query, and the run time gets close to the
timeout, you're presented the option to ignore the timeout. This enables you to
run queries with large amounts of data to completion.

By default, a query times out after 30 seconds.
The timeout is in place to avoid unintentional load on the cluster.


include::kuery.asciidoc[]

Expand Down Expand Up @@ -160,31 +188,3 @@ To completely delete a query:
image::discover/images/saved-query-management-component-delete-query-button.png["Example of the saved query management popover when a query is hovered over and we are about to delete a query",width="80%"]

You can import, export, and delete saved queries from <<managing-saved-objects, Saved Objects in Management>>.

[[select-pattern]]
=== Change the indices you're searching
When you submit a search request, the indices that match the currently-selected
index pattern are searched.
To change the indices you are searching, click the index pattern and select a
different <<settings-create-pattern, index pattern>>.

[[autorefresh]]
=== Refresh the search results
As more documents are added to the indices you're searching, the search results
shown in Discover and used to display visualizations get stale. You can
configure a refresh interval to periodically resubmit your searches to
retrieve the latest results.

. Click image:images/time-filter-calendar.png[].

. In the *Refresh every* field, enter the refresh rate, then select the interval
from the dropdown.

. Click *Start*.
+
image::images/autorefresh-intervals.png[]

To disable auto refresh, click *Stop*.

If auto refresh is not enabled, click *Refresh* to manually refresh the search
results.
Binary file modified docs/images/autorefresh-intervals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/user/discover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ image::images/Discover-Start.png[Discover]


[float]
[[select-pattern]]
=== Set up your index pattern

The first thing to do in *Discover* is to select an <<index-patterns, index pattern>>, which
Expand Down
2 changes: 2 additions & 0 deletions docs/user/reporting/development/pdf-integration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ If there are multiple visualizations, the `data-shared-items-count` attribute sh
many Visualizations to look for. Reporting will look at every element with the `data-shared-item` attribute and use the corresponding
`data-render-complete` attribute and `renderComplete` events to listen for rendering to complete. When rendering is complete for a visualization
the `data-render-complete` attribute should be set to "true" and it should dispatch a custom DOM `renderComplete` event.

If the reporting job uses multiple URLs, before looking for any of the `data-shared-item` or `data-shared-items-count` attributes, it waits for a `data-shared-page` attribute that specifies which page is being loaded.
1 change: 1 addition & 0 deletions vars/prChanges.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def getSkippablePaths() {
/^docs\//,
/^rfcs\//,
/^.ci\/.+\.yml$/,
/^.ci\/es-snapshots\//,
/^\.github\//,
/\.md$/,
]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React from 'react';
import { mount } from 'enzyme';
// @ts-ignore untyped local
import { ExportApp } from '../export_app';

jest.mock('style-it', () => ({
it: (css: string, Component: any) => Component,
}));

jest.mock('../../../../components/workpad_page', () => ({
WorkpadPage: (props: any) => <div>Page</div>,
}));

jest.mock('../../../../components/link', () => ({
Link: (props: any) => <div>Link</div>,
}));

describe('<ExportApp />', () => {
test('renders as expected', () => {
const sampleWorkpad = {
id: 'my-workpad-abcd',
css: '',
pages: [
{
elements: [0, 1, 2],
},
{
elements: [3, 4, 5, 6],
},
],
};

const page1 = mount(
<ExportApp workpad={sampleWorkpad} selectedPageIndex={0} initializeWorkpad={() => {}} />
);
expect(page1).toMatchSnapshot();

const page2 = mount(
<ExportApp workpad={sampleWorkpad} selectedPageIndex={1} initializeWorkpad={() => {}} />
);
expect(page2).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class ExportApp extends React.PureComponent {
id: PropTypes.string.isRequired,
pages: PropTypes.array.isRequired,
}).isRequired,
selectedPageId: PropTypes.string.isRequired,
selectedPageIndex: PropTypes.number.isRequired,
initializeWorkpad: PropTypes.func.isRequired,
};

Expand All @@ -25,13 +25,13 @@ export class ExportApp extends React.PureComponent {
}

render() {
const { workpad, selectedPageId } = this.props;
const { workpad, selectedPageIndex } = this.props;
const { pages, height, width } = workpad;
const activePage = pages.find(page => page.id === selectedPageId);
const activePage = pages[selectedPageIndex];
const pageElementCount = activePage.elements.length;

return (
<div className="canvasExport">
<div className="canvasExport" data-shared-page={selectedPageIndex + 1}>
<div className="canvasExport__stage">
<div className="canvasLayout__stageHeader">
<Link name="loadWorkpad" params={{ id: this.props.workpad.id }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { connect } from 'react-redux';
import { compose, branch, renderComponent } from 'recompose';
import { initializeWorkpad } from '../../../state/actions/workpad';
import { getWorkpad, getSelectedPage } from '../../../state/selectors/workpad';
import { getWorkpad, getSelectedPageIndex } from '../../../state/selectors/workpad';
import { LoadWorkpad } from './load_workpad';
import { ExportApp as Component } from './export_app';

const mapStateToProps = state => ({
workpad: getWorkpad(state),
selectedPageId: getSelectedPage(state),
selectedPageIndex: getSelectedPageIndex(state),
});

const mapDispatchToProps = dispatch => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export const LayoutTypes = {
PRINT: 'print',
};

export const PAGELOAD_SELECTOR = '.application';
export const DEFAULT_PAGELOAD_SELECTOR = '.application';
Loading

0 comments on commit ee79520

Please sign in to comment.