Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preparing datatable for unification with kibana_datatable #77320

Merged
merged 1 commit into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const boolean: ExpressionTypeDefinition<'boolean', boolean> = {
},
datatable: (value): Datatable => ({
type: 'datatable',
meta: {},
columns: [{ id: 'value', name: 'value', meta: { type: name } }],
rows: [{ value }],
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export type DatatableRow = Record<string, any>;
export interface DatatableColumnMeta {
type: DatatableColumnType;
field?: string;
index?: string;
params?: SerializableState;
source?: string;
sourceParams?: SerializableState;
}
/**
* This type represents the shape of a column in a `Datatable`.
Expand All @@ -63,17 +66,11 @@ export interface DatatableColumn {
meta: DatatableColumnMeta;
}

export interface DatatableMeta {
type?: string;
source?: string;
}

/**
* A `Datatable` in Canvas is a unique structure that represents tabulated data.
*/
export interface Datatable {
type: typeof name;
meta?: DatatableMeta;
columns: DatatableColumn[];
rows: DatatableRow[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const num: ExpressionTypeDefinition<'num', ExpressionValueNum> = {
},
datatable: ({ value }): Datatable => ({
type: 'datatable',
meta: {},
columns: [{ id: 'value', name: 'value', meta: { type: 'number' } }],
rows: [{ value }],
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const number: ExpressionTypeDefinition<typeof name, number> = {
},
datatable: (value): Datatable => ({
type: 'datatable',
meta: {},
columns: [{ id: 'value', name: 'value', meta: { type: 'number' } }],
rows: [{ value }],
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const string: ExpressionTypeDefinition<typeof name, string> = {
},
datatable: (value): Datatable => ({
type: 'datatable',
meta: {},
columns: [{ id: 'value', name: 'value', meta: { type: 'string' } }],
rows: [{ value }],
}),
Expand Down