Skip to content

Commit

Permalink
adopt data stream API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Jul 14, 2020
1 parent 54e09cd commit 3986485
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/index_management/common/types/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface TemplateSerialized {
version?: number;
priority?: number;
_meta?: { [key: string]: any };
data_stream?: { timestamp_field: string };
data_stream?: {};
}

/**
Expand All @@ -46,7 +46,7 @@ export interface TemplateDeserialized {
name: string;
};
_meta?: { [key: string]: any }; // Composable template only
dataStream?: { timestamp_field: string }; // Composable template only
dataStream?: {}; // Composable template only
_kbnMeta: {
type: TemplateType;
hasDatastream: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ export const schemas: Record<string, FormSchema> = {
defaultValue: false,
serializer: (value) => {
if (value === true) {
return {
timestamp_field: '@timestamp',
};
// For now, ES expects an empty empty when defining a data stream
// https://github.com/elastic/elasticsearch/pull/59317
return {};
}
},
deserializer: (value) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export default function ({ getService }: FtrProviderContext) {
},
},
},
data_stream: {
timestamp_field: '@timestamp',
},
data_stream: {},
},
});

Expand Down

0 comments on commit 3986485

Please sign in to comment.