Skip to content

Commit

Permalink
Merge branch 'master' into fix/dashboardMigrationSmokeTests
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 21, 2021
2 parents d80239b + e97cfad commit 2faf214
Show file tree
Hide file tree
Showing 880 changed files with 12,276 additions and 7,103 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/post_build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ ! "${DISABLE_CI_STATS_SHIPPING:-}" ]]; then
echo "--- Ship Kibana Distribution Metrics to CI Stats"
node scripts/ship_ci_stats \
--metrics target/optimizer_bundle_metrics.json \
--metrics packages/kbn-ui-shared-deps/target/metrics.json
--metrics node_modules/@kbn/ui-shared-deps/shared_built_assets/metrics.json
fi

echo "--- Upload Build Artifacts"
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ snapshots.js
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/kbn-ui-framework/dist
/packages/kbn-ui-shared-deps/flot_charts
/packages/kbn-ui-shared-deps/src/flot_charts
/packages/kbn-monaco/src/painless/antlr

# Bazel
Expand Down
12 changes: 11 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,16 @@ module.exports = {
},
},

/**
* Cases overrides
*/
{
files: ['x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}'],
rules: {
'no-duplicate-imports': 'error',
},
},

/**
* Security Solution overrides
*/
Expand Down Expand Up @@ -1461,7 +1471,7 @@ module.exports = {
},
},
{
files: ['packages/kbn-ui-shared-deps/flot_charts/**/*.js'],
files: ['packages/kbn-ui-shared-deps/src/flot_charts/**/*.js'],
env: {
jquery: true,
},
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
/src/plugins/apm_oss/ @elastic/apm-ui
/src/apm.js @elastic/kibana-core @vigneshshanmugam
/packages/kbn-apm-config-loader/ @elastic/kibana-core @vigneshshanmugam
/src/core/types/elasticsearch @elastic/apm-ui
#CC# /src/plugins/apm_oss/ @elastic/apm-ui
#CC# /x-pack/plugins/observability/ @elastic/apm-ui

Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"uiActionsExamples": "examples/ui_action_examples",
"share": "src/plugins/share",
"home": "src/plugins/home",
"flot": "packages/kbn-ui-shared-deps/flot_charts",
"flot": "packages/kbn-ui-shared-deps/src/flot_charts",
"charts": "src/plugins/charts",
"esUi": "src/plugins/es_ui_shared",
"devTools": "src/plugins/dev_tools",
Expand Down
2 changes: 2 additions & 0 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ yarn kbn watch-bazel
- @kbn/monaco
- @kbn/rule-data-utils
- @kbn/securitysolution-es-utils
- @kbn/securitysolution-hook-utils
- @kbn/securitysolution-io-ts-alerting-types
- @kbn/securitysolution-io-ts-list-types
- @kbn/securitysolution-io-ts-types
Expand All @@ -101,5 +102,6 @@ yarn kbn watch-bazel
- @kbn/std
- @kbn/telemetry-utils
- @kbn/tinymath
- @kbn/ui-shared-deps
- @kbn/utility-types
- @kbn/utils
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,18 @@ readonly links: {
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
}>;
};
```

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsDeleteOptions](./kibana-plugin-core-server.savedobjectsdeleteoptions.md) | |
| [SavedObjectsExportByObjectOptions](./kibana-plugin-core-server.savedobjectsexportbyobjectoptions.md) | Options for the [export by objects API](./kibana-plugin-core-server.savedobjectsexporter.exportbyobjects.md) |
| [SavedObjectsExportByTypeOptions](./kibana-plugin-core-server.savedobjectsexportbytypeoptions.md) | Options for the [export by type API](./kibana-plugin-core-server.savedobjectsexporter.exportbytypes.md) |
| [SavedObjectsExportExcludedObject](./kibana-plugin-core-server.savedobjectsexportexcludedobject.md) | |
| [SavedObjectsExportResultDetails](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) | Structure of the export result details entry |
| [SavedObjectsExportTransformContext](./kibana-plugin-core-server.savedobjectsexporttransformcontext.md) | Context passed down to a [export transform function](./kibana-plugin-core-server.savedobjectsexporttransform.md) |
| [SavedObjectsFindOptions](./kibana-plugin-core-server.savedobjectsfindoptions.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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsExportExcludedObject](./kibana-plugin-core-server.savedobjectsexportexcludedobject.md) &gt; [id](./kibana-plugin-core-server.savedobjectsexportexcludedobject.id.md)

## SavedObjectsExportExcludedObject.id property

id of the excluded object

<b>Signature:</b>

```typescript
id: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsExportExcludedObject](./kibana-plugin-core-server.savedobjectsexportexcludedobject.md)

## SavedObjectsExportExcludedObject interface


<b>Signature:</b>

```typescript
export interface SavedObjectsExportExcludedObject
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [id](./kibana-plugin-core-server.savedobjectsexportexcludedobject.id.md) | <code>string</code> | id of the excluded object |
| [reason](./kibana-plugin-core-server.savedobjectsexportexcludedobject.reason.md) | <code>string</code> | optional cause of the exclusion |
| [type](./kibana-plugin-core-server.savedobjectsexportexcludedobject.type.md) | <code>string</code> | type of the excluded object |

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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsExportExcludedObject](./kibana-plugin-core-server.savedobjectsexportexcludedobject.md) &gt; [reason](./kibana-plugin-core-server.savedobjectsexportexcludedobject.reason.md)

## SavedObjectsExportExcludedObject.reason property

optional cause of the exclusion

<b>Signature:</b>

```typescript
reason?: string;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsExportExcludedObject](./kibana-plugin-core-server.savedobjectsexportexcludedobject.md) &gt; [type](./kibana-plugin-core-server.savedobjectsexportexcludedobject.type.md)

## SavedObjectsExportExcludedObject.type property

type of the excluded object

<b>Signature:</b>

```typescript
type: string;
```
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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsExportResultDetails](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) &gt; [excludedObjects](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjects.md)

## SavedObjectsExportResultDetails.excludedObjects property

excluded objects details

<b>Signature:</b>

```typescript
excludedObjects: SavedObjectsExportExcludedObject[];
```
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-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsExportResultDetails](./kibana-plugin-core-server.savedobjectsexportresultdetails.md) &gt; [excludedObjectsCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjectscount.md)

## SavedObjectsExportResultDetails.excludedObjectsCount property

number of objects that were excluded from the export

<b>Signature:</b>

```typescript
excludedObjectsCount: number;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface SavedObjectsExportResultDetails

| Property | Type | Description |
| --- | --- | --- |
| [excludedObjects](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjects.md) | <code>SavedObjectsExportExcludedObject[]</code> | excluded objects details |
| [excludedObjectsCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.excludedobjectscount.md) | <code>number</code> | number of objects that were excluded from the export |
| [exportedCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.exportedcount.md) | <code>number</code> | number of successfully exported objects |
| [missingRefCount](./kibana-plugin-core-server.savedobjectsexportresultdetails.missingrefcount.md) | <code>number</code> | number of missing references |
| [missingReferences](./kibana-plugin-core-server.savedobjectsexportresultdetails.missingreferences.md) | <code>Array&lt;{</code><br/><code> id: string;</code><br/><code> type: string;</code><br/><code> }&gt;</code> | missing references details |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A type's export transform function will be executed once per user-initiated expo
<b>Signature:</b>

```typescript
export declare type SavedObjectsExportTransform = <T = unknown>(context: SavedObjectsExportTransformContext, objects: Array<SavedObject<T>>) => SavedObject[] | Promise<SavedObject[]>;
export declare type SavedObjectsExportTransform<T = unknown> = (context: SavedObjectsExportTransformContext, objects: Array<SavedObject<T>>) => SavedObject[] | Promise<SavedObject[]>;
```

## Remarks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ export class Plugin() {
| Property | Type | Description |
| --- | --- | --- |
| [addClientWrapper](./kibana-plugin-core-server.savedobjectsservicesetup.addclientwrapper.md) | <code>(priority: number, id: string, factory: SavedObjectsClientWrapperFactory) =&gt; void</code> | Add a [client wrapper factory](./kibana-plugin-core-server.savedobjectsclientwrapperfactory.md) with the given priority. |
| [registerType](./kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | <code>(type: SavedObjectsType) =&gt; void</code> | Register a [savedObjects type](./kibana-plugin-core-server.savedobjectstype.md) definition.<!-- -->See the [mappings format](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) and [migration format](./kibana-plugin-core-server.savedobjectmigrationmap.md) for more details about these. |
| [registerType](./kibana-plugin-core-server.savedobjectsservicesetup.registertype.md) | <code>&lt;Attributes = any&gt;(type: SavedObjectsType&lt;Attributes&gt;) =&gt; void</code> | Register a [savedObjects type](./kibana-plugin-core-server.savedobjectstype.md) definition.<!-- -->See the [mappings format](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) and [migration format](./kibana-plugin-core-server.savedobjectmigrationmap.md) for more details about these. |
| [setClientFactoryProvider](./kibana-plugin-core-server.savedobjectsservicesetup.setclientfactoryprovider.md) | <code>(clientFactoryProvider: SavedObjectsClientFactoryProvider) =&gt; void</code> | Set the default [factory provider](./kibana-plugin-core-server.savedobjectsclientfactoryprovider.md) for creating Saved Objects clients. Only one provider can be set, subsequent calls to this method will fail. |

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See the [mappings format](./kibana-plugin-core-server.savedobjectstypemappingdef
<b>Signature:</b>

```typescript
registerType: (type: SavedObjectsType) => void;
registerType: <Attributes = any>(type: SavedObjectsType<Attributes>) => void;
```

## Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ An optional [saved objects management section](./kibana-plugin-core-server.saved
<b>Signature:</b>

```typescript
management?: SavedObjectsTypeManagementDefinition;
management?: SavedObjectsTypeManagementDefinition<Attributes>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
export interface SavedObjectsType
export interface SavedObjectsType<Attributes = any>
```

## Remarks
Expand Down Expand Up @@ -54,7 +54,7 @@ Example after converting to a multi-namespace (shareable) type in 8.1:
Note: migration function(s) can be optionally specified for any of these versions and will not interfere with the conversion process. |
| [hidden](./kibana-plugin-core-server.savedobjectstype.hidden.md) | <code>boolean</code> | Is the type hidden by default. If true, repositories will not have access to this type unless explicitly declared as an <code>extraType</code> when creating the repository.<!-- -->See [createInternalRepository](./kibana-plugin-core-server.savedobjectsservicestart.createinternalrepository.md)<!-- -->. |
| [indexPattern](./kibana-plugin-core-server.savedobjectstype.indexpattern.md) | <code>string</code> | If defined, the type instances will be stored in the given index instead of the default one. |
| [management](./kibana-plugin-core-server.savedobjectstype.management.md) | <code>SavedObjectsTypeManagementDefinition</code> | An optional [saved objects management section](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.md) definition for the type. |
| [management](./kibana-plugin-core-server.savedobjectstype.management.md) | <code>SavedObjectsTypeManagementDefinition&lt;Attributes&gt;</code> | An optional [saved objects management section](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.md) definition for the type. |
| [mappings](./kibana-plugin-core-server.savedobjectstype.mappings.md) | <code>SavedObjectsTypeMappingDefinition</code> | The [mapping definition](./kibana-plugin-core-server.savedobjectstypemappingdefinition.md) for the type. |
| [migrations](./kibana-plugin-core-server.savedobjectstype.migrations.md) | <code>SavedObjectMigrationMap &#124; (() =&gt; SavedObjectMigrationMap)</code> | An optional map of [migrations](./kibana-plugin-core-server.savedobjectmigrationfn.md) or a function returning a map of [migrations](./kibana-plugin-core-server.savedobjectmigrationfn.md) to be used to migrate the type. |
| [name](./kibana-plugin-core-server.savedobjectstype.name.md) | <code>string</code> | The name of the type, which is also used as the internal id. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Function returning the url to use to redirect to the editing page of this object
<b>Signature:</b>

```typescript
getEditUrl?: (savedObject: SavedObject<any>) => string;
getEditUrl?: (savedObject: SavedObject<Attributes>) => string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Function returning the url to use to redirect to this object from the management
<b>Signature:</b>

```typescript
getInAppUrl?: (savedObject: SavedObject<any>) => {
getInAppUrl?: (savedObject: SavedObject<Attributes>) => {
path: string;
uiCapabilitiesPath: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Function returning the title to display in the management table. If not defined,
<b>Signature:</b>

```typescript
getTitle?: (savedObject: SavedObject<any>) => string;
getTitle?: (savedObject: SavedObject<Attributes>) => string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [SavedObjectsTypeManagementDefinition](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.md) &gt; [isExportable](./kibana-plugin-core-server.savedobjectstypemanagementdefinition.isexportable.md)

## SavedObjectsTypeManagementDefinition.isExportable property

Optional hook to specify whether an object should be exportable.

If specified, `isExportable` will be called during export for each of this type's objects in the export, and the ones not matching the predicate will be excluded from the export.

When implementing both `isExportable` and `onExport`<!-- -->, it is mandatory that `isExportable` returns the same value for an object before and after going though the export transform. E.g `isExportable(objectBeforeTransform) === isExportable(objectAfterTransform)`

<b>Signature:</b>

```typescript
isExportable?: SavedObjectsExportablePredicate<Attributes>;
```

## Remarks

`importableAndExportable` must be `true` to specify this property.

## Example

Registering a type with a per-object exportability predicate

```ts
// src/plugins/my_plugin/server/plugin.ts
import { myType } from './saved_objects';

export class Plugin() {
setup: (core: CoreSetup) => {
core.savedObjects.registerType({
...myType,
management: {
...myType.management,
isExportable: (object) => {
if (object.attributes.myCustomAttr === 'foo') {
return false;
}
return true;
}
},
});
}
}

```

Loading

0 comments on commit 2faf214

Please sign in to comment.