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
[ML] Adds validation of field selected for log pattern analysis #162319
Merged
jgowdyelastic
merged 41 commits into
elastic:main
from
jgowdyelastic:pattern-analysis-field-validation
Jul 28, 2023
Merged
Changes from 34 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
9e290aa
[ML] Log pattern analysis field validation
jgowdyelastic bacf7d8
Merge branch 'main' into pattern-analysis-field-validation
jgowdyelastic 5963371
conflicts after merge
jgowdyelastic db972cf
removing commented code
jgowdyelastic f174123
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 6478436
conflicts
jgowdyelastic 93fecdc
fixing more conflicts
jgowdyelastic f401d4c
translation id
jgowdyelastic b1ea5a0
fixing query and cancel
jgowdyelastic c9e025a
making examples optional in the endpoint response
jgowdyelastic 3868966
fixing optional examples
jgowdyelastic 2a8e2d2
Merge branch 'main' into pattern-analysis-field-validation
jgowdyelastic f5801ae
text change
jgowdyelastic a42b7bb
Merge branch 'main' into pattern-analysis-field-validation
jgowdyelastic d801056
adding url state for field selection
jgowdyelastic 34066a5
commented code
jgowdyelastic efa072c
auto select message field
jgowdyelastic 9a970ff
Merge branch 'main' into pattern-analysis-field-validation
jgowdyelastic 8000d37
variable rename
jgowdyelastic ed00ad1
missing commit
jgowdyelastic cc020ba
reseting validation results after form change
jgowdyelastic 82bc81c
lots of patten typos
jgowdyelastic 7944f53
api change
jgowdyelastic 431238b
info text changed
jgowdyelastic 9389219
plural patterns
jgowdyelastic 383d92a
Merge remote-tracking branch 'origin/main' into pattern-analysis-fiel…
jgowdyelastic 402d62a
removing accidentally touched file
jgowdyelastic ed77ab5
Merge remote-tracking branch 'origin/main' into pattern-analysis-fiel…
jgowdyelastic 5864f72
Merge branch 'main' into pattern-analysis-field-validation
jgowdyelastic d02a6cc
Merge branch 'pattern-analysis-field-validation' of github.com:jgowdy…
jgowdyelastic 40fb370
moving runtime mapping schema to package
jgowdyelastic 914c43d
small changes based on review
jgowdyelastic 141b182
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 3f10c3f
Merge branch 'main' into pattern-analysis-field-validation
jgowdyelastic 04f6564
adding i18n tracking for runtime_field_utils
jgowdyelastic 8903063
reverting runtimeMappingsSchema schema move
jgowdyelastic 1de953b
jsdoc comments
jgowdyelastic 092a206
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 8704072
translation id
jgowdyelastic 922b8da
removing runtime_field_utils from translations
jgowdyelastic 96a6c88
further clean up after code revert
jgowdyelastic File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
44 changes: 44 additions & 0 deletions
44
x-pack/plugins/aiops/public/components/log_categorization/category_validation_callout.tsx
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,44 @@ | ||
/* | ||
* 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 React, { FC } from 'react'; | ||
import { | ||
FieldValidationResults, | ||
CATEGORY_EXAMPLES_VALIDATION_STATUS, | ||
} from '@kbn/ml-category-validator'; | ||
|
||
import { EuiCallOut } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
interface Props { | ||
validationResults: FieldValidationResults | null; | ||
} | ||
|
||
export const FieldValidationCallout: FC<Props> = ({ validationResults }) => { | ||
if (validationResults === null) { | ||
return null; | ||
} | ||
|
||
if (validationResults.overallValidStatus === CATEGORY_EXAMPLES_VALIDATION_STATUS.VALID) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<EuiCallOut | ||
color="warning" | ||
title={i18n.translate('xpack.aiops.logCategorization.fieldValidationTitle', { | ||
defaultMessage: 'The selected field is possibly not suitable for pattern analysis', | ||
})} | ||
> | ||
{validationResults.validationChecks | ||
.filter((check) => check.valid !== CATEGORY_EXAMPLES_VALIDATION_STATUS.VALID) | ||
.map((check) => ( | ||
<div key={check.id}>{check.message}</div> | ||
))} | ||
</EuiCallOut> | ||
); | ||
}; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you manage to find out if it's possible to disable auto refresh on the page? It's good that we persist the field selection, but we lose the results when the page refreshes (inside ML).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find a way to do it. you can disable some parts of the time picker, but not the refresh checkbox.