Skip to content

Commit

Permalink
Merge branch 'master' into feat/init-osquery
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski authored Jan 27, 2021
2 parents 00b6ea1 + b8947e3 commit 69d5bb9
Show file tree
Hide file tree
Showing 245 changed files with 5,114 additions and 4,344 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
18 changes: 4 additions & 14 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 Expand Up @@ -380,10 +370,6 @@ and actions.
|The features plugin enhance Kibana with a per-feature privilege system.
|{kib-repo}blob/{branch}/x-pack/plugins/file_upload/README.md[fileUpload]
|Backend and core front-end react-components for GeoJson file upload. Only supports the Maps plugin.
|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[fleet]
|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false)
Expand Down Expand Up @@ -453,6 +439,10 @@ using the CURL scripts in the scripts folder.
|Visualize geo data from Elasticsearch or 3rd party geo-services.
|{kib-repo}blob/{branch}/x-pack/plugins/maps_file_upload/README.md[mapsFileUpload]
|Deprecated - plugin targeted for removal and will get merged into file_upload plugin
|{kib-repo}blob/{branch}/x-pack/plugins/maps_legacy_licensing/README.md[mapsLegacyLicensing]
|This plugin provides access to the detailed tile map services from Elastic.
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
15 changes: 14 additions & 1 deletion docs/user/alerting/action-types/webhook.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,17 @@ Password:: An optional password. If set, HTTP basic authentication is used. Cur

Webhook actions have the following properties:

Body:: A json payload sent to the request URL.
Body:: A JSON payload sent to the request URL. For example:
+
[source,text]
--
{
"short_description": "{{context.rule.name}}",
"description": "{{context.rule.description}}",
...
}
--

Mustache template variables (the text enclosed in double braces, for example, `context.rule.name`) have
their values escaped, so that the final JSON will be valid (escaping double quote characters).
For more information on Mustache template variables, refer to <<defining-alerts-actions-details>>.
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
Loading

0 comments on commit 69d5bb9

Please sign in to comment.