-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Osquery] Fix ECS mapping editor issues (#132307)
- Loading branch information
1 parent
d638b18
commit df38c6f
Showing
11 changed files
with
180 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export const MAX_QUERY_LENGTH = 2000; | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { FIELD_TYPES } from '../../shared_imports'; | ||
import { queryFieldValidation } from '../../common/validations'; | ||
import { fieldValidators } from '../../shared_imports'; | ||
|
||
export const liveQueryFormSchema = { | ||
agentSelection: { | ||
defaultValue: { | ||
agents: [], | ||
allAgentsSelected: false, | ||
platformsSelected: [], | ||
policiesSelected: [], | ||
}, | ||
type: FIELD_TYPES.JSON, | ||
validations: [], | ||
}, | ||
savedQueryId: { | ||
type: FIELD_TYPES.TEXT, | ||
validations: [], | ||
}, | ||
query: { | ||
type: FIELD_TYPES.TEXT, | ||
validations: [ | ||
{ | ||
validator: fieldValidators.maxLengthField({ | ||
length: MAX_QUERY_LENGTH, | ||
message: i18n.translate('xpack.osquery.liveQuery.queryForm.largeQueryError', { | ||
defaultMessage: 'Query is too large (max {maxLength} characters)', | ||
values: { maxLength: MAX_QUERY_LENGTH }, | ||
}), | ||
}), | ||
}, | ||
{ validator: queryFieldValidation }, | ||
], | ||
}, | ||
ecs_mapping: { | ||
defaultValue: [], | ||
type: FIELD_TYPES.JSON, | ||
}, | ||
}; |
Oops, something went wrong.