forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] DF Analytics: adds prompt for destination index pattern creation (…
…elastic#70651) * add warning if create index not selected * create indexPrompt component and set needsDestIndexPattern * translation for prompt text and link * create indexPattern text to warning color
- Loading branch information
1 parent
31abd6d
commit 93bae22
Showing
7 changed files
with
111 additions
and
12 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
7 changes: 7 additions & 0 deletions
7
...data_frame_analytics/pages/analytics_exploration/components/index_pattern_prompt/index.ts
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,7 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export { IndexPatternPrompt } from './index_pattern_prompt'; |
48 changes: 48 additions & 0 deletions
48
...tics/pages/analytics_exploration/components/index_pattern_prompt/index_pattern_prompt.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,48 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { FC } from 'react'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; | ||
import { useMlKibana } from '../../../../../contexts/kibana'; | ||
|
||
interface Props { | ||
destIndex: string; | ||
} | ||
|
||
export const IndexPatternPrompt: FC<Props> = ({ destIndex }) => { | ||
const { | ||
services: { | ||
http: { basePath }, | ||
}, | ||
} = useMlKibana(); | ||
|
||
return ( | ||
<> | ||
<EuiText size="xs" color="warning"> | ||
<FormattedMessage | ||
id="xpack.ml.dataframe.analytics.indexPatternPromptMessage" | ||
defaultMessage="No index pattern exists for index {destIndex}. {linkToIndexPatternManagement} for {destIndex}." | ||
values={{ | ||
destIndex, | ||
linkToIndexPatternManagement: ( | ||
<EuiLink | ||
href={`${basePath.get()}/app/management/kibana/indexPatterns/create`} | ||
target="_blank" | ||
> | ||
<FormattedMessage | ||
id="xpack.ml.dataframe.analytics.indexPatternPromptLinkText" | ||
defaultMessage="Create an index pattern" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</EuiText> | ||
<EuiSpacer size="m" /> | ||
</> | ||
); | ||
}; |
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