Skip to content

Commit

Permalink
Merge branch 'master' into monitoring/multicluster_logstash_pipelines…
Browse files Browse the repository at this point in the history
…_fix
  • Loading branch information
elasticmachine authored Nov 13, 2019
2 parents 4ddb262 + a50dbef commit e6d9722
Show file tree
Hide file tree
Showing 736 changed files with 92,054 additions and 58,623 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"navigation": "src/legacy/core_plugins/navigation",
"newsfeed": "src/plugins/newsfeed",
"regionMap": "src/legacy/core_plugins/region_map",
"server": "src/legacy/server",
"statusPage": "src/legacy/core_plugins/status_page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ returns `basePath` value, specific for an incoming request.
<b>Signature:</b>

```typescript
get: (request: LegacyRequest | KibanaRequest<unknown, unknown, unknown>) => string;
get: (request: KibanaRequest<unknown, unknown, unknown> | LegacyRequest) => string;
```
4 changes: 2 additions & 2 deletions docs/development/core/server/kibana-plugin-server.basepath.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export declare class BasePath

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [get](./kibana-plugin-server.basepath.get.md) | | <code>(request: LegacyRequest &#124; KibanaRequest&lt;unknown, unknown, unknown&gt;) =&gt; string</code> | returns <code>basePath</code> value, specific for an incoming request. |
| [get](./kibana-plugin-server.basepath.get.md) | | <code>(request: KibanaRequest&lt;unknown, unknown, unknown&gt; &#124; LegacyRequest) =&gt; string</code> | returns <code>basePath</code> value, specific for an incoming request. |
| [prepend](./kibana-plugin-server.basepath.prepend.md) | | <code>(path: string) =&gt; string</code> | Prepends <code>path</code> with the basePath. |
| [remove](./kibana-plugin-server.basepath.remove.md) | | <code>(path: string) =&gt; string</code> | Removes the prepended basePath from the <code>path</code>. |
| [serverBasePath](./kibana-plugin-server.basepath.serverbasepath.md) | | <code>string</code> | returns the server's basePath<!-- -->See [BasePath.get](./kibana-plugin-server.basepath.get.md) for getting the basePath value for a specific request |
| [set](./kibana-plugin-server.basepath.set.md) | | <code>(request: LegacyRequest &#124; KibanaRequest&lt;unknown, unknown, unknown&gt;, requestSpecificBasePath: string) =&gt; void</code> | sets <code>basePath</code> value, specific for an incoming request. |
| [set](./kibana-plugin-server.basepath.set.md) | | <code>(request: KibanaRequest&lt;unknown, unknown, unknown&gt; &#124; LegacyRequest, requestSpecificBasePath: string) =&gt; void</code> | sets <code>basePath</code> value, specific for an incoming request. |

## Remarks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ sets `basePath` value, specific for an incoming request.
<b>Signature:</b>

```typescript
set: (request: LegacyRequest | KibanaRequest<unknown, unknown, unknown>, requestSpecificBasePath: string) => void;
set: (request: KibanaRequest<unknown, unknown, unknown> | LegacyRequest, requestSpecificBasePath: string) => void;
```
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
7 changes: 5 additions & 2 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ xpack.apm.ui.transactionGroupBucketSize:: Number of top transaction groups displ

xpack.apm.ui.maxTraceItems:: Max number of child items displayed when viewing trace details. Defaults to `1000`.

apm_oss.apmAgentConfigurationIndex:: Index containing agent configuration settings. Defaults to `.apm-agent-configuration`.

apm_oss.indexPattern:: Index pattern is used for integrations with Machine Learning and Kuery Bar. It must match all apm indices. Defaults to `apm-*`.

apm_oss.errorIndices:: Matcher for indices containing error documents. Defaults to `apm-*`.
Expand All @@ -34,3 +32,8 @@ apm_oss.onboardingIndices:: Matcher for indices containing onboarding documents.
apm_oss.spanIndices:: Matcher for indices containing span documents. Defaults to `apm-*`.

apm_oss.transactionIndices:: Matcher for indices containing transaction documents. Defaults to `apm-*`.

apm_oss.metricsIndices:: Matcher for indices containing metric documents. Defaults to `apm-*`.

apm_oss.sourcemapIndices:: Matcher for indices containing sourcemap documents. Defaults to `apm-*`.

4 changes: 4 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ Kibana reads this url from an external metadata service, but users can still
override this parameter to use their own Tile Map Service. For example:
`"https://tiles.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana"`

`newsfeed.enabled:` :: *Default: `true`* Controls whether to enable the newsfeed
system for the Kibana UI notification center. Set to `false` to disable the
newsfeed system.

`path.data:`:: *Default: `data`* The path where Kibana stores persistent data
not saved in Elasticsearch.

Expand Down
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -360,7 +360,7 @@
"chance": "1.0.18",
"cheerio": "0.22.0",
"chokidar": "3.2.1",
"chromedriver": "^78.0.1",
"chromedriver": "^77.0.0",
"classnames": "2.2.6",
"dedent": "^0.7.0",
"delete-empty": "^2.0.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
2 changes: 1 addition & 1 deletion packages/kbn-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"@babel/cli": "7.5.5",
"@kbn/dev-utils": "1.0.0",
"@kbn/babel-preset": "1.0.0",
"typescript": "3.5.1"
"typescript": "3.5.3"
}
}
2 changes: 1 addition & 1 deletion packages/kbn-analytics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

export { createReporter, ReportHTTP, Reporter, ReporterConfig } from './reporter';
export { ReportHTTP, Reporter, ReporterConfig } from './reporter';
export { UiStatsMetricType, METRIC_TYPE } from './metrics';
export { Report, ReportManager } from './report';
16 changes: 6 additions & 10 deletions packages/kbn-analytics/src/metrics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,17 @@
* under the License.
*/

import { UiStatsMetric, UiStatsMetricType } from './ui_stats';
import { UiStatsMetric } from './ui_stats';
import { UserAgentMetric } from './user_agent';

export {
UiStatsMetric,
createUiStatsMetric,
UiStatsMetricReport,
UiStatsMetricType,
} from './ui_stats';
export { UiStatsMetric, createUiStatsMetric, UiStatsMetricType } from './ui_stats';
export { Stats } from './stats';
export { trackUsageAgent } from './user_agent';

export type Metric = UiStatsMetric<UiStatsMetricType>;
export type MetricType = keyof typeof METRIC_TYPE;

export type Metric = UiStatsMetric | UserAgentMetric;
export enum METRIC_TYPE {
COUNT = 'count',
LOADED = 'loaded',
CLICK = 'click',
USER_AGENT = 'user_agent',
}
28 changes: 12 additions & 16 deletions packages/kbn-analytics/src/metrics/ui_stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,33 @@
* under the License.
*/

import { Stats } from './stats';
import { METRIC_TYPE } from './';

export type UiStatsMetricType = METRIC_TYPE.CLICK | METRIC_TYPE.LOADED | METRIC_TYPE.COUNT;
export interface UiStatsMetricConfig<T extends UiStatsMetricType> {
type: T;
export interface UiStatsMetricConfig {
type: UiStatsMetricType;
appName: string;
eventName: string;
count?: number;
}

export interface UiStatsMetric<T extends UiStatsMetricType = UiStatsMetricType> {
type: T;
export interface UiStatsMetric {
type: UiStatsMetricType;
appName: string;
eventName: string;
count: number;
}

export function createUiStatsMetric<T extends UiStatsMetricType>({
export function createUiStatsMetric({
type,
appName,
eventName,
count = 1,
}: UiStatsMetricConfig<T>): UiStatsMetric<T> {
return { type, appName, eventName, count };
}

export interface UiStatsMetricReport {
key: string;
appName: string;
eventName: string;
type: UiStatsMetricType;
stats: Stats;
}: UiStatsMetricConfig): UiStatsMetric {
return {
type,
appName,
eventName,
count,
};
}
35 changes: 35 additions & 0 deletions packages/kbn-analytics/src/metrics/user_agent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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.
*/
import { METRIC_TYPE } from './';

export interface UserAgentMetric {
type: METRIC_TYPE.USER_AGENT;
appName: string;
userAgent: string;
}

export function trackUsageAgent(appName: string): UserAgentMetric {
const userAgent = (window && window.navigator && window.navigator.userAgent) || '';

return {
type: METRIC_TYPE.USER_AGENT,
appName,
userAgent,
};
}
Loading

0 comments on commit e6d9722

Please sign in to comment.