Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kp/metrics-improv…
Browse files Browse the repository at this point in the history
…ements
  • Loading branch information
joshdover committed Sep 8, 2020
2 parents e544c4c + 842bcf4 commit 8d930c4
Show file tree
Hide file tree
Showing 411 changed files with 80,434 additions and 5,357 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 @@ -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
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
13 changes: 3 additions & 10 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 @@ -497,8 +492,6 @@ export const config = {
schema: elasticsearchConfigSchema,
},
logging: {
appenders: appendersSchema,
loggers: loggerSchema,
loggerContext: loggerContextConfigSchema,
appenders: appendersSchema as Type<AppenderConfigType>,
},
};
5 changes: 5 additions & 0 deletions src/core/server/legacy/logging/appenders/legacy_appender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ import { LogRecord } from '../../../logging/log_record';
import { LegacyLoggingServer } from '../legacy_logging_server';
import { LegacyVars } from '../../types';

export interface LegacyAppenderConfig {
kind: 'legacy-appender';
legacyLoggingConfig?: any;
}

/**
* Simple appender that just forwards `LogRecord` to the legacy KbnServer log.
* @internal
Expand Down
13 changes: 8 additions & 5 deletions src/core/server/logging/appenders/appenders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
* under the License.
*/

import { schema, TypeOf } from '@kbn/config-schema';
import { schema } from '@kbn/config-schema';

import { assertNever } from '../../../utils';
import { LegacyAppender } from '../../legacy/logging/appenders/legacy_appender';
import {
LegacyAppender,
LegacyAppenderConfig,
} from '../../legacy/logging/appenders/legacy_appender';
import { Layouts } from '../layouts/layouts';
import { LogRecord } from '../log_record';
import { ConsoleAppender } from './console/console_appender';
import { FileAppender } from './file/file_appender';
import { ConsoleAppender, ConsoleAppenderConfig } from './console/console_appender';
import { FileAppender, FileAppenderConfig } from './file/file_appender';

/**
* Config schema for validting the shape of the `appenders` key in in {@link LoggerContextConfigType} or
Expand All @@ -39,7 +42,7 @@ export const appendersSchema = schema.oneOf([
]);

/** @public */
export type AppenderConfigType = TypeOf<typeof appendersSchema>;
export type AppenderConfigType = ConsoleAppenderConfig | FileAppenderConfig | LegacyAppenderConfig;

/**
* Entity that can append `LogRecord` instances to file, stdout, memory or whatever
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@

import { schema } from '@kbn/config-schema';

import { Layout, Layouts } from '../../layouts/layouts';
import { Layout, Layouts, LayoutConfigType } from '../../layouts/layouts';
import { LogRecord } from '../../log_record';
import { DisposableAppender } from '../appenders';

const { literal, object } = schema;

export interface ConsoleAppenderConfig {
kind: 'console';
layout: LayoutConfigType;
}

/**
*
* Appender that formats all the `LogRecord` instances it receives and logs them via built-in `console`.
* @internal
*/
Expand Down
8 changes: 7 additions & 1 deletion src/core/server/logging/appenders/file/file_appender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@
import { schema } from '@kbn/config-schema';
import { createWriteStream, WriteStream } from 'fs';

import { Layout, Layouts } from '../../layouts/layouts';
import { Layout, Layouts, LayoutConfigType } from '../../layouts/layouts';
import { LogRecord } from '../../log_record';
import { DisposableAppender } from '../appenders';

export interface FileAppenderConfig {
kind: 'file';
layout: LayoutConfigType;
path: string;
}

/**
* Appender that formats all the `LogRecord` instances it receives and writes them to the specified file.
* @internal
Expand Down
6 changes: 4 additions & 2 deletions src/core/server/logging/layouts/json_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import moment from 'moment-timezone';
import { merge } from 'lodash';
import { schema, TypeOf } from '@kbn/config-schema';
import { schema } from '@kbn/config-schema';

import { LogRecord } from '../log_record';
import { Layout } from './layouts';
Expand All @@ -31,7 +31,9 @@ const jsonLayoutSchema = object({
});

/** @internal */
export type JsonLayoutConfigType = TypeOf<typeof jsonLayoutSchema>;
export interface JsonLayoutConfigType {
kind: 'json';
}

/**
* Layout that just converts `LogRecord` into JSON string.
Expand Down
Loading

0 comments on commit 8d930c4

Please sign in to comment.