Skip to content

Commit

Permalink
Merge branch 'DianaDerevyankina' into 55710
Browse files Browse the repository at this point in the history
# Conflicts:
#	x-pack/plugins/apm/kibana.json
#	x-pack/plugins/apm/public/index.ts
#	x-pack/plugins/apm/public/plugin.ts
  • Loading branch information
DianaDerevyankina committed May 4, 2020
2 parents 84bde78 + c995a33 commit 08b9e67
Show file tree
Hide file tree
Showing 1,706 changed files with 35,376 additions and 13,537 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/legacy/plugins/canvas/shareable_runtime/build
/x-pack/legacy/plugins/canvas/storybook
/x-pack/plugins/monitoring/public/lib/jquery_flot
/x-pack/legacy/plugins/infra/common/graphql/types.ts
/x-pack/legacy/plugins/infra/public/graphql/types.ts
/x-pack/legacy/plugins/infra/server/graphql/types.ts
Expand Down
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,12 @@ module.exports = {
jquery: true,
},
},
{
files: ['x-pack/plugins/monitoring/public/lib/jquery_flot/**/*.js'],
env: {
jquery: true,
},
},

/**
* TSVB overrides
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
/x-pack/legacy/plugins/ingest_manager/ @elastic/ingest-management
/x-pack/plugins/observability/ @elastic/logs-metrics-ui @elastic/apm-ui @elastic/uptime @elastic/ingest-management
/x-pack/legacy/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
/x-pack/plugins/uptime @elastic/uptime

# Machine Learning
Expand Down Expand Up @@ -203,6 +204,7 @@
/x-pack/plugins/snapshot_restore/ @elastic/es-ui
/x-pack/plugins/upgrade_assistant/ @elastic/es-ui
/x-pack/plugins/watcher/ @elastic/es-ui
/x-pack/plugins/ingest_pipelines/ @elastic/es-ui

# Endpoint
/x-pack/plugins/endpoint/ @elastic/endpoint-app-team @elastic/siem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,36 @@ A migration function for a [saved object type](./kibana-plugin-core-server.saved
<b>Signature:</b>

```typescript
export declare type SavedObjectMigrationFn = (doc: SavedObjectUnsanitizedDoc, context: SavedObjectMigrationContext) => SavedObjectUnsanitizedDoc;
export declare type SavedObjectMigrationFn<InputAttributes = unknown, MigratedAttributes = unknown> = (doc: SavedObjectUnsanitizedDoc<InputAttributes>, context: SavedObjectMigrationContext) => SavedObjectUnsanitizedDoc<MigratedAttributes>;
```

## Example


```typescript
const migrateProperty: SavedObjectMigrationFn = (doc, { log }) => {
if(doc.attributes.someProp === null) {
log.warn('Skipping migration');
} else {
doc.attributes.someProp = migrateProperty(doc.attributes.someProp);
}

return doc;
interface TypeV1Attributes {
someKey: string;
obsoleteProperty: number;
}

interface TypeV2Attributes {
someKey: string;
newProperty: string;
}

const migrateToV2: SavedObjectMigrationFn<TypeV1Attributes, TypeV2Attributes> = (doc, { log }) => {
const { obsoleteProperty, ...otherAttributes } = doc.attributes;
// instead of mutating `doc` we make a shallow copy so that we can use separate types for the input
// and output attributes. We don't need to make a deep copy, we just need to ensure that obsolete
// attributes are not present on the returned doc.
return {
...doc,
attributes: {
...otherAttributes,
newProperty: migrate(obsoleteProperty),
},
};
};

```

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Describes Saved Object documents that have passed through the migration framewor
<b>Signature:</b>

```typescript
export declare type SavedObjectSanitizedDoc = SavedObjectDoc & Referencable;
export declare type SavedObjectSanitizedDoc<T = unknown> = SavedObjectDoc<T> & Referencable;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Describes Saved Object documents from Kibana &lt; 7.0.0 which don't have a `refe
<b>Signature:</b>

```typescript
export declare type SavedObjectUnsanitizedDoc = SavedObjectDoc & Partial<Referencable>;
export declare type SavedObjectUnsanitizedDoc<T = unknown> = SavedObjectDoc<T> & Partial<Referencable>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- 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; [AggGroupLabels](./kibana-plugin-plugins-data-public.agggrouplabels.md)

## AggGroupLabels variable

<b>Signature:</b>

```typescript
AggGroupLabels: {
[AggGroupNames.Buckets]: string;
[AggGroupNames.Metrics]: string;
[AggGroupNames.None]: string;
}
```
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; [AggGroupName](./kibana-plugin-plugins-data-public.agggroupname.md)

## AggGroupName type

<b>Signature:</b>

```typescript
export declare type AggGroupName = $Values<typeof AggGroupNames>;
```

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 08b9e67

Please sign in to comment.