-
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
[Rollups] Mark beta in rollup index pattern creation #24805
Changes from 2 commits
48af11b
d011451
c75b688
6f419bd
53262b8
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 |
---|---|---|
|
@@ -17,17 +17,20 @@ | |
* under the License. | ||
*/ | ||
|
||
import React, { Component } from 'react'; | ||
import React, { Component, Fragment } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import * as euiVars from '@elastic/eui/dist/eui_theme_k6_light.json'; | ||
|
||
import { | ||
EuiBadge, | ||
EuiButton, | ||
EuiPopover, | ||
EuiContextMenuPanel, | ||
EuiContextMenuItem, | ||
EuiDescriptionList, | ||
EuiDescriptionListTitle, | ||
EuiDescriptionListDescription, | ||
rgbToHex, | ||
} from '@elastic/eui'; | ||
|
||
export class CreateButton extends Component { | ||
|
@@ -58,6 +61,13 @@ export class CreateButton extends Component { | |
}); | ||
} | ||
|
||
renderBetaIcon = () => { | ||
const color = rgbToHex(euiVars.euiColorAccent); | ||
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. If we use named imports, we can simplify this code a bit: import { euiColorAccent }from '@elastic/eui/dist/eui_theme_k6_light.json';
const color = rgbToHex(euiColorAccent); |
||
return ( | ||
<EuiBadge color={color}>Beta</EuiBadge> | ||
); | ||
}; | ||
|
||
render() { | ||
const { options, children } = this.props; | ||
const { isPopoverOpen } = this.state; | ||
|
@@ -113,6 +123,12 @@ export class CreateButton extends Component { | |
<EuiDescriptionList style={{ whiteSpace: 'nowrap' }}> | ||
<EuiDescriptionListTitle> | ||
{option.text} | ||
{ option.beta ? ( | ||
<Fragment> | ||
{' '} | ||
{this.renderBetaIcon()} | ||
</Fragment> | ||
) : null } | ||
</EuiDescriptionListTitle> | ||
<EuiDescriptionListDescription> | ||
{option.description} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,11 +35,13 @@ export class IndexPatternCreationConfig { | |
name = indexPatternTypeName, | ||
showSystemIndices = true, | ||
httpClient = null, | ||
beta = false, | ||
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. Maybe this should be |
||
}) { | ||
this.type = type; | ||
this.name = name; | ||
this.showSystemIndices = showSystemIndices; | ||
this.httpClient = httpClient; | ||
this.beta = beta; | ||
} | ||
|
||
async getIndexPatternCreationOption(urlHandler) { | ||
|
@@ -61,6 +63,10 @@ export class IndexPatternCreationConfig { | |
return this.name; | ||
} | ||
|
||
getIsBeta = () => { | ||
return this.beta; | ||
} | ||
|
||
getShowSystemIndices = () => { | ||
return this.showSystemIndices; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,21 @@ import { | |
|
||
export const RollupPrompt = () => ( | ||
<EuiCallOut | ||
size="s" | ||
title={ | ||
`Rollup index patterns can match against one rollup index and zero or more | ||
color="warning" | ||
iconType="help" | ||
title="Beta feature" | ||
> | ||
<p> | ||
Kibana support for rollup index patterns is in beta. You may encounter issues using | ||
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. @gchaps Could you please review the two paragraphs here? Thanks! |
||
them in saved searches, visualizations, and dashboards. They are not supported | ||
in advanced features such as Visual Builder, Timelion, and Machine Learning. | ||
</p> | ||
<p> | ||
Rollup index patterns can match against one rollup index and zero or more | ||
regular indices. They will have limited metrics, fields, intervals and aggregations | ||
available based on the rollup index job configuration. The rollup index is | ||
limited to those that have one job configuration, or multiple jobs | ||
with the same configuration.` | ||
} | ||
/> | ||
with compatible configurations. | ||
</p> | ||
</EuiCallOut> | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig | |
type: 'rollup', | ||
name: 'rollup index pattern', | ||
showSystemIndices: false, | ||
beta: true, | ||
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. Same suggestion about |
||
...options, | ||
}); | ||
|
||
|
@@ -40,6 +41,7 @@ export class RollupIndexPatternCreationConfig extends IndexPatternCreationConfig | |
text: `Rollup index pattern`, | ||
description: `Can perform limited aggregations against summarized data`, | ||
testSubj: `createRollupIndexPatternButton`, | ||
beta: this.beta, | ||
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. And here. |
||
onClick: () => { | ||
urlHandler('/management/kibana/index?type=rollup'); | ||
}, | ||
|
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.
Maybe this should be named
renderBetaBadge
for consistency?