IndexPattern
| |
-| specs | FieldSpec[]
| |
-| shortDotsEnable | boolean
| |
-| onNotification | OnNotification
| |
-
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.add.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.add.md
deleted file mode 100644
index ae3d82f0cc3ea..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.add.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [add](./kibana-plugin-plugins-data-public.fieldlist.add.md)
-
-## FieldList.add property
-
-Signature:
-
-```typescript
-readonly add: (field: FieldSpec) => void;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getall.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getall.md
deleted file mode 100644
index da29a4de9acc8..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getall.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [getAll](./kibana-plugin-plugins-data-public.fieldlist.getall.md)
-
-## FieldList.getAll property
-
-Signature:
-
-```typescript
-readonly getAll: () => IndexPatternField[];
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getbyname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getbyname.md
deleted file mode 100644
index af368d003423a..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getbyname.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [getByName](./kibana-plugin-plugins-data-public.fieldlist.getbyname.md)
-
-## FieldList.getByName property
-
-Signature:
-
-```typescript
-readonly getByName: (name: IndexPatternField['name']) => IndexPatternField | undefined;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getbytype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getbytype.md
deleted file mode 100644
index 16bae3ee7c555..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.getbytype.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [getByType](./kibana-plugin-plugins-data-public.fieldlist.getbytype.md)
-
-## FieldList.getByType property
-
-Signature:
-
-```typescript
-readonly getByType: (type: IndexPatternField['type']) => any[];
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.md
index 012b069430290..79bcaf9700cf0 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.md
@@ -1,32 +1,11 @@
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md)
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [fieldList](./kibana-plugin-plugins-data-public.fieldlist.md)
-## FieldList class
+## fieldList variable
Signature:
```typescript
-export declare class FieldList extends ArrayFieldList
class |
-
-## Properties
-
-| Property | Modifiers | Type | Description |
-| --- | --- | --- | --- |
-| [add](./kibana-plugin-plugins-data-public.fieldlist.add.md) | | (field: FieldSpec) => void
| |
-| [getAll](./kibana-plugin-plugins-data-public.fieldlist.getall.md) | | () => IndexPatternField[]
| |
-| [getByName](./kibana-plugin-plugins-data-public.fieldlist.getbyname.md) | | (name: IndexPatternField['name']) => IndexPatternField | undefined
| |
-| [getByType](./kibana-plugin-plugins-data-public.fieldlist.getbytype.md) | | (type: IndexPatternField['type']) => any[]
| |
-| [remove](./kibana-plugin-plugins-data-public.fieldlist.remove.md) | | (field: IFieldType) => void
| |
-| [removeAll](./kibana-plugin-plugins-data-public.fieldlist.removeall.md) | | () => void
| |
-| [replaceAll](./kibana-plugin-plugins-data-public.fieldlist.replaceall.md) | | (specs: FieldSpec[]) => void
| |
-| [toSpec](./kibana-plugin-plugins-data-public.fieldlist.tospec.md) | | () => {
count: number;
script: string | undefined;
lang: string | undefined;
conflictDescriptions: Record<string, string[]> | undefined;
name: string;
type: string;
esTypes: string[] | undefined;
scripted: boolean;
searchable: boolean;
aggregatable: boolean;
readFromDocValues: boolean;
subType: import("../types").IFieldSubType | undefined;
format: any;
}[]
| |
-| [update](./kibana-plugin-plugins-data-public.fieldlist.update.md) | | (field: FieldSpec) => void
| |
-
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.remove.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.remove.md
deleted file mode 100644
index 149410adb3550..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.remove.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [remove](./kibana-plugin-plugins-data-public.fieldlist.remove.md)
-
-## FieldList.remove property
-
-Signature:
-
-```typescript
-readonly remove: (field: IFieldType) => void;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.removeall.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.removeall.md
deleted file mode 100644
index 92a45349ad005..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.removeall.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [removeAll](./kibana-plugin-plugins-data-public.fieldlist.removeall.md)
-
-## FieldList.removeAll property
-
-Signature:
-
-```typescript
-readonly removeAll: () => void;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.replaceall.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.replaceall.md
deleted file mode 100644
index 5330440e6b96a..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.replaceall.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [replaceAll](./kibana-plugin-plugins-data-public.fieldlist.replaceall.md)
-
-## FieldList.replaceAll property
-
-Signature:
-
-```typescript
-readonly replaceAll: (specs: FieldSpec[]) => void;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.tospec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.tospec.md
deleted file mode 100644
index e646339feb495..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldlist.tospec.md
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) > [toSpec](./kibana-plugin-plugins-data-public.fieldlist.tospec.md)
-
-## FieldList.toSpec property
-
-Signature:
-
-```typescript
-readonly toSpec: () => {
- count: number;
- script: string | undefined;
- lang: string | undefined;
- conflictDescriptions: Recordboolean
| |
| [sortable](./kibana-plugin-plugins-data-public.ifieldtype.sortable.md) | boolean
| |
| [subType](./kibana-plugin-plugins-data-public.ifieldtype.subtype.md) | IFieldSubType
| |
-| [toSpec](./kibana-plugin-plugins-data-public.ifieldtype.tospec.md) | () => FieldSpec
| |
+| [toSpec](./kibana-plugin-plugins-data-public.ifieldtype.tospec.md) | (options?: {
getFormatterForField?: IndexPattern['getFormatterForField'];
}) => FieldSpec
| |
| [type](./kibana-plugin-plugins-data-public.ifieldtype.type.md) | string
| |
| [visualizable](./kibana-plugin-plugins-data-public.ifieldtype.visualizable.md) | boolean
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.tospec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.tospec.md
index 1fb4084c25d34..52238ea2a00ca 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.tospec.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.tospec.md
@@ -7,5 +7,7 @@
Signature:
```typescript
-toSpec?: () => FieldSpec;
+toSpec?: (options?: {
+ getFormatterForField?: IndexPattern['getFormatterForField'];
+ }) => FieldSpec;
```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.md
index b068c4804c0dd..b1e13ffaabd07 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.md
@@ -21,5 +21,6 @@ export interface IIndexPatternFieldList extends Array{
getFormatterForField?: IndexPattern['getFormatterForField'];
}
| |
+
+Returns:
+
+`FieldSpec[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
index 37db063e284ec..4c53af3f8970e 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
@@ -61,7 +61,5 @@ export declare class IndexPattern implements IIndexPattern
| [refreshFields()](./kibana-plugin-plugins-data-public.indexpattern.refreshfields.md) | | |
| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | |
| [save(saveAttempts)](./kibana-plugin-plugins-data-public.indexpattern.save.md) | | |
-| [toJSON()](./kibana-plugin-plugins-data-public.indexpattern.tojson.md) | | |
| [toSpec()](./kibana-plugin-plugins-data-public.indexpattern.tospec.md) | | |
-| [toString()](./kibana-plugin-plugins-data-public.indexpattern.tostring.md) | | |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.tojson.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.tojson.md
deleted file mode 100644
index 0ae04bb424d44..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.tojson.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [toJSON](./kibana-plugin-plugins-data-public.indexpattern.tojson.md)
-
-## IndexPattern.toJSON() method
-
-Signature:
-
-```typescript
-toJSON(): string | undefined;
-```
-Returns:
-
-`string | undefined`
-
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.tostring.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.tostring.md
deleted file mode 100644
index a10b549a7b9eb..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.tostring.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [toString](./kibana-plugin-plugins-data-public.indexpattern.tostring.md)
-
-## IndexPattern.toString() method
-
-Signature:
-
-```typescript
-toString(): string;
-```
-Returns:
-
-`string`
-
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md
index 10b65bdccdf87..5d467a7a9cbce 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md
@@ -9,15 +9,13 @@ Constructs a new instance of the `IndexPatternField` class
Signature:
```typescript
-constructor(indexPattern: IndexPattern, spec: FieldSpec, displayName: string, onNotification: OnNotification);
+constructor(spec: FieldSpec, displayName: string);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| indexPattern | IndexPattern
| |
| spec | FieldSpec
| |
| displayName | string
| |
-| onNotification | OnNotification
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.format.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.format.md
deleted file mode 100644
index f28d5b1bca7e5..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.format.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [format](./kibana-plugin-plugins-data-public.indexpatternfield.format.md)
-
-## IndexPatternField.format property
-
-Signature:
-
-```typescript
-get format(): FieldFormat;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md
deleted file mode 100644
index 3d145cce9d07d..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) > [indexPattern](./kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md)
-
-## IndexPatternField.indexPattern property
-
-Signature:
-
-```typescript
-readonly indexPattern: IndexPattern;
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md
index 713b29ea3a3d3..215188ffa2607 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md
@@ -14,7 +14,7 @@ export declare class IndexPatternField implements IFieldType
| Constructor | Modifiers | Description |
| --- | --- | --- |
-| [(constructor)(indexPattern, spec, displayName, onNotification)](./kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md) | | Constructs a new instance of the IndexPatternField
class |
+| [(constructor)(spec, displayName)](./kibana-plugin-plugins-data-public.indexpatternfield._constructor_.md) | | Constructs a new instance of the IndexPatternField
class |
## Properties
@@ -26,8 +26,6 @@ export declare class IndexPatternField implements IFieldType
| [displayName](./kibana-plugin-plugins-data-public.indexpatternfield.displayname.md) | | string
| |
| [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | string[] | undefined
| |
| [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | boolean
| |
-| [format](./kibana-plugin-plugins-data-public.indexpatternfield.format.md) | | FieldFormat
| |
-| [indexPattern](./kibana-plugin-plugins-data-public.indexpatternfield.indexpattern.md) | | IndexPattern
| |
| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | undefined
| |
| [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) | | string
| |
| [readFromDocValues](./kibana-plugin-plugins-data-public.indexpatternfield.readfromdocvalues.md) | | boolean
| |
@@ -45,5 +43,5 @@ export declare class IndexPatternField implements IFieldType
| Method | Modifiers | Description |
| --- | --- | --- |
| [toJSON()](./kibana-plugin-plugins-data-public.indexpatternfield.tojson.md) | | |
-| [toSpec()](./kibana-plugin-plugins-data-public.indexpatternfield.tospec.md) | | |
+| [toSpec({ getFormatterForField, })](./kibana-plugin-plugins-data-public.indexpatternfield.tospec.md) | | |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md
index 5037cb0049e82..1d80c90991f55 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md
@@ -7,7 +7,9 @@
Signature:
```typescript
-toSpec(): {
+toSpec({ getFormatterForField, }?: {
+ getFormatterForField?: IndexPattern['getFormatterForField'];
+ }): {
count: number;
script: string | undefined;
lang: string | undefined;
@@ -20,9 +22,19 @@ toSpec(): {
aggregatable: boolean;
readFromDocValues: boolean;
subType: import("../types").IFieldSubType | undefined;
- format: any;
+ format: {
+ id: any;
+ params: any;
+ } | undefined;
};
```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| { getFormatterForField, } | {
getFormatterForField?: IndexPattern['getFormatterForField'];
}
| |
+
Returns:
`{
@@ -38,6 +50,9 @@ toSpec(): {
aggregatable: boolean;
readFromDocValues: boolean;
subType: import("../types").IFieldSubType | undefined;
- format: any;
+ format: {
+ id: any;
+ params: any;
+ } | undefined;
}`
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
index 09702df4fdb54..0ab86e0f4dab2 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
@@ -10,7 +10,6 @@
| --- | --- |
| [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) | |
| [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) | |
-| [FieldList](./kibana-plugin-plugins-data-public.fieldlist.md) | |
| [FilterManager](./kibana-plugin-plugins-data-public.filtermanager.md) | |
| [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) | |
| [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) | |
@@ -103,6 +102,7 @@
| [expandShorthand](./kibana-plugin-plugins-data-public.expandshorthand.md) | |
| [extractSearchSourceReferences](./kibana-plugin-plugins-data-public.extractsearchsourcereferences.md) | |
| [fieldFormats](./kibana-plugin-plugins-data-public.fieldformats.md) | |
+| [fieldList](./kibana-plugin-plugins-data-public.fieldlist.md) | |
| [FilterBar](./kibana-plugin-plugins-data-public.filterbar.md) | |
| [getKbnTypeNames](./kibana-plugin-plugins-data-public.getkbntypenames.md) | Get the esTypes known by all kbnFieldTypes {Arrayboolean
| |
| [sortable](./kibana-plugin-plugins-data-server.ifieldtype.sortable.md) | boolean
| |
| [subType](./kibana-plugin-plugins-data-server.ifieldtype.subtype.md) | IFieldSubType
| |
-| [toSpec](./kibana-plugin-plugins-data-server.ifieldtype.tospec.md) | () => FieldSpec
| |
+| [toSpec](./kibana-plugin-plugins-data-server.ifieldtype.tospec.md) | (options?: {
getFormatterForField?: IndexPattern['getFormatterForField'];
}) => FieldSpec
| |
| [type](./kibana-plugin-plugins-data-server.ifieldtype.type.md) | string
| |
| [visualizable](./kibana-plugin-plugins-data-server.ifieldtype.visualizable.md) | boolean
| |
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.tospec.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.tospec.md
index d1863bebce4f0..6f8ee9d9eebf0 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.tospec.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.tospec.md
@@ -7,5 +7,7 @@
Signature:
```typescript
-toSpec?: () => FieldSpec;
+toSpec?: (options?: {
+ getFormatterForField?: IndexPattern['getFormatterForField'];
+ }) => FieldSpec;
```
diff --git a/docs/settings/alert-action-settings.asciidoc b/docs/settings/alert-action-settings.asciidoc
index e02c7f212277e..88858c36643ec 100644
--- a/docs/settings/alert-action-settings.asciidoc
+++ b/docs/settings/alert-action-settings.asciidoc
@@ -37,12 +37,12 @@ You can configure the following settings in the `kibana.yml` file.
[cols="2*<"]
|===
-| `xpack.actions.whitelistedHosts`
+| `xpack.actions.whitelistedHosts` {ess-icon}
| A list of hostnames that {kib} is allowed to connect to when built-in actions are triggered. It defaults to `[*]`, allowing any host, but keep in mind the potential for SSRF attacks when hosts are not explicitly whitelisted. An empty list `[]` can be used to block built-in actions from making any external connections. +
+
Note that hosts associated with built-in actions, such as Slack and PagerDuty, are not automatically whitelisted. If you are not using the default `[*]` setting, you must ensure that the corresponding endpoints are whitelisted as well.
-| `xpack.actions.enabledActionTypes`
+| `xpack.actions.enabledActionTypes` {ess-icon}
| A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.server-log`, `.slack`, `.email`, `.index`, `.pagerduty`, and `.webhook`. An empty list `[]` will disable all action types. +
+
Disabled action types will not appear as an option when creating new connectors, but existing connectors and actions of that type will remain in {kib} and will not function.
diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream.test.js b/packages/kbn-es-archiver/src/lib/streams/concat_stream.test.js
new file mode 100644
index 0000000000000..1498334013d1a
--- /dev/null
+++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream.test.js
@@ -0,0 +1,74 @@
+/*
+ * 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 { createListStream, createPromiseFromStreams, createConcatStream } from './';
+
+describe('concatStream', () => {
+ test('accepts an initial value', async () => {
+ const output = await createPromiseFromStreams([
+ createListStream([1, 2, 3]),
+ createConcatStream([0]),
+ ]);
+
+ expect(output).toEqual([0, 1, 2, 3]);
+ });
+
+ describe(`combines using the previous value's concat method`, () => {
+ test('works with strings', async () => {
+ const output = await createPromiseFromStreams([
+ createListStream(['a', 'b', 'c']),
+ createConcatStream(),
+ ]);
+ expect(output).toEqual('abc');
+ });
+
+ test('works with arrays', async () => {
+ const output = await createPromiseFromStreams([
+ createListStream([[1], [2, 3, 4], [10]]),
+ createConcatStream(),
+ ]);
+ expect(output).toEqual([1, 2, 3, 4, 10]);
+ });
+
+ test('works with a mixture, starting with array', async () => {
+ const output = await createPromiseFromStreams([
+ createListStream([[], 1, 2, 3, 4, [5, 6, 7]]),
+ createConcatStream(),
+ ]);
+ expect(output).toEqual([1, 2, 3, 4, 5, 6, 7]);
+ });
+
+ test('fails when the value does not have a concat method', async () => {
+ let promise;
+ try {
+ promise = createPromiseFromStreams([createListStream([1, '1']), createConcatStream()]);
+ } catch (err) {
+ throw new Error('createPromiseFromStreams() should not fail synchronously');
+ }
+
+ try {
+ await promise;
+ throw new Error('Promise should have rejected');
+ } catch (err) {
+ expect(err).toBeInstanceOf(Error);
+ expect(err.message).toContain('concat');
+ }
+ });
+ });
+});
diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream.ts b/packages/kbn-es-archiver/src/lib/streams/concat_stream.ts
new file mode 100644
index 0000000000000..03dd894067afc
--- /dev/null
+++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream.ts
@@ -0,0 +1,41 @@
+/*
+ * 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 { createReduceStream } from './reduce_stream';
+
+/**
+ * Creates a Transform stream that consumes all provided
+ * values and concatenates them using each values `concat`
+ * method.
+ *
+ * Concatenate strings:
+ * createListStream(['f', 'o', 'o'])
+ * .pipe(createConcatStream())
+ * .on('data', console.log)
+ * // logs "foo"
+ *
+ * Concatenate values into an array:
+ * createListStream([1,2,3])
+ * .pipe(createConcatStream([]))
+ * .on('data', console.log)
+ * // logs "[1,2,3]"
+ */
+export function createConcatStream(initial: any) {
+ return createReduceStream((acc, chunk) => acc.concat(chunk), initial);
+}
diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js
new file mode 100644
index 0000000000000..b742a770b70c8
--- /dev/null
+++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js
@@ -0,0 +1,66 @@
+/*
+ * 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 { Readable } from 'stream';
+
+import { concatStreamProviders } from './concat_stream_providers';
+import { createListStream } from './list_stream';
+import { createConcatStream } from './concat_stream';
+import { createPromiseFromStreams } from './promise_from_streams';
+
+describe('concatStreamProviders() helper', () => {
+ test('writes the data from an array of stream providers into a destination stream in order', async () => {
+ const results = await createPromiseFromStreams([
+ concatStreamProviders([
+ () => createListStream(['foo', 'bar']),
+ () => createListStream(['baz']),
+ () => createListStream(['bug']),
+ ]),
+ createConcatStream(''),
+ ]);
+
+ expect(results).toBe('foobarbazbug');
+ });
+
+ test('emits the errors from a sub-stream to the destination', async () => {
+ const dest = concatStreamProviders([
+ () => createListStream(['foo', 'bar']),
+ () =>
+ new Readable({
+ read() {
+ this.emit('error', new Error('foo'));
+ },
+ }),
+ ]);
+
+ const errorListener = jest.fn();
+ dest.on('error', errorListener);
+
+ await expect(createPromiseFromStreams([dest])).rejects.toThrowErrorMatchingInlineSnapshot(
+ `"foo"`
+ );
+ expect(errorListener.mock.calls).toMatchInlineSnapshot(`
+Array [
+ Array [
+ [Error: foo],
+ ],
+]
+`);
+ });
+});
diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts
new file mode 100644
index 0000000000000..4794d76cc7f84
--- /dev/null
+++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts
@@ -0,0 +1,60 @@
+/*
+ * 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 { PassThrough, TransformOptions } from 'stream';
+
+/**
+ * Write the data and errors from a list of stream providers
+ * to a single stream in order. Stream providers are only
+ * called right before they will be consumed, and only one
+ * provider will be active at a time.
+ */
+export function concatStreamProviders(
+ sourceProviders: Array<() => NodeJS.ReadableStream>,
+ options: TransformOptions = {}
+) {
+ const destination = new PassThrough(options);
+ const queue = sourceProviders.slice();
+
+ (function pipeNext() {
+ const provider = queue.shift();
+
+ if (!provider) {
+ return;
+ }
+
+ const source = provider();
+ const isLast = !queue.length;
+
+ // if there are more sources to pipe, hook
+ // into the source completion
+ if (!isLast) {
+ source.once('end', pipeNext);
+ }
+
+ source
+ // proxy errors from the source to the destination
+ .once('error', (error) => destination.emit('error', error))
+ // pipe the source to the destination but only proxy the
+ // end event if this is the last source
+ .pipe(destination, { end: isLast });
+ })();
+
+ return destination;
+}
diff --git a/packages/kbn-es-archiver/src/lib/streams/filter_stream.test.ts b/packages/kbn-es-archiver/src/lib/streams/filter_stream.test.ts
new file mode 100644
index 0000000000000..28b7f2588628e
--- /dev/null
+++ b/packages/kbn-es-archiver/src/lib/streams/filter_stream.test.ts
@@ -0,0 +1,77 @@
+/*
+ * 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 {
+ createConcatStream,
+ createFilterStream,
+ createListStream,
+ createPromiseFromStreams,
+} from './';
+
+describe('createFilterStream()', () => {
+ test('calls the function with each item in the source stream', async () => {
+ const filter = jest.fn().mockReturnValue(true);
+
+ await createPromiseFromStreams([createListStream(['a', 'b', 'c']), createFilterStream(filter)]);
+
+ expect(filter).toMatchInlineSnapshot(`
+ [MockFunction] {
+ "calls": Array [
+ Array [
+ "a",
+ ],
+ Array [
+ "b",
+ ],
+ Array [
+ "c",
+ ],
+ ],
+ "results": Array [
+ Object {
+ "type": "return",
+ "value": true,
+ },
+ Object {
+ "type": "return",
+ "value": true,
+ },
+ Object {
+ "type": "return",
+ "value": true,
+ },
+ ],
+ }
+ `);
+ });
+
+ test('send the filtered values on the output stream', async () => {
+ const result = await createPromiseFromStreams([
+ createListStream([1, 2, 3]),
+ createFilterStream+ {i18n.translate('xpack.enterpriseSearch.notFound.description', { + defaultMessage: 'The page you’re looking for was not found.', + })} +
+ > + } + actions={ +