@@ -21,7 +21,8 @@ import React from 'react';
2121import createReactClass from 'create-react-class' ;
2222import { FormattedMessage } from 'react-intl' ;
2323import { Input , Row , Col } from 'components/bootstrap' ;
24- import { MultiSelect } from 'components/common' ;
24+ import { MultiSelect , Text } from 'components/common' ;
25+ import styled , { css } from 'styled-components' ;
2526
2627import withFormattedFields from './withFormattedFields' ;
2728
@@ -44,26 +45,39 @@ const GroupByInput = createReactClass({
4445 } ,
4546
4647 render ( ) {
48+ const StyledText = styled ( Text ) ( ( { theme } ) => css `
49+ color : ${ theme . colors . gray [ 50 ] } ;
50+ padding-left : 10px ;
51+ ` ) ;
4752 const { formattedFields } = this . props ;
4853
4954 return (
50- < Row >
51- < Col md = { 2 } style = { { marginTop : 5 , marginBottom : 0 } } >
52- < label className = "pull-right" > < FormattedMessage id = "wizard.groupBy" defaultMessage = "Group by Condition" /> </ label >
53- </ Col >
54- < Col md = { 10 } >
55- < label > < FormattedMessage id = "wizard.groupByLabel" defaultMessage = "Messages must be grouped by" /> </ label >
56- < Input ref = "grouping_fields" id = "grouping_fields" name = "grouping_fields" >
57- < div style = { { minWidth :'300px' } } >
58- < MultiSelect autoFocus = { false }
59- options = { formattedFields }
60- value = { this . state . grouping_fields ? ( Array . isArray ( this . state . grouping_fields ) ? this . state . grouping_fields . join ( ',' ) : this . state . grouping_fields ) : undefined }
61- onChange = { this . _onGroupingFieldsChange }
62- allowCreate = { true } />
63- </ div >
64- </ Input >
65- </ Col >
66- </ Row >
55+ < >
56+ < Row >
57+ < Col md = { 2 } style = { { marginTop : 5 , marginBottom : 0 } } >
58+ < label className = "pull-right" > < FormattedMessage id = "wizard.groupBy" defaultMessage = "Group by Condition" /> </ label >
59+ </ Col >
60+ < Col md = { 10 } >
61+ < label > < FormattedMessage id = "wizard.groupByLabel" defaultMessage = "Messages must be grouped by" /> </ label >
62+ < Input ref = "grouping_fields" id = "grouping_fields" name = "grouping_fields" >
63+ < div style = { { minWidth :'300px' } } >
64+ < MultiSelect autoFocus = { false }
65+ options = { formattedFields }
66+ value = { this . state . grouping_fields ? ( Array . isArray ( this . state . grouping_fields ) ? this . state . grouping_fields . join ( ',' ) : this . state . grouping_fields ) : undefined }
67+ onChange = { this . _onGroupingFieldsChange }
68+ allowCreate = { true } />
69+ </ div >
70+ </ Input >
71+ </ Col >
72+ </ Row >
73+ < Row >
74+ < Col >
75+ < StyledText >
76+ < FormattedMessage id = "wizard.groupByDescription" defaultMessage = "Note: These fields will be used to aggregate alerts" />
77+ </ StyledText >
78+ </ Col >
79+ </ Row >
80+ </ >
6781 ) ;
6882 } ,
6983} ) ;
0 commit comments