Skip to content

Commit

Permalink
Merge branch 'master' into fix_advanced_settings_tests_in_cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
pheyos committed Nov 24, 2020
2 parents 7320fc1 + cac95a3 commit 2b9b99d
Show file tree
Hide file tree
Showing 214 changed files with 8,399 additions and 1,636 deletions.
6 changes: 5 additions & 1 deletion .ci/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ cd "$(dirname "${0}")"
cp /usr/local/bin/runbld ./
cp /usr/local/bin/bash_standard_lib.sh ./

docker build -t kibana-ci -f ./Dockerfile .
if which docker >/dev/null; then
docker build -t kibana-ci -f ./Dockerfile .
else
echo "Docker binary is not available. Skipping the docker build this time."
fi
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
/x-pack/test/functional_basic/apps/transform/ @elastic/ml-ui

# Maps
/x-pack/plugins/maps/ @elastic/kibana-gis
#CC# /x-pack/plugins/maps/ @elastic/kibana-gis
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-gis
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Kibana is your window into the [Elastic Stack](https://www.elastic.co/products).

If you just want to try Kibana out, check out the [Elastic Stack Getting Started Page](https://www.elastic.co/start) to give it a whirl.

If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the [Kibana Getting Started Page](https://www.elastic.co/guide/en/kibana/current/getting-started.html).
If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the [Kibana Getting Started Page](https://www.elastic.co/guide/en/kibana/current/get-started.html).

### Using a Kibana Release

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

```typescript
getFieldAttrs: () => {
[x: string]: {
customLabel: string;
};
[x: string]: FieldAttrSet;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export declare class IndexPattern implements IIndexPattern
| [flattenHit](./kibana-plugin-plugins-data-public.indexpattern.flattenhit.md) | | <code>(hit: Record&lt;string, any&gt;, deep?: boolean) =&gt; Record&lt;string, any&gt;</code> | |
| [formatField](./kibana-plugin-plugins-data-public.indexpattern.formatfield.md) | | <code>FormatFieldFn</code> | |
| [formatHit](./kibana-plugin-plugins-data-public.indexpattern.formathit.md) | | <code>{</code><br/><code> (hit: Record&lt;string, any&gt;, type?: string): any;</code><br/><code> formatField: FormatFieldFn;</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-public.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: {</code><br/><code> customLabel: string;</code><br/><code> };</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-public.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: FieldAttrSet;</code><br/><code> }</code> | |
| [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md) | | <code>() =&gt; {</code><br/><code> fieldAttrs?: string &#124; undefined;</code><br/><code> title?: string &#124; undefined;</code><br/><code> timeFieldName?: string &#124; undefined;</code><br/><code> intervalName?: string &#124; undefined;</code><br/><code> fields?: string &#124; undefined;</code><br/><code> sourceFilters?: string &#124; undefined;</code><br/><code> fieldFormatMap?: string &#124; undefined;</code><br/><code> typeMeta?: string &#124; undefined;</code><br/><code> type?: string &#124; undefined;</code><br/><code> }</code> | Get last saved saved object fields |
| [id](./kibana-plugin-plugins-data-public.indexpattern.id.md) | | <code>string</code> | |
| [intervalName](./kibana-plugin-plugins-data-public.indexpattern.intervalname.md) | | <code>string &#124; undefined</code> | |
Expand Down
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-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [disableLanguageSwitcher](./kibana-plugin-plugins-data-public.querystringinputprops.disablelanguageswitcher.md)

## QueryStringInputProps.disableLanguageSwitcher property

<b>Signature:</b>

```typescript
disableLanguageSwitcher?: boolean;
```
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-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [QueryStringInputProps](./kibana-plugin-plugins-data-public.querystringinputprops.md) &gt; [iconType](./kibana-plugin-plugins-data-public.querystringinputprops.icontype.md)

## QueryStringInputProps.iconType property

<b>Signature:</b>

```typescript
iconType?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export interface QueryStringInputProps
| [className](./kibana-plugin-plugins-data-public.querystringinputprops.classname.md) | <code>string</code> | |
| [dataTestSubj](./kibana-plugin-plugins-data-public.querystringinputprops.datatestsubj.md) | <code>string</code> | |
| [disableAutoFocus](./kibana-plugin-plugins-data-public.querystringinputprops.disableautofocus.md) | <code>boolean</code> | |
| [disableLanguageSwitcher](./kibana-plugin-plugins-data-public.querystringinputprops.disablelanguageswitcher.md) | <code>boolean</code> | |
| [iconType](./kibana-plugin-plugins-data-public.querystringinputprops.icontype.md) | <code>string</code> | |
| [indexPatterns](./kibana-plugin-plugins-data-public.querystringinputprops.indexpatterns.md) | <code>Array&lt;IIndexPattern &#124; string&gt;</code> | |
| [isInvalid](./kibana-plugin-plugins-data-public.querystringinputprops.isinvalid.md) | <code>boolean</code> | |
| [languageSwitcherPopoverAnchorPosition](./kibana-plugin-plugins-data-public.querystringinputprops.languageswitcherpopoveranchorposition.md) | <code>PopoverAnchorPosition</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

```typescript
getFieldAttrs: () => {
[x: string]: {
customLabel: string;
};
[x: string]: FieldAttrSet;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export declare class IndexPattern implements IIndexPattern
| [flattenHit](./kibana-plugin-plugins-data-server.indexpattern.flattenhit.md) | | <code>(hit: Record&lt;string, any&gt;, deep?: boolean) =&gt; Record&lt;string, any&gt;</code> | |
| [formatField](./kibana-plugin-plugins-data-server.indexpattern.formatfield.md) | | <code>FormatFieldFn</code> | |
| [formatHit](./kibana-plugin-plugins-data-server.indexpattern.formathit.md) | | <code>{</code><br/><code> (hit: Record&lt;string, any&gt;, type?: string): any;</code><br/><code> formatField: FormatFieldFn;</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-server.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: {</code><br/><code> customLabel: string;</code><br/><code> };</code><br/><code> }</code> | |
| [getFieldAttrs](./kibana-plugin-plugins-data-server.indexpattern.getfieldattrs.md) | | <code>() =&gt; {</code><br/><code> [x: string]: FieldAttrSet;</code><br/><code> }</code> | |
| [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md) | | <code>() =&gt; {</code><br/><code> fieldAttrs?: string &#124; undefined;</code><br/><code> title?: string &#124; undefined;</code><br/><code> timeFieldName?: string &#124; undefined;</code><br/><code> intervalName?: string &#124; undefined;</code><br/><code> fields?: string &#124; undefined;</code><br/><code> sourceFilters?: string &#124; undefined;</code><br/><code> fieldFormatMap?: string &#124; undefined;</code><br/><code> typeMeta?: string &#124; undefined;</code><br/><code> type?: string &#124; undefined;</code><br/><code> }</code> | Get last saved saved object fields |
| [id](./kibana-plugin-plugins-data-server.indexpattern.id.md) | | <code>string</code> | |
| [intervalName](./kibana-plugin-plugins-data-server.indexpattern.intervalname.md) | | <code>string &#124; undefined</code> | |
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Alerts and actions are enabled by default in {kib}, but require you configure th

. <<using-kibana-with-security,Set up {kib} to work with {stack} {security-features}>>.
. <<configuring-tls-kib-es,Set up TLS encryption between {kib} and {es}>>.
. <<general-alert-action-settings,Specify a value for `xpack.encryptedSavedObjects.encryptionKey`>>.
. If you are using an *on-premises* Elastic Stack deployment, <<general-alert-action-settings,specify a value for `xpack.encryptedSavedObjects.encryptionKey`>>.

You can configure the following settings in the `kibana.yml` file.

Expand Down
1 change: 0 additions & 1 deletion packages/kbn-config/src/__mocks__/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function getEnvOptions(options: DeepPartial<EnvOptions> = {}): EnvOptions
configs: options.configs || [],
cliArgs: {
dev: true,
open: false,
quiet: false,
silent: false,
watch: false,
Expand Down
6 changes: 0 additions & 6 deletions packages/kbn-config/src/__snapshots__/env.test.ts.snap

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

1 change: 0 additions & 1 deletion packages/kbn-config/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export interface CliArgs {
watch: boolean;
repl: boolean;
basePath: boolean;
open: boolean;
oss: boolean;
/** @deprecated use disableOptimizer to know if the @kbn/optimizer is disabled in development */
optimize?: boolean;
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-legacy-logging/yarn.lock

This file was deleted.

1 change: 0 additions & 1 deletion src/cli/cluster/cluster_manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { Worker } from './worker';

const CLI_ARGS: SomeCliArgs = {
disableOptimizer: true,
open: false,
oss: false,
quiet: false,
repl: false,
Expand Down
24 changes: 1 addition & 23 deletions src/cli/cluster/cluster_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
*/

import { resolve } from 'path';
import { format as formatUrl } from 'url';
import Fs from 'fs';

import opn from 'opn';
import { REPO_ROOT } from '@kbn/utils';
import { FSWatcher } from 'chokidar';
import * as Rx from 'rxjs';
Expand All @@ -43,7 +41,6 @@ export type SomeCliArgs = Pick<
| 'silent'
| 'repl'
| 'disableOptimizer'
| 'open'
| 'watch'
| 'oss'
| 'runExamples'
Expand All @@ -52,7 +49,7 @@ export type SomeCliArgs = Pick<
>;

const firstAllTrue = (...sources: Array<Rx.Observable<boolean>>) =>
Rx.combineLatest(...sources).pipe(
Rx.combineLatest(sources).pipe(
filter((values) => values.every((v) => v === true)),
take(1),
mapTo(undefined)
Expand Down Expand Up @@ -146,17 +143,6 @@ export class ClusterManager {
});
});

if (opts.open) {
this.setupOpen(
formatUrl({
protocol: config.get('server.ssl.enabled') ? 'https' : 'http',
hostname: config.get('server.host'),
port: config.get('server.port'),
pathname: this.basePathProxy ? this.basePathProxy.basePath : '',
})
);
}

if (opts.watch) {
const pluginPaths = config.get<string[]>('plugins.paths');
const scanDirs = [
Expand Down Expand Up @@ -208,14 +194,6 @@ export class ClusterManager {
}
}

setupOpen(openUrl: string) {
firstAllTrue(this.serverReady$, this.kbnOptimizerReady$)
.toPromise()
.then(() => {
opn(openUrl);
});
}

setupWatching(extraPaths: string[], pluginInternalDirsIgnore: string[]) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const chokidar = require('chokidar');
Expand Down
2 changes: 0 additions & 2 deletions src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export default function (program) {
if (CAN_CLUSTER) {
command
.option('--dev', 'Run the server with development mode defaults')
.option('--open', 'Open a browser window to the base url after the server is started')
.option('--ssl', 'Run the dev server using HTTPS')
.option('--dist', 'Use production assets from kbn/optimizer')
.option(
Expand Down Expand Up @@ -222,7 +221,6 @@ export default function (program) {
configs: [].concat(opts.config || []),
cliArgs: {
dev: !!opts.dev,
open: !!opts.open,
envName: unknownOptions.env ? unknownOptions.env.name : undefined,
quiet: !!opts.quiet,
silent: !!opts.silent,
Expand Down
1 change: 0 additions & 1 deletion src/core/test_helpers/kbn_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export function createRootWithSettings(
configs: [],
cliArgs: {
dev: false,
open: false,
quiet: false,
silent: false,
watch: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import _, { each, reject } from 'lodash';
import { FieldAttrs } from '../..';
import { FieldAttrs, FieldAttrSet } from '../..';
import { DuplicateField } from '../../../../kibana_utils/common';

import { ES_FIELD_TYPES, KBN_FIELD_TYPES, IIndexPattern, IFieldType } from '../../../common';
Expand Down Expand Up @@ -135,8 +135,19 @@ export class IndexPattern implements IIndexPattern {
const newFieldAttrs = { ...this.fieldAttrs };

this.fields.forEach((field) => {
const attrs: FieldAttrSet = {};
let hasAttr = false;
if (field.customLabel) {
newFieldAttrs[field.name] = { customLabel: field.customLabel };
attrs.customLabel = field.customLabel;
hasAttr = true;
}
if (field.count) {
attrs.count = field.count;
hasAttr = true;
}

if (hasAttr) {
newFieldAttrs[field.name] = attrs;
} else {
delete newFieldAttrs[field.name];
}
Expand Down Expand Up @@ -298,7 +309,9 @@ export class IndexPattern implements IIndexPattern {
timeFieldName: this.timeFieldName,
intervalName: this.intervalName,
sourceFilters: this.sourceFilters ? JSON.stringify(this.sourceFilters) : undefined,
fields: this.fields ? JSON.stringify(this.fields) : undefined,
fields: this.fields
? JSON.stringify(this.fields.filter((field) => field.scripted))
: undefined,
fieldFormatMap,
type: this.type,
typeMeta: this.typeMeta ? JSON.stringify(this.typeMeta) : undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,11 @@ describe('IndexPatterns', () => {

// Create a normal index patterns
const pattern = await indexPatterns.get('foo');

expect(pattern.version).toBe('fooa');
indexPatterns.clearCache();

// Create the same one - we're going to handle concurrency
const samePattern = await indexPatterns.get('foo');

expect(samePattern.version).toBe('fooaa');

// This will conflict because samePattern did a save (from refreshFields)
// but the resave should work fine
pattern.title = 'foo2';
Expand Down
Loading

0 comments on commit 2b9b99d

Please sign in to comment.