Skip to content

Commit

Permalink
Merge branch '75862-surface-legacy-es-errors' of github.com:jfsiii/ki…
Browse files Browse the repository at this point in the history
…bana into 75862-surface-legacy-es-errors
  • Loading branch information
John Schulz committed Sep 9, 2020
2 parents 9a06d7b + 1bba375 commit e05362c
Show file tree
Hide file tree
Showing 471 changed files with 80,749 additions and 7,676 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<b>Signature:</b>

```typescript
export declare type AppenderConfigType = TypeOf<typeof appendersSchema>;
export declare type AppenderConfigType = ConsoleAppenderConfig | FileAppenderConfig | LegacyAppenderConfig;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export interface SavedObjectsServiceSetup

When plugins access the Saved Objects client, a new client is created using the factory provided to `setClientFactory` and wrapped by all wrappers registered through `addClientWrapper`<!-- -->.

All the setup APIs will throw if called after the service has started, and therefor cannot be used from legacy plugin code. Legacy plugins should use the legacy savedObject service until migrated.

## Example 1


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ See the [mappings format](./kibana-plugin-core-server.savedobjectstypemappingdef
registerType: (type: SavedObjectsType) => void;
```

## Remarks

The type definition is an aggregation of the legacy savedObjects `schema`<!-- -->, `mappings` and `migration` concepts. This API is the single entry point to register saved object types in the new platform.

## Example


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Constructs a new instance of the `IndexPattern` class
<b>Signature:</b>

```typescript
constructor(id: string | undefined, { savedObjectsClient, apiClient, patternCache, fieldFormats, onNotification, onError, shortDotsEnable, metaFields, }: IndexPatternDeps);
constructor(id: string | undefined, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, shortDotsEnable, metaFields, }: IndexPatternDeps);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| id | <code>string &#124; undefined</code> | |
| { savedObjectsClient, apiClient, patternCache, fieldFormats, onNotification, onError, shortDotsEnable, metaFields, } | <code>IndexPatternDeps</code> | |
| { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, shortDotsEnable, metaFields, } | <code>IndexPatternDeps</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export declare class IndexPattern implements IIndexPattern
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(id, { savedObjectsClient, apiClient, patternCache, fieldFormats, onNotification, onError, shortDotsEnable, metaFields, })](./kibana-plugin-plugins-data-public.indexpattern._constructor_.md) | | Constructs a new instance of the <code>IndexPattern</code> class |
| [(constructor)(id, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, shortDotsEnable, metaFields, })](./kibana-plugin-plugins-data-public.indexpattern._constructor_.md) | | Constructs a new instance of the <code>IndexPattern</code> class |
## Properties
Expand All @@ -29,11 +29,13 @@ export declare class IndexPattern implements IIndexPattern
| [id](./kibana-plugin-plugins-data-public.indexpattern.id.md) | | <code>string</code> | |
| [intervalName](./kibana-plugin-plugins-data-public.indexpattern.intervalname.md) | | <code>string &#124; undefined</code> | |
| [metaFields](./kibana-plugin-plugins-data-public.indexpattern.metafields.md) | | <code>string[]</code> | |
| [originalBody](./kibana-plugin-plugins-data-public.indexpattern.originalbody.md) | | <code>{</code><br/><code> [key: string]: any;</code><br/><code> }</code> | |
| [sourceFilters](./kibana-plugin-plugins-data-public.indexpattern.sourcefilters.md) | | <code>SourceFilter[]</code> | |
| [timeFieldName](./kibana-plugin-plugins-data-public.indexpattern.timefieldname.md) | | <code>string &#124; undefined</code> | |
| [title](./kibana-plugin-plugins-data-public.indexpattern.title.md) | | <code>string</code> | |
| [type](./kibana-plugin-plugins-data-public.indexpattern.type.md) | | <code>string &#124; undefined</code> | |
| [typeMeta](./kibana-plugin-plugins-data-public.indexpattern.typemeta.md) | | <code>TypeMeta</code> | |
| [version](./kibana-plugin-plugins-data-public.indexpattern.version.md) | | <code>string &#124; undefined</code> | |
## Methods
Expand All @@ -60,6 +62,5 @@ export declare class IndexPattern implements IIndexPattern
| [prepBody()](./kibana-plugin-plugins-data-public.indexpattern.prepbody.md) | | |
| [refreshFields()](./kibana-plugin-plugins-data-public.indexpattern.refreshfields.md) | | |
| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | |
| [save(saveAttempts)](./kibana-plugin-plugins-data-public.indexpattern.save.md) | | |
| [toSpec()](./kibana-plugin-plugins-data-public.indexpattern.tospec.md) | | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) &gt; [originalBody](./kibana-plugin-plugins-data-public.indexpattern.originalbody.md)

## IndexPattern.originalBody property

<b>Signature:</b>

```typescript
originalBody: {
[key: string]: any;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
removeScriptedField(fieldName: string): Promise<void | Error>;
removeScriptedField(fieldName: string): void;
```

## Parameters
Expand All @@ -18,5 +18,5 @@ removeScriptedField(fieldName: string): Promise<void | Error>;

<b>Returns:</b>

`Promise<void | Error>`
`void`

This file was deleted.

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

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) &gt; [version](./kibana-plugin-plugins-data-public.indexpattern.version.md)

## IndexPattern.version property

<b>Signature:</b>

```typescript
version: string | undefined;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
QueryStringInput: React.FC<Pick<Props, "query" | "prepend" | "size" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>
QueryStringInput: React.FC<Pick<Props, "query" | "prepend" | "size" | "className" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ES\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-server.es_search_strategy.md)

## ES\_SEARCH\_STRATEGY variable

<b>Signature:</b>

```typescript
ES_SEARCH_STRATEGY = "es"
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export interface ISearchStart<SearchStrategyRequest extends IEsSearchRequest = I
| --- | --- | --- |
| [aggs](./kibana-plugin-plugins-data-server.isearchstart.aggs.md) | <code>AggsStart</code> | |
| [getSearchStrategy](./kibana-plugin-plugins-data-server.isearchstart.getsearchstrategy.md) | <code>(name: string) =&gt; ISearchStrategy&lt;SearchStrategyRequest, SearchStrategyResponse&gt;</code> | Get other registered search strategies. For example, if a new strategy needs to use the already-registered ES search strategy, it can use this function to accomplish that. |
| [search](./kibana-plugin-plugins-data-server.isearchstart.search.md) | <code>(context: RequestHandlerContext, request: IKibanaSearchRequest, options: ISearchOptions) =&gt; Promise&lt;IKibanaSearchResponse&gt;</code> | |
| [search](./kibana-plugin-plugins-data-server.isearchstart.search.md) | <code>(context: RequestHandlerContext, request: IEsSearchRequest, options: ISearchOptions) =&gt; Promise&lt;IEsSearchResponse&gt;</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
search: (context: RequestHandlerContext, request: IKibanaSearchRequest, options: ISearchOptions) => Promise<IKibanaSearchResponse>;
search: (context: RequestHandlerContext, request: IEsSearchRequest, options: ISearchOptions) => Promise<IEsSearchResponse>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
| [AggGroupNames](./kibana-plugin-plugins-data-server.agggroupnames.md) | |
| [castEsToKbnFieldTypeName](./kibana-plugin-plugins-data-server.castestokbnfieldtypename.md) | Get the KbnFieldType name for an esType string |
| [config](./kibana-plugin-plugins-data-server.config.md) | |
| [ES\_SEARCH\_STRATEGY](./kibana-plugin-plugins-data-server.es_search_strategy.md) | |
| [esFilters](./kibana-plugin-plugins-data-server.esfilters.md) | |
| [esKuery](./kibana-plugin-plugins-data-server.eskuery.md) | |
| [esQuery](./kibana-plugin-plugins-data-server.esquery.md) | |
Expand Down
2 changes: 0 additions & 2 deletions kibana.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export namespace Legacy {
export type KibanaConfig = LegacyKibanaServer.KibanaConfig;
export type Request = LegacyKibanaServer.Request;
export type ResponseToolkit = LegacyKibanaServer.ResponseToolkit;
export type SavedObjectsClient = LegacyKibanaServer.SavedObjectsClient;
export type SavedObjectsService = LegacyKibanaServer.SavedObjectsLegacyService;
export type Server = LegacyKibanaServer.Server;

export type InitPluginFunction = LegacyKibanaPluginSpec.InitPluginFunction;
Expand Down
20 changes: 4 additions & 16 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,10 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
mode: dev ? 'development' : 'production',
entry: {
'kbn-ui-shared-deps': './entry.js',
'kbn-ui-shared-deps.v7.dark': [
'@elastic/eui/dist/eui_theme_dark.css',
'@elastic/charts/dist/theme_only_dark.css',
],
'kbn-ui-shared-deps.v7.light': [
'@elastic/eui/dist/eui_theme_light.css',
'@elastic/charts/dist/theme_only_light.css',
],
'kbn-ui-shared-deps.v8.dark': [
'@elastic/eui/dist/eui_theme_amsterdam_dark.css',
'@elastic/charts/dist/theme_only_dark.css',
],
'kbn-ui-shared-deps.v8.light': [
'@elastic/eui/dist/eui_theme_amsterdam_light.css',
'@elastic/charts/dist/theme_only_light.css',
],
'kbn-ui-shared-deps.v7.dark': ['@elastic/eui/dist/eui_theme_dark.css'],
'kbn-ui-shared-deps.v7.light': ['@elastic/eui/dist/eui_theme_light.css'],
'kbn-ui-shared-deps.v8.dark': ['@elastic/eui/dist/eui_theme_amsterdam_dark.css'],
'kbn-ui-shared-deps.v8.light': ['@elastic/eui/dist/eui_theme_amsterdam_light.css'],
},
context: __dirname,
devtool: dev ? '#cheap-source-map' : false,
Expand Down
5 changes: 1 addition & 4 deletions src/core/public/core_app/styles/_globals_v7dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// prepended to all .scss imports (from JS, when v7dark theme selected)

@import '@elastic/eui/src/themes/eui/eui_colors_dark';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui/eui_globals';

@import './mixins';
5 changes: 1 addition & 4 deletions src/core/public/core_app/styles/_globals_v7light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// prepended to all .scss imports (from JS, when v7light theme selected)

@import '@elastic/eui/src/themes/eui/eui_colors_light';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui/eui_globals';

@import './mixins';
10 changes: 1 addition & 9 deletions src/core/public/core_app/styles/_globals_v8dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
// prepended to all .scss imports (from JS, when v8dark theme selected)

@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_colors_dark';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/functions/index';

@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/variables/index';

@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_globals';

@import './mixins';
10 changes: 1 addition & 9 deletions src/core/public/core_app/styles/_globals_v8light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
// prepended to all .scss imports (from JS, when v8light theme selected)

@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_colors_light';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/functions/index';

@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/variables/index';

@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_globals';

@import './mixins';
6 changes: 6 additions & 0 deletions src/core/public/styles/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// Charts themes available app-wide
@import '@elastic/charts/dist/theme';
@import '@elastic/eui/src/themes/charts/theme';

// Grab some nav-specific EUI vars
@import '@elastic/eui/src/components/collapsible_nav/variables';

// Application Layout

// chrome-context
Expand Down
15 changes: 3 additions & 12 deletions src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
* @packageDocumentation
*/

import { Type } from '@kbn/config-schema';
import {
ElasticsearchServiceSetup,
ILegacyScopedClusterClient,
configSchema as elasticsearchConfigSchema,
ElasticsearchServiceStart,
IScopedClusterClient,
} from './elasticsearch';

import { HttpServiceSetup, HttpServiceStart } from './http';
import { HttpResources } from './http_resources';

Expand All @@ -63,12 +63,7 @@ import { CapabilitiesSetup, CapabilitiesStart } from './capabilities';
import { MetricsServiceStart } from './metrics';
import { StatusServiceSetup } from './status';
import { Auditor, AuditTrailSetup, AuditTrailStart } from './audit_trail';
import {
LoggingServiceSetup,
appendersSchema,
loggerContextConfigSchema,
loggerSchema,
} from './logging';
import { AppenderConfigType, appendersSchema, LoggingServiceSetup } from './logging';

export { AuditableEvent, Auditor, AuditorFactory, AuditTrailSetup } from './audit_trail';
export { bootstrap } from './bootstrap';
Expand Down Expand Up @@ -271,9 +266,7 @@ export {
SavedObjectUnsanitizedDoc,
SavedObjectsRepositoryFactory,
SavedObjectsResolveImportErrorsOptions,
SavedObjectsSchema,
SavedObjectsSerializer,
SavedObjectsLegacyService,
SavedObjectsUpdateOptions,
SavedObjectsUpdateResponse,
SavedObjectsAddToNamespacesOptions,
Expand Down Expand Up @@ -497,8 +490,6 @@ export const config = {
schema: elasticsearchConfigSchema,
},
logging: {
appenders: appendersSchema,
loggers: loggerSchema,
loggerContext: loggerContextConfigSchema,
appenders: appendersSchema as Type<AppenderConfigType>,
},
};
1 change: 0 additions & 1 deletion src/core/server/legacy/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@

export { ensureValidConfiguration } from './ensure_valid_configuration';
export { LegacyObjectToConfigAdapter } from './legacy_object_to_config_adapter';
export { convertLegacyDeprecationProvider } from './legacy_deprecation_adapters';
Loading

0 comments on commit e05362c

Please sign in to comment.