kibana/x-pack/plugins/timelines/public/mock/header.ts
Xavier Mouligneau 4fa3dc46cb
[RAC] T-Grid is moving to a new home (#100265)
* wip

* First pass at standalone and embedded redux stores and usage

* wip

* First pass at standalone and embedded redux stores and usage

* wip

* clean up

* wip

* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n

* cleanup

* - fixes type errors in tests

* WIP remove use_manage_timeline

* wip add query + selector

* finishing integrating timeline manage context from redux

* integrating t-grid in security solution

* fix RowRender type

* WIP begin to move components from package to plugin

* integration of t-grid inside of security solution

* wip to make redux work

* little trick to make  it render

* - fixes a few type errors

* better integration betwen tgrid and security solutions

* bringing back tsconfig on timeline

* wip integration t-grid in observability

* fix types

* fix type in security solutions

* add type to import + trie dto get the bundle size as small as possible

* fix type in integration test

* fix type in integration test

* - fix tests

* clean up to use technical fields

* - fixes unit tests

* - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests

* fix t-grid settings vs create timeline + fix inspect button

* fix last suites test

* Update unit tests, snapshots and lint

* Fix bad merge

* fix plugin export

* Fix some failing tests

* fix unit tets in timelines plugins

* fix latest test

* fix i18n

* free obs from t-grid

* Fix timeline functional plugin types

* fix store provider

* Update failing defaultHeader test

* Fix i18n usage in security solution

* Fix remaining i18n errors in timelines plugin

* Dedupe common shared types

* move drag and drop utils in package to avoid duplication

* More shared type cleanup

* add feature flag

* review I

* fix merge  with master

* fix i18n translation

* More type deduping

* Use @kbn/common-utils, fix remaining types

* fix types

* fix tests

* missing type

* fix cypress tests

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>
2021-06-22 18:56:33 -04:00

133 lines
4.8 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { ColumnHeaderOptions } from '../../common/types/timeline';
import { defaultColumnHeaderType } from '../components/t_grid/body/column_headers/default_headers';
import {
DEFAULT_COLUMN_MIN_WIDTH,
DEFAULT_DATE_COLUMN_MIN_WIDTH,
} from '../components/t_grid/body/constants';
export const defaultHeaders: ColumnHeaderOptions[] = [
{
category: 'base',
columnHeaderType: defaultColumnHeaderType,
description:
'Date/time when the event originated.\nFor log events this is the date/time when the event was generated, and not when it was read.\nRequired field for all events.',
example: '2016-05-23T08:05:34.853Z',
id: '@timestamp',
type: 'date',
aggregatable: true,
initialWidth: DEFAULT_DATE_COLUMN_MIN_WIDTH,
},
{
category: 'event',
columnHeaderType: defaultColumnHeaderType,
description:
"Severity describes the severity of the event. What the different severity values mean can very different between use cases. It's up to the implementer to make sure severities are consistent across events.",
example: '7',
id: 'event.severity',
type: 'long',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'event',
columnHeaderType: defaultColumnHeaderType,
description:
'Event category.\nThis contains high-level information about the contents of the event. It is more generic than `event.action`, in the sense that typically a category contains multiple actions. Warning: In future versions of ECS, we plan to provide a list of acceptable values for this field, please use with caution.',
example: 'user-management',
id: 'event.category',
type: 'keyword',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'event',
columnHeaderType: defaultColumnHeaderType,
description:
'The action captured by the event.\nThis describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer.',
example: 'user-password-change',
id: 'event.action',
type: 'keyword',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'host',
columnHeaderType: defaultColumnHeaderType,
description:
'Name of the host.\nIt can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.',
example: '',
id: 'host.name',
type: 'keyword',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'source',
columnHeaderType: defaultColumnHeaderType,
description: 'IP address of the source.\nCan be one or multiple IPv4 or IPv6 addresses.',
example: '',
id: 'source.ip',
type: 'ip',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'destination',
columnHeaderType: defaultColumnHeaderType,
description: 'IP address of the destination.\nCan be one or multiple IPv4 or IPv6 addresses.',
example: '',
id: 'destination.ip',
type: 'ip',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
aggregatable: true,
category: 'destination',
columnHeaderType: defaultColumnHeaderType,
description: 'Bytes sent from the source to the destination',
example: '123',
format: 'bytes',
id: 'destination.bytes',
type: 'number',
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'user',
columnHeaderType: defaultColumnHeaderType,
description: 'Short name or login of the user.',
example: 'albert',
id: 'user.name',
type: 'keyword',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'base',
columnHeaderType: defaultColumnHeaderType,
description: 'Each document has an _id that uniquely identifies it',
example: 'Y-6TfmcB0WOhS6qyMv3s',
id: '_id',
type: 'keyword',
aggregatable: true,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
{
category: 'base',
columnHeaderType: defaultColumnHeaderType,
description:
'For log events the message field contains the log message.\nIn other use cases the message field can be used to concatenate different values which are then freely searchable. If multiple messages exist, they can be combined into one message.',
example: 'Hello World',
id: 'message',
type: 'text',
aggregatable: false,
initialWidth: DEFAULT_COLUMN_MIN_WIDTH,
},
];