Skip to content

Commit

Permalink
Merge branch 'master' into fix/siem-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Nov 12, 2019
2 parents 6bcc56d + 253a106 commit 3457d3b
Show file tree
Hide file tree
Showing 498 changed files with 10,871 additions and 12,505 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ package-lock.json
*.sublime-*
npm-debug.log*
.tern-project
x-pack/legacy/plugins/apm/tsconfig.json
apm.tsconfig.json
7 changes: 4 additions & 3 deletions docs/getting-started/tutorial-dashboard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
=== Add visualizations to a dashboard

A dashboard is a collection of visualizations that you can arrange and share.
You'll build a dashboard that contains the visualizations you saved during
You'll build a dashboard that contains the visualizations and map that you saved during
this tutorial.

. Open *Dashboard*.
. On the Dashboard overview page, click *Create new dashboard*.
. Set the time filter to May 18, 2015 to May 20, 2015.
. Click *Add* in the menu bar.
. Add *Bar Example*, *Map Example*, *Markdown Example*, and *Pie Example*.
+
Expand All @@ -26,12 +27,12 @@ is on the lower right.

==== Inspect the data

Seeing visualizations of your data is great,
Seeing visualizations of your data is great,
but sometimes you need to look at the actual data to
understand what's really going on. You can inspect the data behind any visualization
and view the {es} query used to retrieve it.

. In the dashboard, hover the pointer over the pie chart, and then click the icon in the upper right.
. In the dashboard, hover the pointer over the pie chart, and then click the icon in the upper right.
. From the *Options* menu, select *Inspect*.
+
[role="screenshot"]
Expand Down
76 changes: 40 additions & 36 deletions docs/getting-started/tutorial-visualizing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

In the Visualize application, you can shape your data using a variety
of charts, tables, and maps, and more. In this tutorial, you'll create four
visualizations:
visualizations:

* <<tutorial-visualize-pie, Pie chart>>
* <<tutorial-visualize-bar, Bar chart>>
* <<tutorial-visualize-map, Coordinate map>>
* <<tutorial-visualize-map, Map>>
* <<tutorial-visualize-markdown, Markdown widget>>

[float]
Expand All @@ -25,7 +25,7 @@ types in Kibana.
image::images/tutorial-visualize-wizard-step-1.png[]
. Click *Pie*.

. In *Choose a source*, select the `ba*` index pattern.
. In *Choose a source*, select the `ba*` index pattern.
+
Initially, the pie contains a single "slice."
That's because the default search matched all documents.
Expand Down Expand Up @@ -76,7 +76,7 @@ in a ring around the balance ranges.
[role="screenshot"]
image::images/tutorial-visualize-pie-3.png[]

. To save this chart so you can use it later, click *Save* in
. To save this chart so you can use it later, click *Save* in
the top menu bar and enter `Pie Example`.

[float]
Expand Down Expand Up @@ -123,29 +123,56 @@ you did at the beginning of the tutorial, when you marked the `play_name` field
as `not analyzed`.

[float]
[[tutorial-visualize-map]]
=== Coordinate map
[[tutorial-visualize-markdown]]
=== Markdown

Using a coordinate map, you can visualize geographic information in the log file sample data.
Create a Markdown widget to add formatted text to your dashboard.

. Create a *Markdown* visualization.
. Copy the following text into the text box.
+
[source,markdown]
# This is a tutorial dashboard!
The Markdown widget uses **markdown** syntax.
> Blockquotes in Markdown use the > character.

. Create a *Coordinate map* and set the search source to `logstash*`.
. Click *Apply changes* image:images/apply-changes-button.png[].
+
You haven't defined any buckets yet, so the visualization is a map of the world.
The Markdown renders in the preview pane.
+
[role="screenshot"]
image::images/tutorial-visualize-md-2.png[]

. *Save* this visualization with the name `Markdown Example`.

[float]
[[tutorial-visualize-map]]
=== Map

Using <<maps>>, you can visualize geographic information in the log file sample data.

. Click *Maps* in the New Visualization
menu to create a Map.

. Set the time.
.. In the time filter, click *Show dates*.
.. Click the start date, then *Absolute*.
.. Set the *Start date* to May 18, 2015.
.. In the time filter, click *now*, then *Absolute*.
.. Set the *End date* to May 20, 2015.
.. Click *Update*

. Map the geo coordinates from the log files.

.. In the *Buckets* pane, click *Add > Geo coordinates*.
.. Set *Aggregation* to *Geohash*.
.. Set *Field* to *geo.coordinates*.
.. Click *Add layer*.
.. Click the *Grid aggregation* data source.
.. Set *Index pattern* to *logstash*.
.. Click the *Add layer* button.

. Click *Apply changes* image:images/apply-changes-button.png[].
. Set the layer style.
.. For *Fill color*, select the yellow to red color ramp.
.. For *Border color*, select white.
.. Click *Save & close*.
+
The map now looks like this:
+
Expand All @@ -155,26 +182,3 @@ image::images/tutorial-visualize-map-2.png[]
. Navigate the map by clicking and dragging. Use the controls
on the left to zoom the map and set filters.
. *Save* this map with the name `Map Example`.

[float]
[[tutorial-visualize-markdown]]
=== Markdown

The final visualization is a Markdown widget that renders formatted text.

. Create a *Markdown* visualization.
. Copy the following text into the text box.
+
[source,markdown]
# This is a tutorial dashboard!
The Markdown widget uses **markdown** syntax.
> Blockquotes in Markdown use the > character.

. Click *Apply changes* image:images/apply-changes-button.png[].
+
The Markdown renders in the preview pane.
+
[role="screenshot"]
image::images/tutorial-visualize-md-2.png[]

. *Save* this visualization with the name `Markdown Example`.
Binary file modified docs/images/tutorial-visualize-map-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/maps/maps-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ the {es} index `kibana_sample_data_logs` on the shared key iso2 = geo.src.
. Set *Right source* to *kibana_sample_data_logs*.
. Set *Right field* to *geo.src*.

===== Set the vector style
===== Set the layer style

All of the world countries are still a single color because the layer is using <<maps-vector-style-static, static styling>>.
To shade the world countries based on which country is sending the most requests, you'll need to use <<maps-vector-style-data-driven, data driven styling>>.
Expand Down Expand Up @@ -161,9 +161,9 @@ image::maps/images/grid_metrics_both.png[]
. Select *Sum* in the aggregation select.
. Select *bytes* in the field select.

===== Set the vector style
===== Set the layer style

. In *Vector style*, change *Symbol size*:
. In *Layer style*, change *Symbol size*:
.. Set *Min size* to 1.
.. Set *Max size* to 25.
.. In the field select, select *sum of bytes*.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/ml/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ can then optionally import that data into an {es} index.

You need the following permissions to use the Data Visualizer with file upload:

* cluster privileges: `monitor`, `manage_index_pipelines`
* cluster privileges: `monitor`, `manage_ingest_pipelines`
* index privileges: `read`, `manage`, `index`

For more information, see {ref}/security-privileges.html[Security privileges]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"dependencies": {
"@babel/core": "^7.5.5",
"@babel/register": "^7.5.5",
"@elastic/charts": "^13.5.12",
"@elastic/charts": "^14.0.0",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "1.0.5",
"@elastic/eui": "14.8.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ module.exports = {
from: 'x-pack',
toRelative: 'x-pack',
},
{
from: 'react-router',
to: 'react-router-dom',
},
],
],
}
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-es/src/custom_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function isVersionFlag(a) {
function getCustomSnapshotUrl() {
// force use of manually created snapshots until live ones are available
if (!process.env.KBN_ES_SNAPSHOT_URL && !process.argv.some(isVersionFlag)) {
return 'https://storage.googleapis.com/kibana-ci-tmp-artifacts/{name}-{version}-{os}-x86_64.{ext}';
// return 'https://storage.googleapis.com/kibana-ci-tmp-artifacts/{name}-{version}-{os}-x86_64.{ext}';
return;
}

if (process.env.KBN_ES_SNAPSHOT_URL && process.env.KBN_ES_SNAPSHOT_URL !== 'false') {
Expand Down
8 changes: 2 additions & 6 deletions packages/kbn-spec-to-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ At the root of the Kibana repository, run the following commands:

```sh
# OSS
yarn spec_to_console \
-g "<ELASTICSEARCH-REPO-FOLDER>/rest-api-spec/src/main/resources/rest-api-spec/api/*" \
-d "src/legacy/core_plugins/console/api_server/spec/generated"
yarn spec_to_console -g "<ELASTICSEARCH-REPO-FOLDER>/rest-api-spec/src/main/resources/rest-api-spec/api/*" -d "src/legacy/core_plugins/console/server/api_server/spec/generated"

# X-pack
yarn spec_to_console \
-g "<ELASTICSEARCH-REPO-FOLDER>/x-pack/plugin/src/test/resources/rest-api-spec/api/*" \
-d "x-pack/plugins/console_extensions/spec/generated"
yarn spec_to_console -g "<ELASTICSEARCH-REPO-FOLDER>/x-pack/plugin/src/test/resources/rest-api-spec/api/*" -d "x-pack/legacy/plugins/console_extensions/spec/generated"
```

### Information used in Console that is not available in the REST spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';

import {
Link,
} from 'react-router';
import { Link } from 'react-router'; // eslint-disable-line

import classNames from 'classnames';

Expand Down
5 changes: 1 addition & 4 deletions packages/kbn-ui-framework/doc_site/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ import 'regenerator-runtime/runtime';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import {
Router,
hashHistory,
} from 'react-router';
import { Router, hashHistory } from 'react-router'; // eslint-disable-line

// Store.
import configureStore from './store/configure_store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ import {
compose,
} from 'redux';
import thunk from 'redux-thunk';
import { browserHistory } from 'react-router';
import {
routerMiddleware,
routerReducer,
} from 'react-router-redux';
import { browserHistory } from 'react-router'; // eslint-disable-line
import { routerMiddleware, routerReducer } from 'react-router-redux';

import codeViewerReducer from './reducers/code_viewer_reducer';
import sandboxReducer from './reducers/sandbox_reducer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

import React from 'react';

import {
Link,
} from 'react-router';
import { Link } from 'react-router'; // eslint-disable-line

export const NotFoundView = () => (
<div className="guideContentPage">
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-ui-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-router": "^3.2.0",
"react-router-dom": "4.2.2",
"react-router-redux": "^4.0.8",
"redux": "3.7.2",
"redux-thunk": "2.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export class ChromeService {
<LoadingIndicator loadingCount$={http.getLoadingCount$()} />

<Header
isCloudEnabled={injectedMetadata.getInjectedVar('isCloudEnabled') as boolean}
application={application}
appTitle$={appTitle$.pipe(takeUntil(this.stop$))}
badge$={badge$.pipe(takeUntil(this.stop$))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
* under the License.
*/

export * from './visualize_loader';
export const ELASTIC_SUPPORT_LINK = 'https://support.elastic.co/';
export const KIBANA_FEEDBACK_LINK = 'https://www.elastic.co/kibana/feedback';
export const KIBANA_ASK_ELASTIC_LINK = 'https://www.elastic.co/kibana/ask-elastic';
export const GITHUB_CREATE_ISSUE_LINK = 'https://github.com/elastic/kibana/issues/new/choose';
6 changes: 5 additions & 1 deletion src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ interface Props {
basePath: HttpStart['basePath'];
isLocked?: boolean;
onIsLockedUpdate?: (isLocked: boolean) => void;
isCloudEnabled: boolean;
}

interface State {
Expand Down Expand Up @@ -296,6 +297,7 @@ class HeaderUI extends Component<Props, State> {
kibanaVersion,
onIsLockedUpdate,
legacyMode,
isCloudEnabled,
} = this.props;
const {
appTitle,
Expand Down Expand Up @@ -394,7 +396,9 @@ class HeaderUI extends Component<Props, State> {

<EuiHeaderSection side="right">
<EuiHeaderSectionItem>
<HeaderHelpMenu {...{ helpExtension$, kibanaDocLink, kibanaVersion }} />
<HeaderHelpMenu
{...{ isCloudEnabled, helpExtension$, kibanaDocLink, kibanaVersion }}
/>
</EuiHeaderSectionItem>

<HeaderNavControls side="right" navControls={navControlsRight} />
Expand Down
Loading

0 comments on commit 3457d3b

Please sign in to comment.