mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
This commit is contained in:
parent
cff74466f7
commit
7cf974c44d
309 changed files with 2417 additions and 1228 deletions
|
@ -0,0 +1,15 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggGroupNames](./kibana-plugin-plugins-data-public.agggroupnames.md)
|
||||
|
||||
## AggGroupNames variable
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
AggGroupNames: Readonly<{
|
||||
Buckets: "buckets";
|
||||
Metrics: "metrics";
|
||||
None: "none";
|
||||
}>
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParam](./kibana-plugin-plugins-data-public.aggparam.md)
|
||||
|
||||
## AggParam type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type AggParam = BaseParamType;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamOption](./kibana-plugin-plugins-data-public.aggparamoption.md) > [display](./kibana-plugin-plugins-data-public.aggparamoption.display.md)
|
||||
|
||||
## AggParamOption.display property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
display: string;
|
||||
```
|
|
@ -0,0 +1,22 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamOption](./kibana-plugin-plugins-data-public.aggparamoption.md) > [enabled](./kibana-plugin-plugins-data-public.aggparamoption.enabled.md)
|
||||
|
||||
## AggParamOption.enabled() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
enabled?(agg: AggConfig): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| agg | <code>AggConfig</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamOption](./kibana-plugin-plugins-data-public.aggparamoption.md)
|
||||
|
||||
## AggParamOption interface
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface AggParamOption
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [display](./kibana-plugin-plugins-data-public.aggparamoption.display.md) | <code>string</code> | |
|
||||
| [val](./kibana-plugin-plugins-data-public.aggparamoption.val.md) | <code>string</code> | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [enabled(agg)](./kibana-plugin-plugins-data-public.aggparamoption.enabled.md) | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamOption](./kibana-plugin-plugins-data-public.aggparamoption.md) > [val](./kibana-plugin-plugins-data-public.aggparamoption.val.md)
|
||||
|
||||
## AggParamOption.val property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
val: string;
|
||||
```
|
|
@ -0,0 +1,20 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) > [(constructor)](./kibana-plugin-plugins-data-public.aggparamtype._constructor_.md)
|
||||
|
||||
## AggParamType.(constructor)
|
||||
|
||||
Constructs a new instance of the `AggParamType` class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
constructor(config: Record<string, any>);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| config | <code>Record<string, any></code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) > [allowedAggs](./kibana-plugin-plugins-data-public.aggparamtype.allowedaggs.md)
|
||||
|
||||
## AggParamType.allowedAggs property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
allowedAggs: string[];
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) > [makeAgg](./kibana-plugin-plugins-data-public.aggparamtype.makeagg.md)
|
||||
|
||||
## AggParamType.makeAgg property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
makeAgg: (agg: TAggConfig, state?: any) => TAggConfig;
|
||||
```
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md)
|
||||
|
||||
## AggParamType class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class AggParamType<TAggConfig extends IAggConfig = IAggConfig> extends BaseParamType<TAggConfig>
|
||||
```
|
||||
|
||||
## Constructors
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [(constructor)(config)](./kibana-plugin-plugins-data-public.aggparamtype._constructor_.md) | | Constructs a new instance of the <code>AggParamType</code> class |
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [allowedAggs](./kibana-plugin-plugins-data-public.aggparamtype.allowedaggs.md) | | <code>string[]</code> | |
|
||||
| [makeAgg](./kibana-plugin-plugins-data-public.aggparamtype.makeagg.md) | | <code>(agg: TAggConfig, state?: any) => TAggConfig</code> | |
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggTypeFieldFilters](./kibana-plugin-plugins-data-public.aggtypefieldfilters.md) > [addFilter](./kibana-plugin-plugins-data-public.aggtypefieldfilters.addfilter.md)
|
||||
|
||||
## AggTypeFieldFilters.addFilter() method
|
||||
|
||||
Register a new with this registry. This will be used by the .
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addFilter(filter: AggTypeFieldFilter): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| filter | <code>AggTypeFieldFilter</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggTypeFieldFilters](./kibana-plugin-plugins-data-public.aggtypefieldfilters.md) > [filter](./kibana-plugin-plugins-data-public.aggtypefieldfilters.filter.md)
|
||||
|
||||
## AggTypeFieldFilters.filter() method
|
||||
|
||||
Returns the filtered by all registered filters.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
filter(fields: IndexPatternField[], aggConfig: IAggConfig): IndexPatternField[];
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| fields | <code>IndexPatternField[]</code> | |
|
||||
| aggConfig | <code>IAggConfig</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`IndexPatternField[]`
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggTypeFieldFilters](./kibana-plugin-plugins-data-public.aggtypefieldfilters.md)
|
||||
|
||||
## AggTypeFieldFilters class
|
||||
|
||||
A registry to store which are used to filter down available fields for a specific visualization and .
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
declare class AggTypeFieldFilters
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [addFilter(filter)](./kibana-plugin-plugins-data-public.aggtypefieldfilters.addfilter.md) | | Register a new with this registry. This will be used by the . |
|
||||
| [filter(fields, aggConfig)](./kibana-plugin-plugins-data-public.aggtypefieldfilters.filter.md) | | Returns the filtered by all registered filters. |
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggTypeFilters](./kibana-plugin-plugins-data-public.aggtypefilters.md) > [addFilter](./kibana-plugin-plugins-data-public.aggtypefilters.addfilter.md)
|
||||
|
||||
## AggTypeFilters.addFilter() method
|
||||
|
||||
Register a new with this registry.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addFilter(filter: AggTypeFilter): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| filter | <code>AggTypeFilter</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggTypeFilters](./kibana-plugin-plugins-data-public.aggtypefilters.md) > [filter](./kibana-plugin-plugins-data-public.aggtypefilters.filter.md)
|
||||
|
||||
## AggTypeFilters.filter() method
|
||||
|
||||
Returns the filtered by all registered filters.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
filter(aggTypes: IAggType[], indexPattern: IndexPattern, aggConfig: IAggConfig, aggFilter: string[]): IAggType[];
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| aggTypes | <code>IAggType[]</code> | |
|
||||
| indexPattern | <code>IndexPattern</code> | |
|
||||
| aggConfig | <code>IAggConfig</code> | |
|
||||
| aggFilter | <code>string[]</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`IAggType[]`
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggTypeFilters](./kibana-plugin-plugins-data-public.aggtypefilters.md)
|
||||
|
||||
## AggTypeFilters class
|
||||
|
||||
A registry to store which are used to filter down available aggregations for a specific visualization and .
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
declare class AggTypeFilters
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [addFilter(filter)](./kibana-plugin-plugins-data-public.aggtypefilters.addfilter.md) | | Register a new with this registry. |
|
||||
| [filter(aggTypes, indexPattern, aggConfig, aggFilter)](./kibana-plugin-plugins-data-public.aggtypefilters.filter.md) | | Returns the filtered by all registered filters. |
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [BUCKET\_TYPES](./kibana-plugin-plugins-data-public.bucket_types.md)
|
||||
|
||||
## BUCKET\_TYPES enum
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare enum BUCKET_TYPES
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| --- | --- | --- |
|
||||
| DATE\_HISTOGRAM | <code>"date_histogram"</code> | |
|
||||
| DATE\_RANGE | <code>"date_range"</code> | |
|
||||
| FILTER | <code>"filter"</code> | |
|
||||
| FILTERS | <code>"filters"</code> | |
|
||||
| GEOHASH\_GRID | <code>"geohash_grid"</code> | |
|
||||
| GEOTILE\_GRID | <code>"geotile_grid"</code> | |
|
||||
| HISTOGRAM | <code>"histogram"</code> | |
|
||||
| IP\_RANGE | <code>"ip_range"</code> | |
|
||||
| RANGE | <code>"range"</code> | |
|
||||
| SIGNIFICANT\_TERMS | <code>"significant_terms"</code> | |
|
||||
| TERMS | <code>"terms"</code> | |
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStart](./kibana-plugin-plugins-data-public.datapublicpluginstart.md) > [actions](./kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md)
|
||||
|
||||
## DataPublicPluginStart.actions property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
actions: {
|
||||
createFiltersFromEvent: typeof createFiltersFromEvent;
|
||||
};
|
||||
```
|
|
@ -14,6 +14,7 @@ export interface DataPublicPluginStart
|
|||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [actions](./kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md) | <code>{</code><br/><code> createFiltersFromEvent: typeof createFiltersFromEvent;</code><br/><code> }</code> | |
|
||||
| [autocomplete](./kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md) | <code>AutocompleteStart</code> | |
|
||||
| [fieldFormats](./kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md) | <code>FieldFormatsStart</code> | |
|
||||
| [indexPatterns](./kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md) | <code>IndexPatternsContract</code> | |
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DateRangeKey](./kibana-plugin-plugins-data-public.daterangekey.md) > [from](./kibana-plugin-plugins-data-public.daterangekey.from.md)
|
||||
|
||||
## DateRangeKey.from property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
from: number;
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DateRangeKey](./kibana-plugin-plugins-data-public.daterangekey.md)
|
||||
|
||||
## DateRangeKey interface
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface DateRangeKey
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [from](./kibana-plugin-plugins-data-public.daterangekey.from.md) | <code>number</code> | |
|
||||
| [to](./kibana-plugin-plugins-data-public.daterangekey.to.md) | <code>number</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DateRangeKey](./kibana-plugin-plugins-data-public.daterangekey.md) > [to](./kibana-plugin-plugins-data-public.daterangekey.to.md)
|
||||
|
||||
## DateRangeKey.to property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
to: number;
|
||||
```
|
|
@ -10,7 +10,7 @@
|
|||
fieldFormats: {
|
||||
FieldFormat: typeof FieldFormat;
|
||||
FieldFormatsRegistry: typeof FieldFormatsRegistry;
|
||||
serialize: (agg: import("../../../legacy/core_plugins/data/public/search").AggConfig) => import("../../expressions/common").SerializedFieldFormat<object>;
|
||||
serialize: (agg: import("./search").AggConfig) => import("../../expressions/common").SerializedFieldFormat<object>;
|
||||
DEFAULT_CONVERTER_COLOR: {
|
||||
range: string;
|
||||
regex: string;
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IAggConfig](./kibana-plugin-plugins-data-public.iaggconfig.md)
|
||||
|
||||
## IAggConfig type
|
||||
|
||||
AggConfig
|
||||
|
||||
This class represents an aggregation, which is displayed in the left-hand nav of the Visualize app.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type IAggConfig = AggConfig;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IAggGroupNames](./kibana-plugin-plugins-data-public.iagggroupnames.md)
|
||||
|
||||
## IAggGroupNames type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type IAggGroupNames = $Values<typeof AggGroupNames>;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IAggType](./kibana-plugin-plugins-data-public.iaggtype.md)
|
||||
|
||||
## IAggType type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type IAggType = AggType;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IFieldParamType](./kibana-plugin-plugins-data-public.ifieldparamtype.md)
|
||||
|
||||
## IFieldParamType type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type IFieldParamType = FieldParamType;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IMetricAggType](./kibana-plugin-plugins-data-public.imetricaggtype.md)
|
||||
|
||||
## IMetricAggType type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type IMetricAggType = MetricAggType;
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IpRangeKey](./kibana-plugin-plugins-data-public.iprangekey.md)
|
||||
|
||||
## IpRangeKey type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type IpRangeKey = {
|
||||
type: 'mask';
|
||||
mask: string;
|
||||
} | {
|
||||
type: 'range';
|
||||
from: string;
|
||||
to: string;
|
||||
};
|
||||
```
|
|
@ -8,11 +8,15 @@
|
|||
|
||||
| Class | Description |
|
||||
| --- | --- |
|
||||
| [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) | |
|
||||
| [AggTypeFieldFilters](./kibana-plugin-plugins-data-public.aggtypefieldfilters.md) | A registry to store which are used to filter down available fields for a specific visualization and . |
|
||||
| [AggTypeFilters](./kibana-plugin-plugins-data-public.aggtypefilters.md) | A registry to store which are used to filter down available aggregations for a specific visualization and . |
|
||||
| [FilterManager](./kibana-plugin-plugins-data-public.filtermanager.md) | |
|
||||
| [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) | |
|
||||
| [IndexPatternField](./kibana-plugin-plugins-data-public.indexpatternfield.md) | |
|
||||
| [IndexPatternFieldList](./kibana-plugin-plugins-data-public.indexpatternfieldlist.md) | |
|
||||
| [IndexPatternSelect](./kibana-plugin-plugins-data-public.indexpatternselect.md) | |
|
||||
| [OptionedParamType](./kibana-plugin-plugins-data-public.optionedparamtype.md) | |
|
||||
| [Plugin](./kibana-plugin-plugins-data-public.plugin.md) | |
|
||||
| [SearchError](./kibana-plugin-plugins-data-public.searcherror.md) | |
|
||||
| [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) | |
|
||||
|
@ -22,8 +26,10 @@
|
|||
|
||||
| Enumeration | Description |
|
||||
| --- | --- |
|
||||
| [BUCKET\_TYPES](./kibana-plugin-plugins-data-public.bucket_types.md) | |
|
||||
| [ES\_FIELD\_TYPES](./kibana-plugin-plugins-data-public.es_field_types.md) | \* |
|
||||
| [KBN\_FIELD\_TYPES](./kibana-plugin-plugins-data-public.kbn_field_types.md) | \* |
|
||||
| [METRIC\_TYPES](./kibana-plugin-plugins-data-public.metric_types.md) | |
|
||||
| [QuerySuggestionTypes](./kibana-plugin-plugins-data-public.querysuggestiontypes.md) | |
|
||||
| [SortDirection](./kibana-plugin-plugins-data-public.sortdirection.md) | |
|
||||
|
||||
|
@ -36,15 +42,16 @@
|
|||
| [getQueryLog(uiSettings, storage, appName, language)](./kibana-plugin-plugins-data-public.getquerylog.md) | |
|
||||
| [getSearchErrorType({ message })](./kibana-plugin-plugins-data-public.getsearcherrortype.md) | |
|
||||
| [getTime(indexPattern, timeRange, forceNow)](./kibana-plugin-plugins-data-public.gettime.md) | |
|
||||
| [parseInterval(interval)](./kibana-plugin-plugins-data-public.parseinterval.md) | |
|
||||
| [plugin(initializerContext)](./kibana-plugin-plugins-data-public.plugin.md) | |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| --- | --- |
|
||||
| [AggParamOption](./kibana-plugin-plugins-data-public.aggparamoption.md) | |
|
||||
| [DataPublicPluginSetup](./kibana-plugin-plugins-data-public.datapublicpluginsetup.md) | |
|
||||
| [DataPublicPluginStart](./kibana-plugin-plugins-data-public.datapublicpluginstart.md) | |
|
||||
| [DateRangeKey](./kibana-plugin-plugins-data-public.daterangekey.md) | |
|
||||
| [EsQueryConfig](./kibana-plugin-plugins-data-public.esqueryconfig.md) | |
|
||||
| [FetchOptions](./kibana-plugin-plugins-data-public.fetchoptions.md) | |
|
||||
| [FieldFormatConfig](./kibana-plugin-plugins-data-public.fieldformatconfig.md) | |
|
||||
|
@ -66,6 +73,8 @@
|
|||
| [ISearchStrategy](./kibana-plugin-plugins-data-public.isearchstrategy.md) | Search strategy interface contains a search method that takes in a request and returns a promise that resolves to a response. |
|
||||
| [ISyncSearchRequest](./kibana-plugin-plugins-data-public.isyncsearchrequest.md) | |
|
||||
| [KueryNode](./kibana-plugin-plugins-data-public.kuerynode.md) | |
|
||||
| [OptionedParamEditorProps](./kibana-plugin-plugins-data-public.optionedparameditorprops.md) | |
|
||||
| [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) | |
|
||||
| [Query](./kibana-plugin-plugins-data-public.query.md) | |
|
||||
| [QueryState](./kibana-plugin-plugins-data-public.querystate.md) | All query state service state |
|
||||
| [QuerySuggestionBasic](./kibana-plugin-plugins-data-public.querysuggestionbasic.md) | \* |
|
||||
|
@ -77,12 +86,15 @@
|
|||
| [SavedQueryService](./kibana-plugin-plugins-data-public.savedqueryservice.md) | |
|
||||
| [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) | |
|
||||
| [SearchStrategyProvider](./kibana-plugin-plugins-data-public.searchstrategyprovider.md) | |
|
||||
| [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) | \* |
|
||||
| [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md) | \* |
|
||||
| [TimeRange](./kibana-plugin-plugins-data-public.timerange.md) | |
|
||||
|
||||
## Variables
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| [AggGroupNames](./kibana-plugin-plugins-data-public.agggroupnames.md) | |
|
||||
| [baseFormattersPublic](./kibana-plugin-plugins-data-public.baseformatterspublic.md) | |
|
||||
| [castEsToKbnFieldTypeName](./kibana-plugin-plugins-data-public.castestokbnfieldtypename.md) | Get the KbnFieldType name for an esType string |
|
||||
| [connectToQueryState](./kibana-plugin-plugins-data-public.connecttoquerystate.md) | Helper to setup two-way syncing of global data and a state container |
|
||||
|
@ -96,6 +108,7 @@
|
|||
| [getKbnTypeNames](./kibana-plugin-plugins-data-public.getkbntypenames.md) | Get the esTypes known by all kbnFieldTypes {<!-- -->Array<string>} |
|
||||
| [indexPatterns](./kibana-plugin-plugins-data-public.indexpatterns.md) | |
|
||||
| [QueryStringInput](./kibana-plugin-plugins-data-public.querystringinput.md) | |
|
||||
| [search](./kibana-plugin-plugins-data-public.search.md) | |
|
||||
| [SearchBar](./kibana-plugin-plugins-data-public.searchbar.md) | |
|
||||
| [SYNC\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-public.sync_search_strategy.md) | |
|
||||
| [syncQueryStateWithUrl](./kibana-plugin-plugins-data-public.syncquerystatewithurl.md) | Helper to setup syncing of global data with the URL |
|
||||
|
@ -104,21 +117,29 @@
|
|||
|
||||
| Type Alias | Description |
|
||||
| --- | --- |
|
||||
| [AggParam](./kibana-plugin-plugins-data-public.aggparam.md) | |
|
||||
| [CustomFilter](./kibana-plugin-plugins-data-public.customfilter.md) | |
|
||||
| [EsQuerySortValue](./kibana-plugin-plugins-data-public.esquerysortvalue.md) | |
|
||||
| [ExistsFilter](./kibana-plugin-plugins-data-public.existsfilter.md) | |
|
||||
| [FieldFormatId](./kibana-plugin-plugins-data-public.fieldformatid.md) | id type is needed for creating custom converters. |
|
||||
| [FieldFormatsContentType](./kibana-plugin-plugins-data-public.fieldformatscontenttype.md) | \* |
|
||||
| [FieldFormatsGetConfigFn](./kibana-plugin-plugins-data-public.fieldformatsgetconfigfn.md) | |
|
||||
| [IAggConfig](./kibana-plugin-plugins-data-public.iaggconfig.md) | AggConfig This class represents an aggregation, which is displayed in the left-hand nav of the Visualize app. |
|
||||
| [IAggGroupNames](./kibana-plugin-plugins-data-public.iagggroupnames.md) | |
|
||||
| [IAggType](./kibana-plugin-plugins-data-public.iaggtype.md) | |
|
||||
| [IFieldFormat](./kibana-plugin-plugins-data-public.ifieldformat.md) | |
|
||||
| [IFieldFormatsRegistry](./kibana-plugin-plugins-data-public.ifieldformatsregistry.md) | |
|
||||
| [IFieldParamType](./kibana-plugin-plugins-data-public.ifieldparamtype.md) | |
|
||||
| [IMetricAggType](./kibana-plugin-plugins-data-public.imetricaggtype.md) | |
|
||||
| [IndexPatternAggRestrictions](./kibana-plugin-plugins-data-public.indexpatternaggrestrictions.md) | |
|
||||
| [IndexPatternsContract](./kibana-plugin-plugins-data-public.indexpatternscontract.md) | |
|
||||
| [InputTimeRange](./kibana-plugin-plugins-data-public.inputtimerange.md) | |
|
||||
| [IpRangeKey](./kibana-plugin-plugins-data-public.iprangekey.md) | |
|
||||
| [ISearch](./kibana-plugin-plugins-data-public.isearch.md) | |
|
||||
| [ISearchGeneric](./kibana-plugin-plugins-data-public.isearchgeneric.md) | |
|
||||
| [ISearchSource](./kibana-plugin-plugins-data-public.isearchsource.md) | |
|
||||
| [MatchAllFilter](./kibana-plugin-plugins-data-public.matchallfilter.md) | |
|
||||
| [ParsedInterval](./kibana-plugin-plugins-data-public.parsedinterval.md) | |
|
||||
| [PhraseFilter](./kibana-plugin-plugins-data-public.phrasefilter.md) | |
|
||||
| [PhrasesFilter](./kibana-plugin-plugins-data-public.phrasesfilter.md) | |
|
||||
| [QuerySuggestion](./kibana-plugin-plugins-data-public.querysuggestion.md) | \* |
|
||||
|
@ -130,6 +151,7 @@
|
|||
| [SearchRequest](./kibana-plugin-plugins-data-public.searchrequest.md) | |
|
||||
| [SearchResponse](./kibana-plugin-plugins-data-public.searchresponse.md) | |
|
||||
| [StatefulSearchBarProps](./kibana-plugin-plugins-data-public.statefulsearchbarprops.md) | |
|
||||
| [TabbedAggRow](./kibana-plugin-plugins-data-public.tabbedaggrow.md) | \* |
|
||||
| [TimefilterContract](./kibana-plugin-plugins-data-public.timefiltercontract.md) | |
|
||||
| [TimeHistoryContract](./kibana-plugin-plugins-data-public.timehistorycontract.md) | |
|
||||
| [TSearchStrategyProvider](./kibana-plugin-plugins-data-public.tsearchstrategyprovider.md) | Search strategy provider creates an instance of a search strategy with the request handler context bound to it. This way every search strategy can use whatever information they require from the request context. |
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [METRIC\_TYPES](./kibana-plugin-plugins-data-public.metric_types.md)
|
||||
|
||||
## METRIC\_TYPES enum
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare enum METRIC_TYPES
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| --- | --- | --- |
|
||||
| AVG | <code>"avg"</code> | |
|
||||
| AVG\_BUCKET | <code>"avg_bucket"</code> | |
|
||||
| CARDINALITY | <code>"cardinality"</code> | |
|
||||
| COUNT | <code>"count"</code> | |
|
||||
| CUMULATIVE\_SUM | <code>"cumulative_sum"</code> | |
|
||||
| DERIVATIVE | <code>"derivative"</code> | |
|
||||
| GEO\_BOUNDS | <code>"geo_bounds"</code> | |
|
||||
| GEO\_CENTROID | <code>"geo_centroid"</code> | |
|
||||
| MAX | <code>"max"</code> | |
|
||||
| MAX\_BUCKET | <code>"max_bucket"</code> | |
|
||||
| MEDIAN | <code>"median"</code> | |
|
||||
| MIN | <code>"min"</code> | |
|
||||
| MIN\_BUCKET | <code>"min_bucket"</code> | |
|
||||
| MOVING\_FN | <code>"moving_avg"</code> | |
|
||||
| PERCENTILE\_RANKS | <code>"percentile_ranks"</code> | |
|
||||
| PERCENTILES | <code>"percentiles"</code> | |
|
||||
| SERIAL\_DIFF | <code>"serial_diff"</code> | |
|
||||
| STD\_DEV | <code>"std_dev"</code> | |
|
||||
| SUM | <code>"sum"</code> | |
|
||||
| SUM\_BUCKET | <code>"sum_bucket"</code> | |
|
||||
| TOP\_HITS | <code>"top_hits"</code> | |
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedParamEditorProps](./kibana-plugin-plugins-data-public.optionedparameditorprops.md) > [aggParam](./kibana-plugin-plugins-data-public.optionedparameditorprops.aggparam.md)
|
||||
|
||||
## OptionedParamEditorProps.aggParam property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
aggParam: {
|
||||
options: T[];
|
||||
};
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedParamEditorProps](./kibana-plugin-plugins-data-public.optionedparameditorprops.md)
|
||||
|
||||
## OptionedParamEditorProps interface
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface OptionedParamEditorProps<T = OptionedValueProp>
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [aggParam](./kibana-plugin-plugins-data-public.optionedparameditorprops.aggparam.md) | <code>{</code><br/><code> options: T[];</code><br/><code> }</code> | |
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedParamType](./kibana-plugin-plugins-data-public.optionedparamtype.md) > [(constructor)](./kibana-plugin-plugins-data-public.optionedparamtype._constructor_.md)
|
||||
|
||||
## OptionedParamType.(constructor)
|
||||
|
||||
Constructs a new instance of the `OptionedParamType` class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
constructor(config: Record<string, any>);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| config | <code>Record<string, any></code> | |
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedParamType](./kibana-plugin-plugins-data-public.optionedparamtype.md)
|
||||
|
||||
## OptionedParamType class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class OptionedParamType extends BaseParamType
|
||||
```
|
||||
|
||||
## Constructors
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [(constructor)(config)](./kibana-plugin-plugins-data-public.optionedparamtype._constructor_.md) | | Constructs a new instance of the <code>OptionedParamType</code> class |
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [options](./kibana-plugin-plugins-data-public.optionedparamtype.options.md) | | <code>OptionedValueProp[]</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedParamType](./kibana-plugin-plugins-data-public.optionedparamtype.md) > [options](./kibana-plugin-plugins-data-public.optionedparamtype.options.md)
|
||||
|
||||
## OptionedParamType.options property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
options: OptionedValueProp[];
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) > [disabled](./kibana-plugin-plugins-data-public.optionedvalueprop.disabled.md)
|
||||
|
||||
## OptionedValueProp.disabled property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
disabled?: boolean;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) > [isCompatible](./kibana-plugin-plugins-data-public.optionedvalueprop.iscompatible.md)
|
||||
|
||||
## OptionedValueProp.isCompatible property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isCompatible: (agg: IAggConfig) => boolean;
|
||||
```
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md)
|
||||
|
||||
## OptionedValueProp interface
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface OptionedValueProp
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [disabled](./kibana-plugin-plugins-data-public.optionedvalueprop.disabled.md) | <code>boolean</code> | |
|
||||
| [isCompatible](./kibana-plugin-plugins-data-public.optionedvalueprop.iscompatible.md) | <code>(agg: IAggConfig) => boolean</code> | |
|
||||
| [text](./kibana-plugin-plugins-data-public.optionedvalueprop.text.md) | <code>string</code> | |
|
||||
| [value](./kibana-plugin-plugins-data-public.optionedvalueprop.value.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) > [text](./kibana-plugin-plugins-data-public.optionedvalueprop.text.md)
|
||||
|
||||
## OptionedValueProp.text property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
text: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) > [value](./kibana-plugin-plugins-data-public.optionedvalueprop.value.md)
|
||||
|
||||
## OptionedValueProp.value property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
value: string;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ParsedInterval](./kibana-plugin-plugins-data-public.parsedinterval.md)
|
||||
|
||||
## ParsedInterval type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ParsedInterval = ReturnType<typeof parseEsInterval>;
|
||||
```
|
|
@ -1,22 +0,0 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [parseInterval](./kibana-plugin-plugins-data-public.parseinterval.md)
|
||||
|
||||
## parseInterval() function
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare function parseInterval(interval: string): moment.Duration | null;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| interval | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`moment.Duration | null`
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
setup(core: CoreSetup, { uiActions }: DataSetupDependencies): DataPublicPluginSetup;
|
||||
setup(core: CoreSetup, { expressions, uiActions }: DataSetupDependencies): DataPublicPluginSetup;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
@ -15,7 +15,7 @@ setup(core: CoreSetup, { uiActions }: DataSetupDependencies): DataPublicPluginSe
|
|||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| core | <code>CoreSetup</code> | |
|
||||
| { uiActions } | <code>DataSetupDependencies</code> | |
|
||||
| { expressions, uiActions } | <code>DataSetupDependencies</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
QueryStringInput: React.FC<Pick<Props, "query" | "placeholder" | "onChange" | "onSubmit" | "prepend" | "indexPatterns" | "disableAutoFocus" | "screenTitle" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "dataTestSubj">>
|
||||
QueryStringInput: React.FC<Pick<Props, "query" | "placeholder" | "onChange" | "onSubmit" | "prepend" | "indexPatterns" | "screenTitle" | "dataTestSubj" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition">>
|
||||
```
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [search](./kibana-plugin-plugins-data-public.search.md)
|
||||
|
||||
## search variable
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
search: {
|
||||
aggs: {
|
||||
AggConfigs: typeof AggConfigs;
|
||||
aggGroupNamesMap: () => Record<"buckets" | "metrics", string>;
|
||||
aggTypeFilters: import("./search/aggs/filter/agg_type_filters").AggTypeFilters;
|
||||
CidrMask: typeof CidrMask;
|
||||
convertDateRangeToString: typeof convertDateRangeToString;
|
||||
convertIPRangeToString: (range: import("./search").IpRangeKey, format: (val: any) => string) => string;
|
||||
dateHistogramInterval: typeof dateHistogramInterval;
|
||||
intervalOptions: ({
|
||||
display: string;
|
||||
val: string;
|
||||
enabled(agg: import("./search/aggs/buckets/_bucket_agg_type").IBucketAggConfig): boolean | "" | undefined;
|
||||
} | {
|
||||
display: string;
|
||||
val: string;
|
||||
})[];
|
||||
InvalidEsCalendarIntervalError: typeof InvalidEsCalendarIntervalError;
|
||||
InvalidEsIntervalFormatError: typeof InvalidEsIntervalFormatError;
|
||||
isDateHistogramBucketAggConfig: typeof isDateHistogramBucketAggConfig;
|
||||
isStringType: (agg: import("./search").AggConfig) => boolean;
|
||||
isType: (type: string) => (agg: import("./search").AggConfig) => boolean;
|
||||
isValidEsInterval: typeof isValidEsInterval;
|
||||
isValidInterval: typeof isValidInterval;
|
||||
parentPipelineType: string;
|
||||
parseEsInterval: typeof parseEsInterval;
|
||||
parseInterval: typeof parseInterval;
|
||||
propFilter: typeof propFilter;
|
||||
siblingPipelineType: string;
|
||||
termsAggFilter: string[];
|
||||
toAbsoluteDates: typeof toAbsoluteDates;
|
||||
};
|
||||
getRequestInspectorStats: typeof getRequestInspectorStats;
|
||||
getResponseInspectorStats: typeof getResponseInspectorStats;
|
||||
tabifyAggResponse: typeof tabifyAggResponse;
|
||||
tabifyGetColumns: typeof tabifyGetColumns;
|
||||
}
|
||||
```
|
|
@ -7,7 +7,7 @@
|
|||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "intl" | "indexPatterns" | "filters" | "refreshInterval" | "screenTitle" | "dataTestSubj" | "customSubmitButton" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "onRefresh" | "timeHistory" | "onFiltersUpdated" | "onRefreshChange">, "query" | "isLoading" | "indexPatterns" | "filters" | "refreshInterval" | "screenTitle" | "dataTestSubj" | "customSubmitButton" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "onRefresh" | "timeHistory" | "onFiltersUpdated" | "onRefreshChange">, any> & {
|
||||
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "intl" | "indexPatterns" | "filters" | "refreshInterval" | "screenTitle" | "dataTestSubj" | "customSubmitButton" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "onRefresh" | "timeHistory" | "onFiltersUpdated" | "onRefreshChange"> & ReactIntl.InjectedIntlProps>;
|
||||
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "intl" | "indexPatterns" | "filters" | "onQueryChange" | "customSubmitButton" | "screenTitle" | "dataTestSubj" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "refreshInterval" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "onRefresh" | "timeHistory" | "onFiltersUpdated" | "onRefreshChange">, "query" | "isLoading" | "indexPatterns" | "filters" | "onQueryChange" | "customSubmitButton" | "screenTitle" | "dataTestSubj" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "refreshInterval" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "onRefresh" | "timeHistory" | "onFiltersUpdated" | "onRefreshChange">, any> & {
|
||||
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "intl" | "indexPatterns" | "filters" | "onQueryChange" | "customSubmitButton" | "screenTitle" | "dataTestSubj" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "refreshInterval" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "onRefresh" | "timeHistory" | "onFiltersUpdated" | "onRefreshChange"> & ReactIntl.InjectedIntlProps>;
|
||||
}
|
||||
```
|
||||
|
|
|
@ -11,7 +11,7 @@ getFields(): {
|
|||
type?: string | undefined;
|
||||
query?: import("../..").Query | undefined;
|
||||
filter?: Filter | Filter[] | (() => Filter | Filter[] | undefined) | undefined;
|
||||
sort?: Record<string, import("./types").SortDirectionNumeric | import("./types").SortDirection> | Record<string, import("./types").SortDirectionNumeric | import("./types").SortDirection>[] | undefined;
|
||||
sort?: Record<string, import("./types").SortDirection | import("./types").SortDirectionNumeric> | Record<string, import("./types").SortDirection | import("./types").SortDirectionNumeric>[] | undefined;
|
||||
highlight?: any;
|
||||
highlightAll?: boolean | undefined;
|
||||
aggs?: any;
|
||||
|
@ -32,7 +32,7 @@ getFields(): {
|
|||
type?: string | undefined;
|
||||
query?: import("../..").Query | undefined;
|
||||
filter?: Filter | Filter[] | (() => Filter | Filter[] | undefined) | undefined;
|
||||
sort?: Record<string, import("./types").SortDirectionNumeric | import("./types").SortDirection> | Record<string, import("./types").SortDirectionNumeric | import("./types").SortDirection>[] | undefined;
|
||||
sort?: Record<string, import("./types").SortDirection | import("./types").SortDirectionNumeric> | Record<string, import("./types").SortDirection | import("./types").SortDirectionNumeric>[] | undefined;
|
||||
highlight?: any;
|
||||
highlightAll?: boolean | undefined;
|
||||
aggs?: any;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) > [aggConfig](./kibana-plugin-plugins-data-public.tabbedaggcolumn.aggconfig.md)
|
||||
|
||||
## TabbedAggColumn.aggConfig property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
aggConfig: IAggConfig;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) > [id](./kibana-plugin-plugins-data-public.tabbedaggcolumn.id.md)
|
||||
|
||||
## TabbedAggColumn.id property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
id: string;
|
||||
```
|
|
@ -0,0 +1,22 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md)
|
||||
|
||||
## TabbedAggColumn interface
|
||||
|
||||
\*
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface TabbedAggColumn
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [aggConfig](./kibana-plugin-plugins-data-public.tabbedaggcolumn.aggconfig.md) | <code>IAggConfig</code> | |
|
||||
| [id](./kibana-plugin-plugins-data-public.tabbedaggcolumn.id.md) | <code>string</code> | |
|
||||
| [name](./kibana-plugin-plugins-data-public.tabbedaggcolumn.name.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) > [name](./kibana-plugin-plugins-data-public.tabbedaggcolumn.name.md)
|
||||
|
||||
## TabbedAggColumn.name property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
name: string;
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedAggRow](./kibana-plugin-plugins-data-public.tabbedaggrow.md)
|
||||
|
||||
## TabbedAggRow type
|
||||
|
||||
\*
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type TabbedAggRow = Record<TabbedAggColumn['id'], string | number>;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md) > [columns](./kibana-plugin-plugins-data-public.tabbedtable.columns.md)
|
||||
|
||||
## TabbedTable.columns property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
columns: TabbedAggColumn[];
|
||||
```
|
|
@ -0,0 +1,21 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md)
|
||||
|
||||
## TabbedTable interface
|
||||
|
||||
\*
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface TabbedTable
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [columns](./kibana-plugin-plugins-data-public.tabbedtable.columns.md) | <code>TabbedAggColumn[]</code> | |
|
||||
| [rows](./kibana-plugin-plugins-data-public.tabbedtable.rows.md) | <code>TabbedAggRow[]</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md) > [rows](./kibana-plugin-plugins-data-public.tabbedtable.rows.md)
|
||||
|
||||
## TabbedTable.rows property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
rows: TabbedAggRow[];
|
||||
```
|
|
@ -10,7 +10,7 @@
|
|||
fieldFormats: {
|
||||
FieldFormatsRegistry: typeof FieldFormatsRegistry;
|
||||
FieldFormat: typeof FieldFormat;
|
||||
serializeFieldFormat: (agg: import("../../../legacy/core_plugins/data/public/search").AggConfig) => import("../../expressions/common").SerializedFieldFormat<object>;
|
||||
serializeFieldFormat: (agg: import("../public/search").AggConfig) => import("../../expressions/common").SerializedFieldFormat<object>;
|
||||
BoolFormat: typeof BoolFormat;
|
||||
BytesFormat: typeof BytesFormat;
|
||||
ColorFormat: typeof ColorFormat;
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
| [esQuery](./kibana-plugin-plugins-data-server.esquery.md) | |
|
||||
| [fieldFormats](./kibana-plugin-plugins-data-server.fieldformats.md) | |
|
||||
| [indexPatterns](./kibana-plugin-plugins-data-server.indexpatterns.md) | |
|
||||
| [search](./kibana-plugin-plugins-data-server.search.md) | |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
|
@ -69,5 +70,6 @@
|
|||
| [ICancel](./kibana-plugin-plugins-data-server.icancel.md) | |
|
||||
| [IFieldFormatsRegistry](./kibana-plugin-plugins-data-server.ifieldformatsregistry.md) | |
|
||||
| [ISearch](./kibana-plugin-plugins-data-server.isearch.md) | |
|
||||
| [ParsedInterval](./kibana-plugin-plugins-data-server.parsedinterval.md) | |
|
||||
| [TSearchStrategyProvider](./kibana-plugin-plugins-data-server.tsearchstrategyprovider.md) | Search strategy provider creates an instance of a search strategy with the request handler context bound to it. This way every search strategy can use whatever information they require from the request context. |
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [ParsedInterval](./kibana-plugin-plugins-data-server.parsedinterval.md)
|
||||
|
||||
## ParsedInterval type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ParsedInterval = ReturnType<typeof parseEsInterval>;
|
||||
```
|
|
@ -0,0 +1,22 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [search](./kibana-plugin-plugins-data-server.search.md)
|
||||
|
||||
## search variable
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
search: {
|
||||
aggs: {
|
||||
dateHistogramInterval: typeof dateHistogramInterval;
|
||||
InvalidEsCalendarIntervalError: typeof InvalidEsCalendarIntervalError;
|
||||
InvalidEsIntervalFormatError: typeof InvalidEsIntervalFormatError;
|
||||
isValidEsInterval: typeof isValidEsInterval;
|
||||
isValidInterval: typeof isValidInterval;
|
||||
parseEsInterval: typeof parseEsInterval;
|
||||
parseInterval: typeof parseInterval;
|
||||
toAbsoluteDates: typeof toAbsoluteDates;
|
||||
};
|
||||
}
|
||||
```
|
|
@ -1157,33 +1157,32 @@ In client code, we have a series of plugins which house shared application servi
|
|||
The contracts for these plugins are exposed for you to consume in your own plugin; we have created dedicated exports for the `setup` and `start` contracts in a file called `legacy`. By passing these contracts to your plugin's `setup` and `start` methods, you can mimic the functionality that will eventually be provided in the new platform.
|
||||
|
||||
```ts
|
||||
import { setup, start } from '../core_plugins/data/public/legacy';
|
||||
import { setup, start } from '../core_plugins/embeddables/public/legacy';
|
||||
import { setup, start } from '../core_plugins/visualizations/public/legacy';
|
||||
```
|
||||
|
||||
| Legacy Platform | New Platform | Notes |
|
||||
| ------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `import 'ui/management'` | `management.sections` | |
|
||||
| `import 'ui/apply_filters'` | N/A. Replaced by triggering an APPLY_FILTER_TRIGGER trigger. | Directive is deprecated. |
|
||||
| `import 'ui/filter_bar'` | `import { FilterBar } from '../data/public'` | Directive is deprecated. |
|
||||
| `import 'ui/query_bar'` | `import { QueryStringInput } from '../data/public'` | Directives are deprecated. |
|
||||
| `import 'ui/search_bar'` | `import { SearchBar } from '../data/public'` | Directive is deprecated. |
|
||||
| `import 'ui/kbn_top_nav'` | `import { TopNavMenu } from '../navigation/public'` | Directive was moved to `src/plugins/kibana_legacy`. |
|
||||
| `ui/saved_objects/components/saved_object_finder` | `import { SavedObjectFinder } from '../saved_objects/public'` | |
|
||||
| `core_plugins/interpreter` | `data.expressions` | still in progress |
|
||||
| `ui/courier` | `data.search` | still in progress |
|
||||
| `ui/embeddable` | `embeddables` | still in progress |
|
||||
| `ui/filter_manager` | `data.filter` | -- |
|
||||
| `ui/index_patterns` | `data.indexPatterns` | still in progress |
|
||||
| `ui/registry/field_formats` | `data.fieldFormats` | |
|
||||
| `ui/registry/feature_catalogue` | `home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. |
|
||||
| `ui/registry/vis_types` | `visualizations` | -- |
|
||||
| `ui/vis` | `visualizations` | -- |
|
||||
| `ui/share` | `share` | `showShareContextMenu` is now called `toggleShareContextMenu`, `ShareContextMenuExtensionsRegistryProvider` is now called `register` |
|
||||
| `ui/vis/vis_factory` | `visualizations` | -- |
|
||||
| `ui/vis/vis_filters` | `visualizations.filters` | -- |
|
||||
| `ui/utils/parse_es_interval` | `import { parseEsInterval } from '../data/public'` | `parseEsInterval`, `ParsedInterval`, `InvalidEsCalendarIntervalError`, `InvalidEsIntervalFormatError` items were moved to the `Data Plugin` as a static code |
|
||||
| `core_plugins/interpreter` | `plugins.data.expressions` |
|
||||
| `ui/courier` | `plugins.data.search` |
|
||||
| `ui/agg_types` | `plugins.data.search.aggs` | Most code is available for static import. Stateful code is part of the `search` service.
|
||||
| `ui/embeddable` | `plugins.embeddables` |
|
||||
| `ui/filter_manager` | `plugins.data.filter` | -- |
|
||||
| `ui/index_patterns` | `plugins.data.indexPatterns` |
|
||||
| `import 'ui/management'` | `plugins.management.sections` | |
|
||||
| `ui/registry/field_formats` | `plugins.data.fieldFormats` | |
|
||||
| `ui/registry/feature_catalogue` | `plugins.home.featureCatalogue.register` | Must add `home` as a dependency in your kibana.json. |
|
||||
| `ui/registry/vis_types` | `plugins.visualizations` | -- |
|
||||
| `ui/vis` | `plugins.visualizations` | -- |
|
||||
| `ui/share` | `plugins.share` | `showShareContextMenu` is now called `toggleShareContextMenu`, `ShareContextMenuExtensionsRegistryProvider` is now called `register` |
|
||||
| `ui/vis/vis_factory` | `plugins.visualizations` | -- |
|
||||
| `ui/vis/vis_filters` | `plugins.visualizations.filters` | -- |
|
||||
| `ui/utils/parse_es_interval` | `import { search: { aggs: { parseEsInterval } } } from '../data/public'` | `parseEsInterval`, `ParsedInterval`, `InvalidEsCalendarIntervalError`, `InvalidEsIntervalFormatError` items were moved to the `Data Plugin` as a static code |
|
||||
|
||||
#### Server-side
|
||||
|
||||
|
@ -1262,7 +1261,7 @@ This table shows where these uiExports have moved to in the New Platform. In mos
|
|||
| `validations` | | Part of SavedObjects, see [#33587](https://github.com/elastic/kibana/issues/33587) |
|
||||
| `visEditorTypes` | | |
|
||||
| `visTypeEnhancers` | | |
|
||||
| `visTypes` | | |
|
||||
| `visTypes` | `plugins.visualizations.types` | |
|
||||
| `visualize` | | |
|
||||
|
||||
Examples:
|
||||
|
|
|
@ -35,7 +35,6 @@ export default function DataPlugin(kibana: any) {
|
|||
},
|
||||
init: (server: Legacy.Server) => ({}),
|
||||
uiExports: {
|
||||
interpreter: ['plugins/data/search/expressions/boot'],
|
||||
injectDefaultVars: () => ({}),
|
||||
mappings,
|
||||
savedObjectsManagement: {
|
||||
|
|
|
@ -17,62 +17,10 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
// /// Define plugin function
|
||||
import { DataPlugin as Plugin } from './plugin';
|
||||
|
||||
export function plugin() {
|
||||
return new Plugin();
|
||||
}
|
||||
|
||||
// /// Export types & static code
|
||||
|
||||
/** @public types */
|
||||
export { DataSetup, DataStart } from './plugin';
|
||||
export {
|
||||
// agg_types
|
||||
AggParam, // only the type is used externally, only in vis editor
|
||||
AggParamOption, // only the type is used externally
|
||||
DateRangeKey, // only used in field formatter deserialization, which will live in data
|
||||
IAggConfig,
|
||||
IAggConfigs,
|
||||
IAggType,
|
||||
IFieldParamType,
|
||||
IMetricAggType,
|
||||
IpRangeKey, // only used in field formatter deserialization, which will live in data
|
||||
OptionedParamEditorProps, // only type is used externally
|
||||
OptionedValueProp, // only type is used externally
|
||||
} from './search/types';
|
||||
|
||||
/** @public static code */
|
||||
export * from '../common';
|
||||
export {
|
||||
// agg_types TODO need to group these under a namespace or prefix
|
||||
AggConfigs,
|
||||
AggParamType,
|
||||
AggTypeFilters, // TODO convert to interface
|
||||
aggTypeFilters,
|
||||
AggTypeFieldFilters, // TODO convert to interface
|
||||
AggGroupNames,
|
||||
aggGroupNamesMap,
|
||||
BUCKET_TYPES,
|
||||
CidrMask,
|
||||
convertDateRangeToString,
|
||||
convertIPRangeToString,
|
||||
intervalOptions, // only used in Discover
|
||||
isDateHistogramBucketAggConfig,
|
||||
isStringType,
|
||||
isType,
|
||||
isValidInterval,
|
||||
METRIC_TYPES,
|
||||
OptionedParamType,
|
||||
parentPipelineType,
|
||||
propFilter,
|
||||
siblingPipelineType,
|
||||
termsAggFilter,
|
||||
toAbsoluteDates,
|
||||
// search_source
|
||||
getRequestInspectorStats,
|
||||
getResponseInspectorStats,
|
||||
tabifyAggResponse,
|
||||
tabifyGetColumns,
|
||||
} from './search';
|
||||
|
|
|
@ -39,6 +39,6 @@ import { plugin } from '.';
|
|||
|
||||
const dataPlugin = plugin();
|
||||
|
||||
export const setup = dataPlugin.setup(npSetup.core, npSetup.plugins);
|
||||
export const setup = dataPlugin.setup(npSetup.core);
|
||||
|
||||
export const start = dataPlugin.start(npStart.core, npStart.plugins);
|
||||
export const start = dataPlugin.start(npStart.core);
|
||||
|
|
|
@ -18,73 +18,20 @@
|
|||
*/
|
||||
|
||||
import { CoreSetup, CoreStart, Plugin } from 'kibana/public';
|
||||
import { DataPublicPluginStart, DataPublicPluginSetup } from '../../../../plugins/data/public';
|
||||
import { ExpressionsSetup } from '../../../../plugins/expressions/public';
|
||||
|
||||
import {
|
||||
setIndexPatterns,
|
||||
setQueryService,
|
||||
setUiSettings,
|
||||
setInjectedMetadata,
|
||||
setFieldFormats,
|
||||
setSearchService,
|
||||
setOverlays,
|
||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||
} from '../../../../plugins/data/public/services';
|
||||
import { setSearchServiceShim } from './services';
|
||||
import {
|
||||
selectRangeAction,
|
||||
SelectRangeActionContext,
|
||||
ACTION_SELECT_RANGE,
|
||||
} from './actions/select_range_action';
|
||||
import {
|
||||
valueClickAction,
|
||||
ACTION_VALUE_CLICK,
|
||||
ValueClickActionContext,
|
||||
} from './actions/value_click_action';
|
||||
import {
|
||||
SELECT_RANGE_TRIGGER,
|
||||
VALUE_CLICK_TRIGGER,
|
||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||
} from '../../../../plugins/embeddable/public/lib/triggers';
|
||||
import { UiActionsSetup, UiActionsStart } from '../../../../plugins/ui_actions/public';
|
||||
|
||||
import { SearchSetup, SearchStart, SearchService } from './search/search_service';
|
||||
|
||||
export interface DataPluginSetupDependencies {
|
||||
data: DataPublicPluginSetup;
|
||||
expressions: ExpressionsSetup;
|
||||
uiActions: UiActionsSetup;
|
||||
}
|
||||
|
||||
export interface DataPluginStartDependencies {
|
||||
data: DataPublicPluginStart;
|
||||
uiActions: UiActionsStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for this plugin's returned `setup` contract.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface DataSetup {
|
||||
search: SearchSetup;
|
||||
}
|
||||
export interface DataSetup {} // eslint-disable-line @typescript-eslint/no-empty-interface
|
||||
|
||||
/**
|
||||
* Interface for this plugin's returned `start` contract.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface DataStart {
|
||||
search: SearchStart;
|
||||
}
|
||||
declare module '../../../../plugins/ui_actions/public' {
|
||||
export interface ActionContextMapping {
|
||||
[ACTION_SELECT_RANGE]: SelectRangeActionContext;
|
||||
[ACTION_VALUE_CLICK]: ValueClickActionContext;
|
||||
}
|
||||
}
|
||||
export interface DataStart {} // eslint-disable-line @typescript-eslint/no-empty-interface
|
||||
|
||||
/**
|
||||
* Data Plugin - public
|
||||
|
@ -98,43 +45,13 @@ declare module '../../../../plugins/ui_actions/public' {
|
|||
* or static code.
|
||||
*/
|
||||
|
||||
export class DataPlugin
|
||||
implements
|
||||
Plugin<DataSetup, DataStart, DataPluginSetupDependencies, DataPluginStartDependencies> {
|
||||
private readonly search = new SearchService();
|
||||
|
||||
public setup(core: CoreSetup, { data, uiActions }: DataPluginSetupDependencies) {
|
||||
setInjectedMetadata(core.injectedMetadata);
|
||||
|
||||
uiActions.attachAction(
|
||||
SELECT_RANGE_TRIGGER,
|
||||
selectRangeAction(data.query.filterManager, data.query.timefilter.timefilter)
|
||||
);
|
||||
|
||||
uiActions.attachAction(
|
||||
VALUE_CLICK_TRIGGER,
|
||||
valueClickAction(data.query.filterManager, data.query.timefilter.timefilter)
|
||||
);
|
||||
|
||||
return {
|
||||
search: this.search.setup(core),
|
||||
};
|
||||
export class DataPlugin implements Plugin<DataSetup, DataStart> {
|
||||
public setup(core: CoreSetup) {
|
||||
return {};
|
||||
}
|
||||
|
||||
public start(core: CoreStart, { data, uiActions }: DataPluginStartDependencies): DataStart {
|
||||
const search = this.search.start(core);
|
||||
setSearchServiceShim(search);
|
||||
|
||||
setUiSettings(core.uiSettings);
|
||||
setQueryService(data.query);
|
||||
setIndexPatterns(data.indexPatterns);
|
||||
setFieldFormats(data.fieldFormats);
|
||||
setSearchService(data.search);
|
||||
setOverlays(core.overlays);
|
||||
|
||||
return {
|
||||
search,
|
||||
};
|
||||
public start(core: CoreStart): DataStart {
|
||||
return {};
|
||||
}
|
||||
|
||||
public stop() {}
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
/*
|
||||
* 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 _ from 'lodash';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import chrome from 'ui/chrome';
|
||||
|
||||
import { createFilterFilters } from './create_filter/filters';
|
||||
import { toAngularJSON } from '../utils';
|
||||
import { BucketAggType } from './_bucket_agg_type';
|
||||
import { BUCKET_TYPES } from './bucket_agg_types';
|
||||
import { Storage } from '../../../../../../../plugins/kibana_utils/public';
|
||||
|
||||
import { getQueryLog, esQuery, Query } from '../../../../../../../plugins/data/public';
|
||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||
import { getUiSettings } from '../../../../../../../plugins/data/public/services';
|
||||
|
||||
const config = chrome.getUiSettingsClient();
|
||||
|
||||
const filtersTitle = i18n.translate('data.search.aggs.buckets.filtersTitle', {
|
||||
defaultMessage: 'Filters',
|
||||
description:
|
||||
'The name of an aggregation, that allows to specify multiple individual filters to group data by.',
|
||||
});
|
||||
|
||||
interface FilterValue {
|
||||
input: Query;
|
||||
label: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export const filtersBucketAgg = new BucketAggType({
|
||||
name: BUCKET_TYPES.FILTERS,
|
||||
title: filtersTitle,
|
||||
createFilter: createFilterFilters,
|
||||
customLabels: false,
|
||||
params: [
|
||||
{
|
||||
name: 'filters',
|
||||
// TODO need to get rid of reference to `config` below
|
||||
default: [{ input: { query: '', language: config.get('search:queryLanguage') }, label: '' }],
|
||||
write(aggConfig, output) {
|
||||
const uiSettings = getUiSettings();
|
||||
const inFilters: FilterValue[] = aggConfig.params.filters;
|
||||
if (!_.size(inFilters)) return;
|
||||
|
||||
inFilters.forEach(filter => {
|
||||
const persistedLog = getQueryLog(
|
||||
uiSettings,
|
||||
new Storage(window.localStorage),
|
||||
'vis_default_editor',
|
||||
filter.input.language
|
||||
);
|
||||
persistedLog.add(filter.input.query);
|
||||
});
|
||||
|
||||
const outFilters = _.transform(
|
||||
inFilters,
|
||||
function(filters, filter) {
|
||||
const input = _.cloneDeep(filter.input);
|
||||
|
||||
if (!input) {
|
||||
console.log('malformed filter agg params, missing "input" query'); // eslint-disable-line no-console
|
||||
return;
|
||||
}
|
||||
|
||||
const esQueryConfigs = esQuery.getEsQueryConfig(uiSettings);
|
||||
const query = esQuery.buildEsQuery(
|
||||
aggConfig.getIndexPattern(),
|
||||
[input],
|
||||
[],
|
||||
esQueryConfigs
|
||||
);
|
||||
|
||||
if (!query) {
|
||||
console.log('malformed filter agg params, missing "query" on input'); // eslint-disable-line no-console
|
||||
return;
|
||||
}
|
||||
|
||||
const matchAllLabel = filter.input.query === '' ? '*' : '';
|
||||
const label =
|
||||
filter.label ||
|
||||
matchAllLabel ||
|
||||
(typeof filter.input.query === 'string'
|
||||
? filter.input.query
|
||||
: toAngularJSON(filter.input.query));
|
||||
filters[label] = { query };
|
||||
},
|
||||
{}
|
||||
);
|
||||
|
||||
if (!_.size(outFilters)) return;
|
||||
|
||||
const params = output.params || (output.params = {});
|
||||
params.filters = outFilters;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
* 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 {
|
||||
AggTypesRegistry,
|
||||
AggTypesRegistrySetup,
|
||||
AggTypesRegistryStart,
|
||||
} from './agg_types_registry';
|
||||
export { AggType } from './agg_type';
|
||||
export { aggTypes } from './agg_types';
|
||||
export { AggConfig } from './agg_config';
|
||||
export { AggConfigs } from './agg_configs';
|
||||
export { FieldParamType } from './param_types';
|
||||
export { getCalculateAutoTimeExpression } from './buckets/lib/date_utils';
|
||||
export { MetricAggType } from './metrics/metric_agg_type';
|
||||
export { AggTypeFilters } from './filter';
|
||||
export { aggTypeFieldFilters, AggTypeFieldFilters } from './param_types/filter';
|
||||
export {
|
||||
parentPipelineAggHelper,
|
||||
parentPipelineType,
|
||||
} from './metrics/lib/parent_pipeline_agg_helper';
|
||||
export {
|
||||
siblingPipelineAggHelper,
|
||||
siblingPipelineType,
|
||||
} from './metrics/lib/sibling_pipeline_agg_helper';
|
||||
|
||||
// static code
|
||||
export { AggParamType } from './param_types/agg';
|
||||
export { AggGroupNames, aggGroupNamesMap } from './agg_groups';
|
||||
export { intervalOptions } from './buckets/_interval_options'; // only used in Discover
|
||||
export { isDateHistogramBucketAggConfig } from './buckets/date_histogram';
|
||||
export { termsAggFilter } from './buckets/terms';
|
||||
export { isType, isStringType } from './buckets/migrate_include_exclude_format';
|
||||
export { CidrMask } from './buckets/lib/cidr_mask';
|
||||
export { convertDateRangeToString } from './buckets/date_range';
|
||||
export { toAbsoluteDates } from './buckets/lib/date_utils';
|
||||
export { convertIPRangeToString } from './buckets/ip_range';
|
||||
export { aggTypeFilters, propFilter } from './filter';
|
||||
export { OptionedParamType } from './param_types/optioned';
|
||||
export { isValidInterval } from './utils';
|
||||
export { BUCKET_TYPES } from './buckets/bucket_agg_types';
|
||||
export { METRIC_TYPES } from './metrics/metric_agg_types';
|
||||
|
||||
// types
|
||||
export { CreateAggConfigParams, IAggConfig, IAggConfigs } from './types';
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* 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 { IAggConfig } from './agg_config';
|
||||
export { CreateAggConfigParams, IAggConfigs } from './agg_configs';
|
||||
export { IAggType } from './agg_type';
|
||||
export { AggParam, AggParamOption } from './agg_params';
|
||||
export { IFieldParamType } from './param_types';
|
||||
export { IMetricAggType } from './metrics/metric_agg_type';
|
||||
export { DateRangeKey } from './buckets/date_range';
|
||||
export { IpRangeKey } from './buckets/ip_range';
|
||||
export { OptionedValueProp, OptionedParamEditorProps } from './param_types/optioned';
|
|
@ -1,120 +0,0 @@
|
|||
/*
|
||||
* 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 { CoreSetup, CoreStart } from '../../../../../core/public';
|
||||
import { IndexPattern } from '../../../../../plugins/data/public';
|
||||
import {
|
||||
aggTypes,
|
||||
AggType,
|
||||
AggTypesRegistry,
|
||||
AggTypesRegistrySetup,
|
||||
AggTypesRegistryStart,
|
||||
AggConfig,
|
||||
AggConfigs,
|
||||
CreateAggConfigParams,
|
||||
FieldParamType,
|
||||
getCalculateAutoTimeExpression,
|
||||
MetricAggType,
|
||||
aggTypeFieldFilters,
|
||||
parentPipelineAggHelper,
|
||||
siblingPipelineAggHelper,
|
||||
} from './aggs';
|
||||
|
||||
interface AggsSetup {
|
||||
calculateAutoTimeExpression: ReturnType<typeof getCalculateAutoTimeExpression>;
|
||||
types: AggTypesRegistrySetup;
|
||||
}
|
||||
|
||||
interface AggsStartLegacy {
|
||||
AggConfig: typeof AggConfig;
|
||||
AggType: typeof AggType;
|
||||
aggTypeFieldFilters: typeof aggTypeFieldFilters;
|
||||
FieldParamType: typeof FieldParamType;
|
||||
MetricAggType: typeof MetricAggType;
|
||||
parentPipelineAggHelper: typeof parentPipelineAggHelper;
|
||||
siblingPipelineAggHelper: typeof siblingPipelineAggHelper;
|
||||
}
|
||||
|
||||
interface AggsStart {
|
||||
calculateAutoTimeExpression: ReturnType<typeof getCalculateAutoTimeExpression>;
|
||||
createAggConfigs: (
|
||||
indexPattern: IndexPattern,
|
||||
configStates?: CreateAggConfigParams[],
|
||||
schemas?: Record<string, any>
|
||||
) => InstanceType<typeof AggConfigs>;
|
||||
types: AggTypesRegistryStart;
|
||||
__LEGACY: AggsStartLegacy;
|
||||
}
|
||||
|
||||
export interface SearchSetup {
|
||||
aggs: AggsSetup;
|
||||
}
|
||||
|
||||
export interface SearchStart {
|
||||
aggs: AggsStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* The contract provided here is a new platform shim for ui/agg_types.
|
||||
*
|
||||
* Once it has been refactored to work with new platform services,
|
||||
* it will move into the existing search service in src/plugins/data/public/search
|
||||
*/
|
||||
export class SearchService {
|
||||
private readonly aggTypesRegistry = new AggTypesRegistry();
|
||||
|
||||
public setup(core: CoreSetup): SearchSetup {
|
||||
const aggTypesSetup = this.aggTypesRegistry.setup();
|
||||
aggTypes.buckets.forEach(b => aggTypesSetup.registerBucket(b));
|
||||
aggTypes.metrics.forEach(m => aggTypesSetup.registerMetric(m));
|
||||
|
||||
return {
|
||||
aggs: {
|
||||
calculateAutoTimeExpression: getCalculateAutoTimeExpression(core.uiSettings),
|
||||
types: aggTypesSetup,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
public start(core: CoreStart): SearchStart {
|
||||
const aggTypesStart = this.aggTypesRegistry.start();
|
||||
return {
|
||||
aggs: {
|
||||
calculateAutoTimeExpression: getCalculateAutoTimeExpression(core.uiSettings),
|
||||
createAggConfigs: (indexPattern, configStates = [], schemas) => {
|
||||
return new AggConfigs(indexPattern, configStates, {
|
||||
typesRegistry: aggTypesStart,
|
||||
});
|
||||
},
|
||||
types: aggTypesStart,
|
||||
__LEGACY: {
|
||||
AggConfig, // TODO make static
|
||||
AggType,
|
||||
aggTypeFieldFilters,
|
||||
FieldParamType,
|
||||
MetricAggType,
|
||||
parentPipelineAggHelper, // TODO make static
|
||||
siblingPipelineAggHelper, // TODO make static
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
public stop() {}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* 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 { createGetterSetter } from '../../../../plugins/kibana_utils/public';
|
||||
import { SearchStart } from './search/search_service';
|
||||
|
||||
export const [getSearchServiceShim, setSearchServiceShim] = createGetterSetter<SearchStart>(
|
||||
'searchShim'
|
||||
);
|
|
@ -50,13 +50,15 @@ export function setServices(newServices: any) {
|
|||
// EXPORT legacy static dependencies, should be migrated when available in a new version;
|
||||
export { angular };
|
||||
export { wrapInI18nContext } from 'ui/i18n';
|
||||
export { getRequestInspectorStats, getResponseInspectorStats } from '../../../data/public';
|
||||
import { search } from '../../../../../plugins/data/public';
|
||||
export const { getRequestInspectorStats, getResponseInspectorStats, tabifyAggResponse } = search;
|
||||
// @ts-ignore
|
||||
export { shortenDottedString } from '../../common/utils/shorten_dotted_string';
|
||||
// @ts-ignore
|
||||
export { intervalOptions } from 'ui/agg_types';
|
||||
export { subscribeWithScope } from 'ui/utils/subscribe_with_scope';
|
||||
// @ts-ignore
|
||||
export { timezoneProvider } from 'ui/vis/lib/timezone';
|
||||
export { tabifyAggResponse } from '../../../data/public';
|
||||
export { unhashUrl } from '../../../../../plugins/kibana_utils/public';
|
||||
export {
|
||||
ensureDefaultIndexPattern,
|
||||
|
|
|
@ -20,6 +20,8 @@ import React from 'react';
|
|||
import { render } from 'enzyme';
|
||||
import { FieldName } from './field_name';
|
||||
|
||||
jest.mock('ui/new_platform');
|
||||
|
||||
// Note that it currently provides just 2 basic tests, there should be more, but
|
||||
// the components involved will soon change
|
||||
test('FieldName renders a string field by providing fieldType and fieldName', () => {
|
||||
|
|
|
@ -21,7 +21,7 @@ import classNames from 'classnames';
|
|||
import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
|
||||
|
||||
import { FieldIcon, FieldIconProps } from '../../../../../../../../../plugins/kibana_react/public';
|
||||
import { shortenDottedString } from '../../../../../../../../../plugins/data/common/utils';
|
||||
import { shortenDottedString } from '../../../../kibana_services';
|
||||
import { getFieldTypeName } from './field_type_name';
|
||||
|
||||
// property field is provided at discover's field chooser
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { IndexPattern } from '../../../../../kibana_services';
|
||||
import { shortenDottedString } from '../../../../../../../../../../plugins/data/common/utils';
|
||||
import { IndexPattern, shortenDottedString } from '../../../../../kibana_services';
|
||||
|
||||
export type SortOrder = [string, string];
|
||||
export interface ColumnProps {
|
||||
|
|
|
@ -25,6 +25,8 @@ import { findTestSubject } from '@elastic/eui/lib/test';
|
|||
import { SortOrder } from './helpers';
|
||||
import { IndexPattern, IFieldType } from '../../../../../kibana_services';
|
||||
|
||||
jest.mock('ui/new_platform');
|
||||
|
||||
function getMockIndexPattern() {
|
||||
return ({
|
||||
id: 'test',
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { VisState, VisParams } from 'src/legacy/core_plugins/visualizations/public';
|
||||
import { IAggType, IAggConfig, AggGroupNames } from '../legacy_imports';
|
||||
import { IAggType, IAggConfig, IAggGroupNames } from '../legacy_imports';
|
||||
import { Schema } from '../schemas';
|
||||
|
||||
type AggId = IAggConfig['id'];
|
||||
|
@ -29,7 +29,7 @@ export type ReorderAggs = (sourceAgg: IAggConfig, destinationAgg: IAggConfig) =>
|
|||
|
||||
export interface DefaultEditorCommonProps {
|
||||
formIsTouched: boolean;
|
||||
groupName: AggGroupNames;
|
||||
groupName: IAggGroupNames;
|
||||
metricAggs: IAggConfig[];
|
||||
state: VisState;
|
||||
setAggParamValue: <T extends keyof AggParams>(
|
||||
|
|
|
@ -18,25 +18,25 @@
|
|||
*/
|
||||
|
||||
/* `ui/agg_types` dependencies */
|
||||
export { BUCKET_TYPES, METRIC_TYPES } from '../../../../plugins/data/public';
|
||||
export {
|
||||
AggType,
|
||||
IAggType,
|
||||
IAggConfig,
|
||||
IAggConfigs,
|
||||
AggParam,
|
||||
AggGroupNames,
|
||||
aggGroupNamesMap,
|
||||
AggParam,
|
||||
AggParamType,
|
||||
AggType,
|
||||
aggTypes,
|
||||
createAggConfigs,
|
||||
FieldParamType,
|
||||
IAggConfig,
|
||||
IAggConfigs,
|
||||
IAggGroupNames,
|
||||
IAggType,
|
||||
IFieldParamType,
|
||||
BUCKET_TYPES,
|
||||
METRIC_TYPES,
|
||||
termsAggFilter,
|
||||
} from 'ui/agg_types';
|
||||
export { aggTypeFilters, propFilter } from 'ui/agg_types';
|
||||
export { aggTypeFieldFilters } from 'ui/agg_types';
|
||||
export { AggParamType } from 'ui/agg_types';
|
||||
export { MetricAggType, IMetricAggType } from 'ui/agg_types';
|
||||
export { parentPipelineType } from 'ui/agg_types';
|
||||
export { siblingPipelineType } from 'ui/agg_types';
|
||||
|
@ -45,5 +45,3 @@ export { OptionedValueProp, OptionedParamEditorProps, OptionedParamType } from '
|
|||
export { isValidInterval } from 'ui/agg_types';
|
||||
export { AggParamOption } from 'ui/agg_types';
|
||||
export { CidrMask } from 'ui/agg_types';
|
||||
|
||||
export * from 'ui/vis/lib';
|
||||
|
|
|
@ -22,8 +22,7 @@ import _ from 'lodash';
|
|||
import { Optional } from '@kbn/utility-types';
|
||||
|
||||
import { IndexedArray } from 'ui/indexed_array';
|
||||
import { AggGroupNames } from '../../data/public/search/aggs/agg_groups';
|
||||
import { AggParam } from '../../data/public/search/aggs/agg_params';
|
||||
import { AggGroupNames, AggParam, IAggGroupNames } from '../../../../plugins/data/public';
|
||||
|
||||
export interface ISchemas {
|
||||
[AggGroupNames.Buckets]: Schema[];
|
||||
|
@ -34,7 +33,7 @@ export interface ISchemas {
|
|||
export interface Schema {
|
||||
aggFilter: string[];
|
||||
editor: boolean | string;
|
||||
group: AggGroupNames;
|
||||
group: IAggGroupNames;
|
||||
max: number;
|
||||
min: number;
|
||||
name: string;
|
||||
|
|
|
@ -39,7 +39,7 @@ export type ComboBoxGroupedOptions<T> = Array<GroupOrOption<T>>;
|
|||
*
|
||||
* @returns An array of grouped and sorted alphabetically `objects` that are compatible with EuiComboBox options.
|
||||
*/
|
||||
function groupAndSortBy<
|
||||
export function groupAndSortBy<
|
||||
T extends Record<TGroupBy | TLabelName, string>,
|
||||
TGroupBy extends string = 'type',
|
||||
TLabelName extends string = 'title'
|
||||
|
@ -78,5 +78,3 @@ function groupAndSortBy<
|
|||
function sortByLabel<T>(a: GroupOrOption<T>, b: GroupOrOption<T>) {
|
||||
return (a.label || '').toLowerCase().localeCompare((b.label || '').toLowerCase());
|
||||
}
|
||||
|
||||
export { groupAndSortBy };
|
|
@ -23,6 +23,23 @@ import { functionWrapper } from '../../../../plugins/expressions/common/expressi
|
|||
|
||||
jest.mock('ui/new_platform');
|
||||
|
||||
jest.mock('../../vis_default_editor/public/legacy_imports', () => ({
|
||||
propFilter: jest.fn(),
|
||||
AggGroupNames: {
|
||||
Buckets: 'buckets',
|
||||
Metrics: 'metrics',
|
||||
},
|
||||
aggTypeFilters: {
|
||||
addFilter: jest.fn(),
|
||||
},
|
||||
BUCKET_TYPES: {
|
||||
DATE_HISTOGRAM: 'date_histogram',
|
||||
},
|
||||
METRIC_TYPES: {
|
||||
TOP_HITS: 'top_hits',
|
||||
},
|
||||
}));
|
||||
|
||||
describe('interpreter/functions#metric', () => {
|
||||
const fn = functionWrapper(createMetricVisFn());
|
||||
const context = {
|
||||
|
|
|
@ -36,6 +36,23 @@ import { createMetricVisTypeDefinition } from './metric_vis_type';
|
|||
|
||||
jest.mock('ui/new_platform');
|
||||
|
||||
jest.mock('../../vis_default_editor/public/legacy_imports', () => ({
|
||||
propFilter: jest.fn(),
|
||||
AggGroupNames: {
|
||||
Buckets: 'buckets',
|
||||
Metrics: 'metrics',
|
||||
},
|
||||
aggTypeFilters: {
|
||||
addFilter: jest.fn(),
|
||||
},
|
||||
BUCKET_TYPES: {
|
||||
DATE_HISTOGRAM: 'date_histogram',
|
||||
},
|
||||
METRIC_TYPES: {
|
||||
TOP_HITS: 'top_hits',
|
||||
},
|
||||
}));
|
||||
|
||||
describe('metric_vis - createMetricVisTypeDefinition', () => {
|
||||
let vis: Vis;
|
||||
|
||||
|
|
|
@ -24,7 +24,8 @@ export { IAggConfig, AggGroupNames, Schemas } from 'ui/agg_types';
|
|||
export { PaginateDirectiveProvider } from 'ui/directives/paginate';
|
||||
// @ts-ignore
|
||||
export { PaginateControlsDirectiveProvider } from 'ui/directives/paginate';
|
||||
export { tabifyAggResponse, tabifyGetColumns } from '../../data/public';
|
||||
import { search } from '../../../../plugins/data/public';
|
||||
export const { tabifyAggResponse, tabifyGetColumns } = search;
|
||||
export {
|
||||
configureAppAngularModule,
|
||||
KbnAccessibleClickProvider,
|
||||
|
|
|
@ -21,7 +21,8 @@ import React, { useMemo, useCallback } from 'react';
|
|||
import { EuiFormRow, EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { isValidEsInterval } from '../../../../core_plugins/data/common';
|
||||
import { search } from '../../../../../plugins/data/public';
|
||||
const { isValidEsInterval } = search.aggs;
|
||||
import { useValidation } from '../../../vis_default_editor/public';
|
||||
|
||||
const intervalOptions = [
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
import moment from 'moment';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { get } from 'lodash';
|
||||
import { parseEsInterval } from '../../../../data/public';
|
||||
import { search } from '../../../../../../plugins/data/public';
|
||||
const { parseEsInterval } = search.aggs;
|
||||
import { GTE_INTERVAL_RE } from '../../../../../../plugins/vis_type_timeseries/common/interval_regexp';
|
||||
|
||||
export const AUTO_INTERVAL = 'auto';
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
|
||||
import { GTE_INTERVAL_RE } from '../../../../../plugins/vis_type_timeseries/common/interval_regexp';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { parseInterval } from '../../../../../plugins/data/public';
|
||||
import { search } from '../../../../../plugins/data/public';
|
||||
const { parseInterval } = search.aggs;
|
||||
|
||||
export function validateInterval(bounds, panel, maxBuckets) {
|
||||
const { interval } = panel;
|
||||
|
|
|
@ -17,9 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import { npStart } from 'ui/new_platform';
|
||||
export const { createFiltersFromEvent } = npStart.plugins.data.actions;
|
||||
export { AggType, AggGroupNames, IAggConfig, IAggType, Schemas } from 'ui/agg_types';
|
||||
export { getFormat } from 'ui/visualize/loader/pipeline_helpers/utilities';
|
||||
export { tabifyAggResponse, tabifyGetColumns } from '../../data/public';
|
||||
import { search } from '../../../../plugins/data/public';
|
||||
export const { tabifyAggResponse, tabifyGetColumns } = search;
|
||||
// @ts-ignore
|
||||
export { buildHierarchicalData } from 'ui/agg_response/hierarchical/build_hierarchical_data';
|
||||
// @ts-ignore
|
||||
|
|
|
@ -32,10 +32,8 @@ jest.mock('@elastic/eui', () => ({
|
|||
}));
|
||||
|
||||
jest.mock('../../../legacy_imports', () => ({
|
||||
getTableAggs: jest.fn(),
|
||||
}));
|
||||
jest.mock('../../../../../data/public/actions/filters/create_filters_from_event', () => ({
|
||||
createFiltersFromEvent: jest.fn().mockResolvedValue(['yes']),
|
||||
getTableAggs: jest.fn(),
|
||||
}));
|
||||
|
||||
const vis = {
|
||||
|
|
|
@ -22,15 +22,14 @@ import { compact, uniq, map, every, isUndefined } from 'lodash';
|
|||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { EuiPopoverProps, EuiIcon, keyCodes, htmlIdGenerator } from '@elastic/eui';
|
||||
import { IAggConfig } from '../../../../../data/public';
|
||||
|
||||
import { createFiltersFromEvent } from '../../../../../data/public/actions/filters/create_filters_from_event';
|
||||
import { IAggConfig } from '../../../../../../../plugins/data/public';
|
||||
import { CUSTOM_LEGEND_VIS_TYPES, LegendItem } from './models';
|
||||
import { VisLegendItem } from './legend_item';
|
||||
import { getPieNames } from './pie_utils';
|
||||
|
||||
import { Vis } from '../../../../../visualizations/public';
|
||||
import { tabifyGetColumns } from '../../../legacy_imports';
|
||||
import { createFiltersFromEvent, tabifyGetColumns } from '../../../legacy_imports';
|
||||
|
||||
const getTableAggs = (vis: Vis): IAggConfig[] => {
|
||||
if (!vis.aggs || !vis.aggs.getResponseAggs) {
|
||||
|
|
|
@ -17,21 +17,12 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @kbn/eslint/no-restricted-paths */
|
||||
// eslint-disable-next-line
|
||||
import { npSetup, npStart } from 'ui/new_platform';
|
||||
import { start as legacyDataStart } from '../../../../data/public/legacy';
|
||||
/* eslint-enable @kbn/eslint/no-restricted-paths */
|
||||
|
||||
import { PluginInitializerContext } from '../../../../../../core/public';
|
||||
|
||||
import { plugin } from '.';
|
||||
|
||||
const pluginInstance = plugin({} as PluginInitializerContext);
|
||||
|
||||
export const setup = pluginInstance.setup(npSetup.core, npSetup.plugins);
|
||||
export const start = pluginInstance.start(npStart.core, {
|
||||
...npStart.plugins,
|
||||
__LEGACY: {
|
||||
aggs: legacyDataStart.search.aggs,
|
||||
},
|
||||
});
|
||||
export const start = pluginInstance.start(npStart.core, npStart.plugins);
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
} from './build_pipeline';
|
||||
import { Vis } from '..';
|
||||
import { searchSourceMock, dataPluginMock } from '../../../../../../../plugins/data/public/mocks';
|
||||
import { IAggConfig } from '../../../../../data/public';
|
||||
import { IAggConfig } from '../../../../../../../plugins/data/public';
|
||||
|
||||
jest.mock('ui/new_platform');
|
||||
|
||||
|
|
|
@ -22,11 +22,13 @@ import moment from 'moment';
|
|||
import { SerializedFieldFormat } from '../../../../../../../plugins/expressions/public';
|
||||
import {
|
||||
fieldFormats,
|
||||
IAggConfig,
|
||||
ISearchSource,
|
||||
search,
|
||||
TimefilterContract,
|
||||
} from '../../../../../../../plugins/data/public';
|
||||
const { isDateHistogramBucketAggConfig } = search.aggs;
|
||||
import { Vis, VisParams } from '../types';
|
||||
import { IAggConfig, isDateHistogramBucketAggConfig } from '../../../../../data/public';
|
||||
|
||||
interface SchemaConfigParams {
|
||||
precision?: number;
|
||||
|
|
|
@ -57,11 +57,6 @@ const createInstance = async () => {
|
|||
data: dataPluginMock.createStartContract(),
|
||||
expressions: expressionsPluginMock.createStartContract(),
|
||||
uiActions: uiActionsPluginMock.createStartContract(),
|
||||
__LEGACY: {
|
||||
aggs: {
|
||||
createAggConfigs: jest.fn(),
|
||||
} as any,
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
|
|
|
@ -55,7 +55,6 @@ import { createSavedVisLoader, SavedVisualizationsLoader } from './saved_visuali
|
|||
import { VisImpl } from './vis_impl';
|
||||
import { showNewVisModal } from './wizard';
|
||||
import { UiActionsStart } from '../../../../../../plugins/ui_actions/public';
|
||||
import { DataStart as LegacyDataStart } from '../../../../data/public';
|
||||
import { VisState } from './types';
|
||||
|
||||
/**
|
||||
|
@ -83,9 +82,6 @@ export interface VisualizationsStartDeps {
|
|||
data: DataPublicPluginStart;
|
||||
expressions: ExpressionsStart;
|
||||
uiActions: UiActionsStart;
|
||||
__LEGACY: {
|
||||
aggs: LegacyDataStart['search']['aggs'];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,7 +124,7 @@ export class VisualizationsPlugin
|
|||
|
||||
public start(
|
||||
core: CoreStart,
|
||||
{ data, expressions, uiActions, __LEGACY: { aggs } }: VisualizationsStartDeps
|
||||
{ data, expressions, uiActions }: VisualizationsStartDeps
|
||||
): VisualizationsStart {
|
||||
const types = this.types.start();
|
||||
setI18n(core.i18n);
|
||||
|
@ -141,7 +137,7 @@ export class VisualizationsPlugin
|
|||
setExpressions(expressions);
|
||||
setUiActions(uiActions);
|
||||
setTimeFilter(data.query.timefilter.timefilter);
|
||||
setAggs(aggs);
|
||||
setAggs(data.search.aggs);
|
||||
const savedVisualizationsLoader = createSavedVisLoader({
|
||||
savedObjectsClient: core.savedObjects.client,
|
||||
indexPatterns: data.indexPatterns,
|
||||
|
|
|
@ -27,6 +27,7 @@ import {
|
|||
import { TypesStart } from './vis_types';
|
||||
import { createGetterSetter } from '../../../../../../plugins/kibana_utils/public';
|
||||
import {
|
||||
DataPublicPluginStart,
|
||||
FilterManager,
|
||||
IndexPatternsContract,
|
||||
TimefilterContract,
|
||||
|
@ -35,7 +36,6 @@ import { UsageCollectionSetup } from '../../../../../../plugins/usage_collection
|
|||
import { ExpressionsStart } from '../../../../../../plugins/expressions/public';
|
||||
import { UiActionsStart } from '../../../../../../plugins/ui_actions/public';
|
||||
import { SavedVisualizationsLoader } from './saved_visualizations';
|
||||
import { DataStart as LegacyDataStart } from '../../../../data/public';
|
||||
|
||||
export const [getUISettings, setUISettings] = createGetterSetter<IUiSettingsClient>('UISettings');
|
||||
|
||||
|
@ -73,6 +73,6 @@ export const [getSavedVisualizationsLoader, setSavedVisualizationsLoader] = crea
|
|||
SavedVisualizationsLoader
|
||||
>('SavedVisualisationsLoader');
|
||||
|
||||
export const [getAggs, setAggs] = createGetterSetter<LegacyDataStart['search']['aggs']>(
|
||||
export const [getAggs, setAggs] = createGetterSetter<DataPublicPluginStart['search']['aggs']>(
|
||||
'AggConfigs'
|
||||
);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
import { VisType } from './vis_types';
|
||||
import { Status } from './legacy/update_status';
|
||||
import { IAggConfigs } from '../../../../data/public';
|
||||
import { IAggConfigs } from '../../../../../../plugins/data/public';
|
||||
|
||||
export interface Vis {
|
||||
type: VisType;
|
||||
|
|
|
@ -19,9 +19,8 @@
|
|||
|
||||
import { Vis, VisState, VisParams } from './vis';
|
||||
import { VisType } from './vis_types';
|
||||
import { IIndexPattern } from '../../../../../../plugins/data/common';
|
||||
import { IAggConfig, IIndexPattern } from '../../../../../../plugins/data/public';
|
||||
import { Schema } from '../../../../vis_default_editor/public';
|
||||
import { IAggConfig } from '../../../../data/public/search/aggs';
|
||||
|
||||
type InitVisStateType =
|
||||
| Partial<VisState>
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
|
||||
import { buildHierarchicalData } from './hierarchical/build_hierarchical_data';
|
||||
import { buildPointSeriesData } from './point_series/point_series';
|
||||
import { tabifyAggResponse } from '../../../core_plugins/data/public';
|
||||
import { search } from '../../../../plugins/data/public';
|
||||
|
||||
export const aggResponseIndex = {
|
||||
hierarchical: buildHierarchicalData,
|
||||
pointSeries: buildPointSeriesData,
|
||||
tabify: tabifyAggResponse,
|
||||
tabify: search.tabifyAggResponse,
|
||||
};
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
/**
|
||||
* Nothing to see here!
|
||||
*
|
||||
* Agg Types have moved to the data plugin, and are being
|
||||
* Agg Types have moved to the new platform, and are being
|
||||
* re-exported from ui/agg_types for backwards compatibility.
|
||||
*/
|
||||
|
||||
import { start as dataStart } from '../../../core_plugins/data/public/legacy';
|
||||
import { npStart } from 'ui/new_platform';
|
||||
|
||||
// runtime contracts
|
||||
const { types } = dataStart.search.aggs;
|
||||
const { types } = npStart.plugins.data.search.aggs;
|
||||
export const aggTypes = types.getAll();
|
||||
export const { createAggConfigs } = dataStart.search.aggs;
|
||||
export const { createAggConfigs } = npStart.plugins.data.search.aggs;
|
||||
export const {
|
||||
AggConfig,
|
||||
AggType,
|
||||
|
@ -38,33 +38,36 @@ export const {
|
|||
MetricAggType,
|
||||
parentPipelineAggHelper,
|
||||
siblingPipelineAggHelper,
|
||||
} = dataStart.search.aggs.__LEGACY;
|
||||
} = npStart.plugins.data.search.__LEGACY;
|
||||
|
||||
// types
|
||||
export {
|
||||
AggGroupNames,
|
||||
AggParam,
|
||||
AggParamOption,
|
||||
AggParamType,
|
||||
AggTypeFieldFilters,
|
||||
AggTypeFilters,
|
||||
BUCKET_TYPES,
|
||||
DateRangeKey,
|
||||
IAggConfig,
|
||||
IAggConfigs,
|
||||
IAggGroupNames,
|
||||
IAggType,
|
||||
IFieldParamType,
|
||||
IMetricAggType,
|
||||
AggParam,
|
||||
AggParamOption,
|
||||
BUCKET_TYPES,
|
||||
DateRangeKey,
|
||||
IpRangeKey,
|
||||
METRIC_TYPES,
|
||||
OptionedParamEditorProps,
|
||||
OptionedParamType,
|
||||
OptionedValueProp,
|
||||
} from '../../../core_plugins/data/public';
|
||||
} from '../../../../plugins/data/public';
|
||||
|
||||
// static code
|
||||
export {
|
||||
AggParamType,
|
||||
AggTypeFilters,
|
||||
aggTypeFilters,
|
||||
AggTypeFieldFilters,
|
||||
AggGroupNames,
|
||||
import { search } from '../../../../plugins/data/public';
|
||||
export const {
|
||||
aggGroupNamesMap,
|
||||
aggTypeFilters,
|
||||
CidrMask,
|
||||
convertDateRangeToString,
|
||||
convertIPRangeToString,
|
||||
|
@ -73,11 +76,10 @@ export {
|
|||
isStringType,
|
||||
isType,
|
||||
isValidInterval,
|
||||
OptionedParamType,
|
||||
parentPipelineType,
|
||||
propFilter,
|
||||
siblingPipelineType,
|
||||
termsAggFilter,
|
||||
} from '../../../core_plugins/data/public';
|
||||
} = search.aggs;
|
||||
|
||||
export { ISchemas, Schemas, Schema } from '../../../core_plugins/vis_default_editor/public/schemas';
|
||||
|
|
|
@ -20,6 +20,24 @@
|
|||
import sinon from 'sinon';
|
||||
import { getFieldFormatsRegistry } from '../../../../test_utils/public/stub_field_formats';
|
||||
import { METRIC_TYPE } from '@kbn/analytics';
|
||||
import {
|
||||
setIndexPatterns,
|
||||
setQueryService,
|
||||
setUiSettings,
|
||||
setInjectedMetadata,
|
||||
setFieldFormats,
|
||||
setSearchService,
|
||||
setOverlays,
|
||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||
} from '../../../../plugins/data/public/services';
|
||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||
import { setAggs } from '../../../../../src/legacy/core_plugins/visualizations/public/np_ready/public/services';
|
||||
import {
|
||||
AggTypesRegistry,
|
||||
getAggTypes,
|
||||
AggConfigs,
|
||||
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
|
||||
} from '../../../../../src/plugins/data/public/search/aggs';
|
||||
import { ComponentRegistry } from '../../../../../src/plugins/advanced_settings/public/';
|
||||
|
||||
const mockObservable = () => {
|
||||
|
@ -61,6 +79,18 @@ const mockCore = {
|
|||
},
|
||||
};
|
||||
|
||||
const mockAggTypesRegistry = () => {
|
||||
const registry = new AggTypesRegistry();
|
||||
const registrySetup = registry.setup();
|
||||
const aggTypes = getAggTypes({ uiSettings: mockCore.uiSettings });
|
||||
aggTypes.buckets.forEach(type => registrySetup.registerBucket(type));
|
||||
aggTypes.metrics.forEach(type => registrySetup.registerMetric(type));
|
||||
|
||||
return registry;
|
||||
};
|
||||
|
||||
const aggTypesRegistry = mockAggTypesRegistry();
|
||||
|
||||
let refreshInterval = undefined;
|
||||
let isTimeRangeSelectorEnabled = true;
|
||||
let isAutoRefreshSelectorEnabled = true;
|
||||
|
@ -169,10 +199,16 @@ export const npSetup = {
|
|||
getSavedQueryCount: sinon.fake(),
|
||||
},
|
||||
},
|
||||
__LEGACY: {
|
||||
esClient: {
|
||||
search: sinon.fake(),
|
||||
msearch: sinon.fake(),
|
||||
search: {
|
||||
aggs: {
|
||||
calculateAutoTimeExpression: sinon.fake(),
|
||||
types: aggTypesRegistry.setup(),
|
||||
},
|
||||
__LEGACY: {
|
||||
esClient: {
|
||||
search: sinon.fake(),
|
||||
msearch: sinon.fake(),
|
||||
},
|
||||
},
|
||||
},
|
||||
fieldFormats: getFieldFormatsRegistry(mockCore),
|
||||
|
@ -233,6 +269,9 @@ export const npSetup = {
|
|||
}),
|
||||
},
|
||||
},
|
||||
visTypeVega: {
|
||||
config: sinon.fake(),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -284,6 +323,9 @@ export const npStart = {
|
|||
},
|
||||
},
|
||||
data: {
|
||||
actions: {
|
||||
createFiltersFromEvent: Promise.resolve(['yes']),
|
||||
},
|
||||
autocomplete: {
|
||||
getProvider: sinon.fake(),
|
||||
},
|
||||
|
@ -355,7 +397,27 @@ export const npStart = {
|
|||
},
|
||||
},
|
||||
search: {
|
||||
aggs: {
|
||||
calculateAutoTimeExpression: sinon.fake(),
|
||||
createAggConfigs: sinon.fake(),
|
||||
createAggConfigs: (indexPattern, configStates = []) => {
|
||||
return new AggConfigs(indexPattern, configStates, {
|
||||
typesRegistry: aggTypesRegistry.start(),
|
||||
});
|
||||
},
|
||||
types: aggTypesRegistry.start(),
|
||||
},
|
||||
__LEGACY: {
|
||||
AggConfig: sinon.fake(),
|
||||
AggType: sinon.fake(),
|
||||
aggTypeFieldFilters: {
|
||||
addFilter: sinon.fake(),
|
||||
filter: sinon.fake(),
|
||||
},
|
||||
FieldParamType: sinon.fake(),
|
||||
MetricAggType: sinon.fake(),
|
||||
parentPipelineAggHelper: sinon.fake(),
|
||||
siblingPipelineAggHelper: sinon.fake(),
|
||||
esClient: {
|
||||
search: sinon.fake(),
|
||||
msearch: sinon.fake(),
|
||||
|
@ -404,8 +466,22 @@ export function __setup__(coreSetup) {
|
|||
// no-op application register calls (this is overwritten to
|
||||
// bootstrap an LP plugin outside of tests)
|
||||
npSetup.core.application.register = () => {};
|
||||
|
||||
// Services that need to be set in the legacy platform since the legacy data plugin
|
||||
// which previously provided them has been removed.
|
||||
setInjectedMetadata(npSetup.core.injectedMetadata);
|
||||
}
|
||||
|
||||
export function __start__(coreStart) {
|
||||
npStart.core = coreStart;
|
||||
|
||||
// Services that need to be set in the legacy platform since the legacy data plugin
|
||||
// which previously provided them has been removed.
|
||||
setUiSettings(npStart.core.uiSettings);
|
||||
setQueryService(npStart.plugins.data.query);
|
||||
setIndexPatterns(npStart.plugins.data.indexPatterns);
|
||||
setFieldFormats(npStart.plugins.data.fieldFormats);
|
||||
setSearchService(npStart.plugins.data.search);
|
||||
setAggs(npStart.plugins.data.search.aggs);
|
||||
setOverlays(npStart.core.overlays);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue