Skip to content

Commit

Permalink
Merge branch 'master' into unskipShakespeare
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jan 27, 2021
2 parents 97ed40b + 6425c5d commit 2273214
Show file tree
Hide file tree
Showing 219 changed files with 5,174 additions and 4,561 deletions.
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
/src/plugins/advanced_settings/ @elastic/kibana-app
/src/plugins/charts/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/lens_oss/ @elastic/kibana-app
/src/plugins/management/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/timelion/ @elastic/kibana-app
Expand Down Expand Up @@ -127,7 +126,6 @@
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis
#CC# /src/plugins/maps_legacy/ @elastic/kibana-gis
#CC# /src/plugins/maps_oss/ @elastic/kibana-gis
#CC# /x-pack/plugins/file_upload @elastic/kibana-gis
#CC# /x-pack/plugins/maps_legacy_licensing @elastic/kibana-gis
/src/plugins/tile_map/ @elastic/kibana-gis
Expand Down
2 changes: 0 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@
"visTypeVislib": "src/plugins/vis_type_vislib",
"visTypeXy": "src/plugins/vis_type_xy",
"visualizations": "src/plugins/visualizations",
"lensOss": "src/plugins/lens_oss",
"mapsOss": "src/plugins/maps_oss",
"visualize": "src/plugins/visualize",
"apmOss": "src/plugins/apm_oss",
"usageCollection": "src/plugins/usage_collection"
Expand Down
10 changes: 0 additions & 10 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|The legacyExport plugin adds support for the legacy saved objects export format.
|{kib-repo}blob/{branch}/src/plugins/lens_oss/README.md[lensOss]
|The lens_oss plugin registers the lens visualization on OSS.
It is registered as disabled. The x-pack plugin should unregister this.
|{kib-repo}blob/{branch}/src/plugins/management/README.md[management]
|This plugins contains the "Stack Management" page framework. It offers navigation and an API
to link individual managment section into it. This plugin does not contain any individual
Expand All @@ -145,11 +140,6 @@ management section itself.
|Internal objects used by the Coordinate, Region, and Vega visualizations.
|{kib-repo}blob/{branch}/src/plugins/maps_oss/README.md[mapsOss]
|The maps_oss plugin registers the maps visualization on OSS.
It is registered as disabled. The x-pack plugin should unregister this.
|{kib-repo}blob/{branch}/src/plugins/navigation/README.md[navigation]
|The navigation plugins exports the TopNavMenu component.
It also provides a stateful version of it on the start contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Set of helpers used to create `KibanaResponse` to form HTTP response on an incom

```typescript
kibanaResponseFactory: {
custom: <T extends string | Error | Buffer | Stream | Record<string, any> | {
custom: <T extends string | Record<string, any> | Buffer | Error | Stream | {
message: string | Error;
attributes?: Record<string, any> | undefined;
} | undefined>(options: CustomHttpResponseOptions<T>) => KibanaResponse<T>;
Expand All @@ -21,9 +21,9 @@ kibanaResponseFactory: {
conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
internalError: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
customError: (options: CustomHttpResponseOptions<ResponseError>) => KibanaResponse<ResponseError>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
noContent: (options?: HttpResponseOptions) => KibanaResponse<undefined>;
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ constructor(indexPattern: IndexPattern, configStates: Pick<Pick<{
id?: string | undefined;
params?: {} | import("./agg_config").SerializableState | undefined;
schema?: string | undefined;
}, "enabled" | "schema" | "id" | "params"> & Pick<{
}, "schema" | "enabled" | "id" | "params"> & Pick<{
type: string | IAggType;
}, "type"> & Pick<{
type: string | IAggType;
}, never>, "enabled" | "type" | "schema" | "id" | "params">[] | undefined, opts: AggConfigsOptions);
}, never>, "schema" | "type" | "enabled" | "id" | "params">[] | undefined, opts: AggConfigsOptions);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| indexPattern | <code>IndexPattern</code> | |
| configStates | <code>Pick&lt;Pick&lt;{</code><br/><code> type: string;</code><br/><code> enabled?: boolean &#124; undefined;</code><br/><code> id?: string &#124; undefined;</code><br/><code> params?: {} &#124; import(&quot;./agg_config&quot;).SerializableState &#124; undefined;</code><br/><code> schema?: string &#124; undefined;</code><br/><code> }, &quot;enabled&quot; &#124; &quot;schema&quot; &#124; &quot;id&quot; &#124; &quot;params&quot;&gt; &amp; Pick&lt;{</code><br/><code> type: string &#124; IAggType;</code><br/><code> }, &quot;type&quot;&gt; &amp; Pick&lt;{</code><br/><code> type: string &#124; IAggType;</code><br/><code> }, never&gt;, &quot;enabled&quot; &#124; &quot;type&quot; &#124; &quot;schema&quot; &#124; &quot;id&quot; &#124; &quot;params&quot;&gt;[] &#124; undefined</code> | |
| configStates | <code>Pick&lt;Pick&lt;{</code><br/><code> type: string;</code><br/><code> enabled?: boolean &#124; undefined;</code><br/><code> id?: string &#124; undefined;</code><br/><code> params?: {} &#124; import(&quot;./agg_config&quot;).SerializableState &#124; undefined;</code><br/><code> schema?: string &#124; undefined;</code><br/><code> }, &quot;schema&quot; &#124; &quot;enabled&quot; &#124; &quot;id&quot; &#124; &quot;params&quot;&gt; &amp; Pick&lt;{</code><br/><code> type: string &#124; IAggType;</code><br/><code> }, &quot;type&quot;&gt; &amp; Pick&lt;{</code><br/><code> type: string &#124; IAggType;</code><br/><code> }, never&gt;, &quot;schema&quot; &#124; &quot;type&quot; &#124; &quot;enabled&quot; &#124; &quot;id&quot; &#124; &quot;params&quot;&gt;[] &#124; undefined</code> | |
| opts | <code>AggConfigsOptions</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
| [isPartialResponse](./kibana-plugin-plugins-data-public.ispartialresponse.md) | |
| [isQuery](./kibana-plugin-plugins-data-public.isquery.md) | |
| [isTimeRange](./kibana-plugin-plugins-data-public.istimerange.md) | |
| [noSearchSessionStorageCapabilityMessage](./kibana-plugin-plugins-data-public.nosearchsessionstoragecapabilitymessage.md) | Message to display in case storing session session is disabled due to turned off capability |
| [parseSearchSourceJSON](./kibana-plugin-plugins-data-public.parsesearchsourcejson.md) | |
| [QueryStringInput](./kibana-plugin-plugins-data-public.querystringinput.md) | |
| [search](./kibana-plugin-plugins-data-public.search.md) | |
Expand Down
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; [noSearchSessionStorageCapabilityMessage](./kibana-plugin-plugins-data-public.nosearchsessionstoragecapabilitymessage.md)

## noSearchSessionStorageCapabilityMessage variable

Message to display in case storing session session is disabled due to turned off capability

<b>Signature:</b>

```typescript
noSearchSessionStorageCapabilityMessage: string
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "intl" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "intl" | "indexPatterns" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>;
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "indexPatterns" | "filters" | "dataTestSubj" | "intl" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "indexPatterns" | "filters" | "dataTestSubj" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "indexPatterns" | "filters" | "dataTestSubj" | "intl" | "refreshInterval" | "screenTitle" | "onRefresh" | "onRefreshChange" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "trackUiMetric" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>;
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ start(core: CoreStart): {
fieldFormatServiceFactory: (uiSettings: import("../../../core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("../../../core/server").SavedObjectsClient, "update" | "find" | "get" | "resolve" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">, elasticsearchClient: import("../../../core/server").ElasticsearchClient) => Promise<import("../public").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("../../../core/server").SavedObjectsClient, "get" | "delete" | "create" | "update" | "bulkCreate" | "checkConflicts" | "find" | "bulkGet" | "resolve" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo" | "errors">, elasticsearchClient: import("../../../core/server").ElasticsearchClient) => Promise<import("../public").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
};
Expand All @@ -31,7 +31,7 @@ start(core: CoreStart): {
fieldFormatServiceFactory: (uiSettings: import("../../../core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("../../../core/server").SavedObjectsClient, "update" | "find" | "get" | "resolve" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">, elasticsearchClient: import("../../../core/server").ElasticsearchClient) => Promise<import("../public").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("../../../core/server").SavedObjectsClient, "get" | "delete" | "create" | "update" | "bulkCreate" | "checkConflicts" | "find" | "bulkGet" | "resolve" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo" | "errors">, elasticsearchClient: import("../../../core/server").ElasticsearchClient) => Promise<import("../public").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
}`
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"**/react-syntax-highlighter/**/highlight.js": "^10.4.1",
"**/request": "^2.88.2",
"**/trim": "0.0.3",
"**/typescript": "4.1.2"
"**/typescript": "4.1.3"
},
"engines": {
"node": "14.15.4",
Expand Down Expand Up @@ -561,8 +561,8 @@
"@types/xml2js": "^0.4.5",
"@types/yauzl": "^2.9.1",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"@welldone-software/why-did-you-render": "^5.0.0",
"@yarnpkg/lockfile": "^1.1.0",
"abab": "^2.0.4",
Expand Down Expand Up @@ -820,9 +820,9 @@
"topojson-client": "3.0.0",
"ts-loader": "^7.0.5",
"tsd": "^0.13.1",
"typescript": "4.1.2",
"typescript": "4.1.3",
"typescript-fsa": "^3.0.0",
"typescript-fsa-reducers": "^1.2.1",
"typescript-fsa-reducers": "^1.2.2",
"unlazy-loader": "^0.1.3",
"unstated": "^2.1.1",
"url-loader": "^2.2.0",
Expand Down
85 changes: 1 addition & 84 deletions packages/kbn-config/src/deprecation/deprecation_factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { ConfigDeprecationLogger } from './types';
import { configDeprecationFactory, copyFromRoot } from './deprecation_factory';
import { configDeprecationFactory } from './deprecation_factory';

describe('DeprecationFactory', () => {
const { rename, unused, renameFromRoot, unusedFromRoot } = configDeprecationFactory;
Expand Down Expand Up @@ -239,89 +239,6 @@ describe('DeprecationFactory', () => {
});
});

describe('copyFromRoot', () => {
it('copies a property to a different namespace', () => {
const rawConfig = {
originplugin: {
deprecated: 'toberenamed',
valid: 'valid',
},
destinationplugin: {
property: 'value',
},
};
const processed = copyFromRoot('originplugin.deprecated', 'destinationplugin.renamed')(
rawConfig,
'does-not-matter',
logger
);
expect(processed).toEqual({
originplugin: {
deprecated: 'toberenamed',
valid: 'valid',
},
destinationplugin: {
renamed: 'toberenamed',
property: 'value',
},
});
expect(deprecationMessages.length).toEqual(0);
});

it('does not alter config if origin property is not present', () => {
const rawConfig = {
myplugin: {
new: 'new',
valid: 'valid',
},
someOtherPlugin: {
property: 'value',
},
};
const processed = copyFromRoot('myplugin.deprecated', 'myplugin.new')(
rawConfig,
'does-not-matter',
logger
);
expect(processed).toEqual({
myplugin: {
new: 'new',
valid: 'valid',
},
someOtherPlugin: {
property: 'value',
},
});
expect(deprecationMessages.length).toEqual(0);
});

it('does not alter config if they both exist', () => {
const rawConfig = {
myplugin: {
deprecated: 'deprecated',
renamed: 'renamed',
},
someOtherPlugin: {
property: 'value',
},
};
const processed = copyFromRoot('myplugin.deprecated', 'someOtherPlugin.property')(
rawConfig,
'does-not-matter',
logger
);
expect(processed).toEqual({
myplugin: {
deprecated: 'deprecated',
renamed: 'renamed',
},
someOtherPlugin: {
property: 'value',
},
});
});
});

describe('unused', () => {
it('removes the unused property from the config and logs a warning is present', () => {
const rawConfig = {
Expand Down
26 changes: 0 additions & 26 deletions packages/kbn-config/src/deprecation/deprecation_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,6 @@ const _rename = (
return config;
};

const _copy = (
config: Record<string, any>,
rootPath: string,
originKey: string,
destinationKey: string
) => {
const originPath = getPath(rootPath, originKey);
const originValue = get(config, originPath);
if (originValue === undefined) {
return config;
}

const destinationPath = getPath(rootPath, destinationKey);
const destinationValue = get(config, destinationPath);
if (destinationValue === undefined) {
set(config, destinationPath, originValue);
}
return config;
};

const _unused = (
config: Record<string, any>,
rootPath: string,
Expand All @@ -89,12 +69,6 @@ const renameFromRoot = (oldKey: string, newKey: string, silent?: boolean): Confi
log
) => _rename(config, '', log, oldKey, newKey, silent);

export const copyFromRoot = (originKey: string, destinationKey: string): ConfigDeprecation => (
config,
rootPath,
log
) => _copy(config, '', originKey, destinationKey);

const unused = (unusedKey: string): ConfigDeprecation => (config, rootPath, log) =>
_unused(config, rootPath, log, unusedKey);

Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-config/src/deprecation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export {
ConfigDeprecationFactory,
ConfigDeprecationProvider,
} from './types';
export { configDeprecationFactory, copyFromRoot } from './deprecation_factory';
export { configDeprecationFactory } from './deprecation_factory';
export { applyDeprecations } from './apply_deprecations';
1 change: 0 additions & 1 deletion packages/kbn-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export {
ConfigDeprecationLogger,
ConfigDeprecationProvider,
ConfigDeprecationWithContext,
copyFromRoot,
} from './deprecation';

export { RawConfigurationProvider, RawConfigService, getConfigFromFiles } from './raw';
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-legacy-logging/src/get_logging_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export function getLoggingConfiguration(config: LegacyLoggingConfig, opsInterval
} else if (config.verbose) {
_.defaults(events, {
log: '*',
ops: '*',
// To avoid duplicate logs, we explicitly disable this in verbose
// mode as it is already provided by the new logging config under
// the `metrics.ops` context.
ops: '!',
request: '*',
response: '*',
error: '*',
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ pageLoadAssetSize:
kibanaReact: 161921
kibanaUtils: 198829
lens: 96624
lensOss: 19341
licenseManagement: 41817
licensing: 39008
lists: 202261
Expand All @@ -53,7 +52,6 @@ pageLoadAssetSize:
maps: 183610
mapsLegacy: 116817
mapsLegacyLicensing: 20214
mapsOss: 19284
ml: 82187
monitoring: 50000
navigation: 37269
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export interface Suite {
title: string;
file?: string;
parent?: Suite;
eachTest: (cb: (test: Test) => void) => void;
root: boolean;
}

export interface Test {
Expand Down
Loading

0 comments on commit 2273214

Please sign in to comment.