-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Display link to create data view from error cases in data frame analytics results pages #143596
[ML] Display link to create data view from error cases in data frame analytics results pages #143596
Changes from 2 commits
098aa10
7e8031b
c849b80
e5f0676
a891812
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ import { getFeatureCount } from './common'; | |
import { useOutlierData } from './use_outlier_data'; | ||
import { useExplorationUrlState } from '../../hooks/use_exploration_url_state'; | ||
import { ExplorationQueryBarProps } from '../exploration_query_bar/exploration_query_bar'; | ||
import { IndexPatternPrompt } from '../index_pattern_prompt'; | ||
|
||
export type TableItem = Record<string, any>; | ||
|
||
|
@@ -90,6 +91,8 @@ export const OutlierExploration: FC<ExplorationProps> = React.memo(({ jobId }) = | |
jobConfig?.analyzed_fields?.excludes, | ||
resultsField | ||
); | ||
const destIndex = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic is used in several places in DFA like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added util function in c849b80 |
||
(Array.isArray(jobConfig?.dest.index) ? jobConfig?.dest.index[0] : jobConfig?.dest.index) ?? ''; | ||
|
||
if (indexPatternErrorMessage !== undefined) { | ||
return ( | ||
|
@@ -101,7 +104,12 @@ export const OutlierExploration: FC<ExplorationProps> = React.memo(({ jobId }) = | |
color="danger" | ||
iconType="cross" | ||
> | ||
<p>{indexPatternErrorMessage}</p> | ||
<p> | ||
{indexPatternErrorMessage} | ||
{needsDestIndexPattern ? ( | ||
<IndexPatternPrompt destIndex={destIndex} color="text" /> | ||
) : null} | ||
</p> | ||
</EuiCallOut> | ||
</EuiPanel> | ||
); | ||
|
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.
This will leave an extra space before the period if the destIndex is undefined. "No data view exists for index ."