Skip to content

Commit

Permalink
Merge branch 'liza/enable-visual-tests' of github.com:liza-mae/kibana…
Browse files Browse the repository at this point in the history
… into liza/enable-visual-tests
  • Loading branch information
Liza Dayoub committed Oct 14, 2019
2 parents e2a2637 + 05c9413 commit a6c5003
Show file tree
Hide file tree
Showing 573 changed files with 10,438 additions and 6,253 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@ Another tool we use for enforcing consistent coding style is EditorConfig, which
Note that for VSCode, to enable "live" linting of TypeScript (and other) file types, you will need to modify your local settings, as shown below. The default for the ESLint extension is to only lint JavaScript file types.

```json
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
]
"eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
]
```

### Internationalization
Expand Down
2 changes: 1 addition & 1 deletion docs/api/spaces-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Manage your {kib} spaces.
* <<spaces-api-get-all, Get all {kib} spaces API>>
* <<spaces-api-delete, Delete space API>>
* <<spaces-api-copy-saved-objects, Copy saved objects to space API>>
*<<spaces-api-resolve-copy-saved-objects-conflicts , Resolve copy saved objects to space conflicts API>>
* <<spaces-api-resolve-copy-saved-objects-conflicts, Resolve copy saved objects to space conflicts API>>

include::spaces-management/post.asciidoc[]
include::spaces-management/put.asciidoc[]
Expand Down
3 changes: 2 additions & 1 deletion docs/code/code-install-lang-server.asciidoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[[code-install-lang-server]]
== Install language server

*Code* comes with built-in language support for TypeScript. You can install additional languages as a {kib} plugin.
*Code* comes with built-in language support for TypeScript. You can install additional languages as a {kib} plugin. Plugin's reduce the distribution size to run Code inside {kib}. Install only the languages needed for your indexed repositories.

[role="screenshot"]
image::images/code-lang-server-tab.png[]

For the current version, *Code* supports the following languages in addition to TypeScript:

* `Java`
* `GO`

You can check the status of the language servers and get installation instructions on the *Language Servers* tab. Make sure the status of the language server is `INSTALLED` or `RUNNING` after you restart the {kib} instance.
[role="screenshot"]
Expand Down
4 changes: 2 additions & 2 deletions docs/developer/plugin/development-plugin-resources.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ node scripts/generate_plugin my_plugin_name # replace "my_plugin_name" with your
The Kibana directory must be named `kibana`, and your plugin directory should be located in the root of `kibana` in a `plugins` directory, for example:

["source","shell"]
-----------
----
.
└── kibana
└── plugins
├── foo-plugin
└── bar-plugin
--------
----

[float]
==== References in the code
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [(constructor)](./kibana-plugin-public.httpfetcherror._constructor_.md)

## HttpFetchError.(constructor)

Constructs a new instance of the `HttpFetchError` class

<b>Signature:</b>

```typescript
constructor(message: string, request: Request, response?: Response | undefined, body?: any);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| message | <code>string</code> | |
| request | <code>Request</code> | |
| response | <code>Response &#124; undefined</code> | |
| body | <code>any</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [body](./kibana-plugin-public.httpfetcherror.body.md)

## HttpFetchError.body property

<b>Signature:</b>

```typescript
readonly body?: any;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md)

## HttpFetchError class


<b>Signature:</b>

```typescript
export declare class HttpFetchError extends Error
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(message, request, response, body)](./kibana-plugin-public.httpfetcherror._constructor_.md) | | Constructs a new instance of the <code>HttpFetchError</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [body](./kibana-plugin-public.httpfetcherror.body.md) | | <code>any</code> | |
| [request](./kibana-plugin-public.httpfetcherror.request.md) | | <code>Request</code> | |
| [response](./kibana-plugin-public.httpfetcherror.response.md) | | <code>Response &#124; undefined</code> | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [request](./kibana-plugin-public.httpfetcherror.request.md)

## HttpFetchError.request property

<b>Signature:</b>

```typescript
readonly request: Request;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-public](./kibana-plugin-public.md) &gt; [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) &gt; [response](./kibana-plugin-public.httpfetcherror.response.md)

## HttpFetchError.response property

<b>Signature:</b>

```typescript
readonly response?: Response | undefined;
```
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->

| Class | Description |
| --- | --- |
| [HttpFetchError](./kibana-plugin-public.httpfetcherror.md) | |
| [HttpInterceptController](./kibana-plugin-public.httpinterceptcontroller.md) | |
| [SavedObjectsClient](./kibana-plugin-public.savedobjectsclient.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state. The client-side SavedObjectsClient is a thin convenience library around the SavedObjects HTTP API for interacting with Saved Objects. |
| [SimpleSavedObject](./kibana-plugin-public.simplesavedobject.md) | This class is a very simple wrapper for SavedObjects loaded from the server with the [SavedObjectsClient](./kibana-plugin-public.savedobjectsclient.md)<!-- -->.<!-- -->It provides basic functionality for creating/saving/deleting saved objects, but doesn't include any type-specific implementations. |
Expand Down
Binary file modified docs/images/code-lang-server-status.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/images/code-lang-server-tab.png
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/infrastructure/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[xpack-metrics-getting-started]]
== Getting started with infrastructure monitoring

To get started with the Infrastructure app in Kibana, you need to start collecting metrics data for your infrastructure.
To get started with the Metrics app in Kibana, you need to start collecting metrics data for your infrastructure.

Kibana provides step-by-step instructions to help you add metrics data.
The {infra-guide}[Infrastructure Monitoring Guide] is a good source for more detailed information and instructions.
Expand Down
6 changes: 3 additions & 3 deletions docs/infrastructure/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[role="xpack"]
[[xpack-infra]]
= Infrastructure
= Metrics

[partintro]
--
The Infrastructure app enables you to monitor your infrastructure and identify problems in real time.
The Metrics app enables you to monitor your infrastructure and identify problems in real time.
You start with a visual summary of your infrastructure where you can view basic metrics for common servers, containers, and services.
Then you can drill down to view more detailed metrics or other information for that component.

Expand All @@ -21,7 +21,7 @@ You can optionally save these views and add them to {kibana-ref}/dashboard.html[

* Seamlessly switch to view the corresponding logs, application traces or uptime information for a component.

To get started, you need to <<xpack-metrics-getting-started, start collecting metrics data from your infrastructure>>. Then you can <<infra-ui, use the Infrastructure application to inspect and analyze your data>>.
To get started, you need to <<xpack-metrics-getting-started, start collecting metrics data from your infrastructure>>. Then you can <<infra-ui, use the Metrics application to inspect and analyze your data>>.

[role="screenshot"]
image::infrastructure/images/infra-sysmon.png[Infrastructure Overview in Kibana]
Expand Down
6 changes: 3 additions & 3 deletions docs/infrastructure/infra-ui.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[role="xpack"]
[[infra-ui]]
== Using the Infrastructure app
== Using the Metrics app

Use the Infrastructure app in {kib} to monitor your infrastructure and identify problems in real time.
Use the Metrics app in {kib} to monitor your infrastructure and identify problems in real time.
You can explore metrics for hosts, containers, and services.
You can also drill down to view more detailed metrics, or seamlessly switch to view the corresponding logs, application traces, and uptime information.

Expand Down Expand Up @@ -62,7 +62,7 @@ Select *Auto-refresh* to keep up-to-date metrics information coming in, or *Stop
[[infra-configure-source]]
=== Configure the data to use for your metrics

The default source configuration for metrics is specified in the {kibana-ref}/infrastructure-ui-settings-kb.html[Infrastructure app settings] in the {kibana-ref}/settings.html[Kibana configuration file].
The default source configuration for metrics is specified in the {kibana-ref}/infrastructure-ui-settings-kb.html[Metrics app settings] in the {kibana-ref}/settings.html[Kibana configuration file].
The default configuration uses the `metricbeat-*` index pattern to query the data.
The default configuration also defines field settings for things like timestamps and container names.

Expand Down
6 changes: 3 additions & 3 deletions docs/infrastructure/metrics-explorer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[metrics-explorer]]
== Metrics Explorer

Metrics Explorer in the Infrastructure app in Kibana allows you to group and visualise multiple customisable metrics for one or more components in a graphical format.
Metrics Explorer in the Metrics app in Kibana allows you to group and visualise multiple customisable metrics for one or more components in a graphical format.
This can be a starting point for further investigations.
You can also save your views and add them to {kibana-ref}/dashboard.html[dashboards].

Expand All @@ -14,7 +14,7 @@ image::infrastructure/images/metrics-explorer-screen.png[Metrics Explorer in Kib
=== Metrics Explorer requirements and considerations

* Metrics Explorer uses data collected from {metricbeat-ref}/metricbeat-overview.html[Metricbeat].
* You need read permissions on `metricbeat-*` or the metric index specified in the Infrastructure configuration.
* You need read permissions on `metricbeat-*` or the metric index specified in the Metrics configuration.
* Metrics Explorer uses the timestamp field set in the Infrastructure configuration.
By default that is set to `@timestamp`.
* The interval for the X Axis is set to `auto`.
Expand All @@ -30,7 +30,7 @@ After that, we'll filter down to a specific host and explore the outbound traffi
Before we start, if you don't have any Metricbeat data, you'll need to head over to our
{metricbeat-ref}/metricbeat-overview.html[Metricbeat documentation] to install Metricbeat and start collecting data.

1. When you have Metricbeat running and collecting data, open Kibana and navigate to *Infrastructure*.
1. When you have Metricbeat running and collecting data, open Kibana and navigate to *Metrics*.
The *Inventory* tab shows the host or hosts you are monitoring.

2. Select the *Metrics Explorer* tab.
Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructure/view-metrics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

== Viewing infrastructure metrics

When you select *View Metrics* for a component in your infrastructure from the <<infra-ui, Infrastructure app in Kibana>>, you can view detailed metrics for that component, and for any related components.
When you select *View Metrics* for a component in your infrastructure from the <<infra-ui, Metrics app in Kibana>>, you can view detailed metrics for that component, and for any related components.
You can also view additional component metadata.

[role="screenshot"]
Expand Down
2 changes: 1 addition & 1 deletion docs/logs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Logs app has a compact, console-like display that you can customize.
You can filter the logs by various fields, start and stop live streaming, and highlight text of interest.

You can open the Logs app from the *Logs* tab in Kibana.
You can also open the Logs app directly from a component in the Infrastructure app.
You can also open the Logs app directly from a component in the Metrics app.
In this case, you will only see the logs for the selected component.

* <<xpack-logs-getting-started>>
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/general-infra-logs-ui-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`xpack.infra.enabled`:: Set to `false` to disable the Logs and Infrastructure UI plugin {kib}. Defaults to `true`.
`xpack.infra.enabled`:: Set to `false` to disable the Logs and Metrics UI plugin {kib}. Defaults to `true`.

`xpack.infra.sources.default.logAlias`:: Index pattern for matching indices that contain log data. Defaults to `filebeat-*,kibana_sample_data_logs*`. To match multiple wildcard patterns, use a comma to separate the names, with no space after the comma. For example, `logstash-app1-*,default-logs-*`.

Expand Down
8 changes: 4 additions & 4 deletions docs/settings/infrastructure-ui-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[role="xpack"]
[[infrastructure-ui-settings-kb]]
=== Infrastructure UI settings in Kibana
=== Metrics UI settings in Kibana
++++
<titleabbrev>Infrastructure UI settings</titleabbrev>
<titleabbrev>Metrics UI settings</titleabbrev>
++++

You do not need to configure any settings to use the Infrastructure UI. It is enabled by default.
You do not need to configure any settings to use the Metrics UI. It is enabled by default.

[float]
[[general-infra-ui-settings-kb]]
==== General Infrastructure UI settings
==== General Metrics UI settings

include::general-infra-logs-ui-settings.asciidoc[]
4 changes: 4 additions & 0 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ running behind a proxy. Use the `server.rewriteBasePath` setting to tell Kibana
if it should remove the basePath from requests it receives, and to prevent a
deprecation warning at startup. This setting cannot end in a slash (`/`).

[[server-cors]]`server.cors:`:: *Default: `false`* Set to `true` to enable CORS support. This setting is required to configure `server.cors.origin`.

`server.cors.origin:`:: *Default: none* Specifies origins. "origin" must be an array. To use this setting, you must set `server.cors` to `true`. To accept all origins, use `server.cors.origin: ["*"]`.

`server.customResponseHeaders:`:: *Default: `{}`* Header names and values to
send on all responses to the client from the Kibana server.

Expand Down
2 changes: 1 addition & 1 deletion docs/uptime/overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ID and URL, its IP address, and a dedicated sparkline showing its check status o
image::uptime/images/observability_integrations.png[Observability integrations]

The Monitor list also contains a menu of possible integrations. If Uptime detects Kubernetes or
Docker related host information, it will provide links to open the Infrastructure UI or Logs UI pre-filtered
Docker related host information, it will provide links to open the Metrics UI or Logs UI pre-filtered
for this host. Additionally, this feature supplies links to simply filter the other views on the host's
IP address, to help you quickly determine if these other solutions contain data relevant to your current
interest.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/extend.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

--

include::graph/index.asciidoc[leveloffset=+1]
include::graph/index.asciidoc[]

include::ml/index.asciidoc[]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
"vega-lib": "4.3.0",
"vega-lite": "^2.6.0",
"vega-schema-url-parser": "1.0.0",
"vega-tooltip": "^0.19.1",
"vega-tooltip": "^0.12.0",
"vision": "^5.3.3",
"webpack": "4.41.0",
"webpack-merge": "4.2.2",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-es/src/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ exports.Cluster = class Cluster {
this._process = execa(ES_BIN, args, {
cwd: installPath,
env: {
...(installPath ? { ES_TMPDIR: path.resolve(installPath, 'ES_TMPDIR') } : {}),
...process.env,
...(options.bundledJDK ? { JAVA_HOME: '' } : {}),
...(options.esEnvVars || {}),
Expand Down
4 changes: 4 additions & 0 deletions packages/kbn-es/src/install/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ exports.installArchive = async function installArchive(archive, options = {}) {
await decompress(dest, installPath);
log.info('extracted to %s', chalk.bold(installPath));

const tmpdir = path.resolve(installPath, 'ES_TMPDIR');
fs.mkdirSync(tmpdir, { recursive: true });
log.info('created %s', chalk.bold(tmpdir));

if (license !== 'oss') {
// starting in 6.3, security is disabled by default. Since we bootstrap
// the keystore, we can enable security ourselves.
Expand Down
5 changes: 3 additions & 2 deletions packages/kbn-i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ data to UI frameworks and provides methods for the direct translation.

Here is the public API exposed by this engine:

- `addMessages(messages: Map<string, string>, [locale: string])` - provides a way to register
- `addTranslation(newTranslation: Translation, [locale: string])` - provides a way to register
translations with the engine
- `getMessages()` - returns messages for the current language
- `getTranslation()` - returns messages for the current language
- `setLocale(locale: string)` - tells the engine which language to use by given
language key
- `getLocale()` - returns the current locale
Expand All @@ -78,6 +78,7 @@ For the detailed explanation, see the section below
translate message by id. `description` is optional context comment that will be extracted
by i18n tools and added as a comment next to translation message at `defaultMessages.json`.
- `init(messages: Map<string, string>)` - initializes the engine
- `load(translationsUrl: string)` - loads JSON with translations from the specified URL and initializes i18n engine with them.

#### I18n engine internals

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,29 @@ describe(`running the plugin-generator via 'node scripts/generate_plugin.js plug
await execa('yarn', ['build'], { cwd: generatedPath });
});

it(`'yarn start' should result in the spec plugin being initialized on kibana's stdout`, async () => {
describe('with es instance', () => {
const log = new ToolingLog();

const es = createLegacyEsTestCluster({ license: 'basic', log });
await es.start();
await withProcRunner(log, async proc => {
await proc.run('kibana', {
cmd: 'yarn',
args: [
'start',
'--optimize.enabled=false',
'--logging.json=false',
'--migrations.skip=true',
],
cwd: generatedPath,
wait: /ispec_plugin.+Status changed from uninitialized to green - Ready/,
beforeAll(es.start);
afterAll(es.stop);

it(`'yarn start' should result in the spec plugin being initialized on kibana's stdout`, async () => {
await withProcRunner(log, async proc => {
await proc.run('kibana', {
cmd: 'yarn',
args: [
'start',
'--optimize.enabled=false',
'--logging.json=false',
'--migrations.skip=true',
],
cwd: generatedPath,
wait: /ispec_plugin.+Status changed from uninitialized to green - Ready/,
});
await proc.stop('kibana');
});
await proc.stop('kibana');
});
await es.stop();
});

it(`'yarn preinstall' should exit 0`, async () => {
Expand Down
Loading

0 comments on commit a6c5003

Please sign in to comment.