-
Notifications
You must be signed in to change notification settings - Fork 914
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental callout for index pattern section
Signed-off-by: Yibo Wang <[email protected]>
- Loading branch information
Showing
5 changed files
with
104 additions
and
30 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
61 changes: 61 additions & 0 deletions
61
.../index_pattern_management/public/components/experimental_callout/experimental_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,61 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { i18n } from '@osd/i18n'; | ||
import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; | ||
|
||
export const ExperimentalCallout = () => { | ||
return ( | ||
<> | ||
<EuiCallOut title={TITLE} iconType="alert" color="warning"> | ||
<p> | ||
<EuiText> | ||
{DESCRIPTION_FIRST_PART} | ||
<b>{DATASOURCE_CONNECTION}</b> | ||
{DESCRIPTION_SECOND_PART} | ||
<b>{DEFAULT}</b> | ||
{DESCRIPTION_THIRD_PART} | ||
</EuiText> | ||
</p> | ||
</EuiCallOut> | ||
<EuiSpacer size="m" /> | ||
</> | ||
); | ||
}; | ||
|
||
const TITLE = i18n.translate('indexPatternManagement.experimentalFeatureCallout.title', { | ||
defaultMessage: 'Experimental feature active', | ||
}); | ||
|
||
const DESCRIPTION_FIRST_PART = i18n.translate( | ||
'indexPatternManagement.experimentalFeatureCallout.descriptionPartOne', | ||
{ | ||
defaultMessage: 'The experimental feature ', | ||
} | ||
); | ||
const DATASOURCE_CONNECTION = i18n.translate( | ||
'indexPatternManagement.experimentalFeatureCallout.datasourceConnection', | ||
{ | ||
defaultMessage: 'Data Source Connection ', | ||
} | ||
); | ||
const DESCRIPTION_SECOND_PART = i18n.translate( | ||
'indexPatternManagement.experimentalFeatureCallout.descriptionPartTwo', | ||
{ | ||
defaultMessage: | ||
'is active. To create an index pattern without using data from an external source, use ', | ||
} | ||
); | ||
const DEFAULT = i18n.translate('indexPatternManagement.experimentalFeatureCallout.default', { | ||
defaultMessage: 'default', | ||
}); | ||
const DESCRIPTION_THIRD_PART = i18n.translate( | ||
'indexPatternManagement.experimentalFeatureCallout.descriptionPartThree', | ||
{ | ||
defaultMessage: | ||
'. Any index pattern created using an external data source will result in an error if the experimental feature is deactivated.', | ||
} | ||
); |
6 changes: 6 additions & 0 deletions
6
src/plugins/index_pattern_management/public/components/experimental_callout/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,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export * from './experimental_callout'; |
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