Skip to content

Commit

Permalink
Merge branch 'master' into shim-dev_tools
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Nov 12, 2019
2 parents 57e0197 + 468dff7 commit 1d6faa6
Show file tree
Hide file tree
Showing 203 changed files with 1,888 additions and 1,112 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
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
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
23 changes: 23 additions & 0 deletions src/core/public/chrome/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* 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.
*/

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
77 changes: 52 additions & 25 deletions src/core/public/chrome/ui/header/header_help_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@
* under the License.
*/

import * as Rx from 'rxjs';
import { FormattedMessage } from '@kbn/i18n/react';
import React, { Component, Fragment } from 'react';
import * as Rx from 'rxjs';

import { InjectedIntl, injectI18n } from '@kbn/i18n/react';
import {
// TODO: add type annotations
// @ts-ignore
EuiButton,
// @ts-ignore
EuiButtonEmpty,
EuiFlexGroup,
// @ts-ignore
EuiFlexItem,
// @ts-ignore
EuiHeaderSectionItemButton,
EuiIcon,
EuiPopover,
EuiPopoverTitle,
EuiSpacer,
EuiText,
} from '@elastic/eui';
import { InjectedIntl, injectI18n } from '@kbn/i18n/react';

import { HeaderExtension } from './header_extension';
import { ChromeHelpExtension } from '../../chrome_service';
import {
ELASTIC_SUPPORT_LINK,
GITHUB_CREATE_ISSUE_LINK,
KIBANA_ASK_ELASTIC_LINK,
KIBANA_FEEDBACK_LINK,
} from '../../constants';

interface Props {
helpExtension$: Rx.Observable<ChromeHelpExtension | undefined>;
intl: InjectedIntl;
kibanaVersion: string;
useDefaultContent?: boolean;
kibanaDocLink: string;
isCloudEnabled: boolean;
}

interface State {
Expand Down Expand Up @@ -90,23 +90,50 @@ class HeaderHelpMenuUI extends Component<Props, State> {

const defaultContent = useDefaultContent ? (
<Fragment>
<EuiText size="s">
<p>
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuHelpDescription"
defaultMessage="Get updates, information, and answers in our documentation."
/>
</p>
</EuiText>

<EuiSpacer />

<EuiButton iconType="popout" href={kibanaDocLink} target="_blank">
<EuiButtonEmpty href={kibanaDocLink} target="_blank" size="xs" flush="left">
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuKibanaDocumentationTitle"
defaultMessage="Kibana documentation"
/>
</EuiButtonEmpty>

<EuiSpacer size="xs" />

<EuiButtonEmpty
href={this.props.isCloudEnabled ? ELASTIC_SUPPORT_LINK : KIBANA_ASK_ELASTIC_LINK}
target="_blank"
size="xs"
flush="left"
>
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuAskElasticTitle"
defaultMessage="Ask Elastic"
/>
</EuiButtonEmpty>

<EuiSpacer size="xs" />

<EuiButtonEmpty href={KIBANA_FEEDBACK_LINK} target="_blank" size="xs" flush="left">
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuGiveFeedbackTitle"
defaultMessage="Give feedback"
/>
</EuiButtonEmpty>

<EuiSpacer size="xs" />

<EuiButtonEmpty
href={GITHUB_CREATE_ISSUE_LINK}
target="_blank"
size="xs"
iconType="logoGithub"
flush="left"
>
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuGoToDocumentation"
defaultMessage="Go to documentation"
id="core.ui.chrome.headerGlobalNav.helpMenuOpenGitHubIssueTitle"
defaultMessage="Open an issue in GitHub"
/>
</EuiButton>
</EuiButtonEmpty>
</Fragment>
) : null;

Expand Down
Loading

0 comments on commit 1d6faa6

Please sign in to comment.