chore: add Reduce To for pie chart (#5629)

This commit is contained in:
Srikanth Chekuri 2024-08-05 20:53:52 +05:30 committed by GitHub
parent 61e6316736
commit 4a4c9f26a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 12 deletions

View File

@ -268,6 +268,7 @@ export const panelTypeDataSourceFormValuesMap: Record<
'aggregateOperator', 'aggregateOperator',
'aggregateAttribute', 'aggregateAttribute',
'groupBy', 'groupBy',
'reduceTo',
'limit', 'limit',
'having', 'having',
'orderBy', 'orderBy',
@ -286,6 +287,7 @@ export const panelTypeDataSourceFormValuesMap: Record<
'aggregateOperator', 'aggregateOperator',
'aggregateAttribute', 'aggregateAttribute',
'groupBy', 'groupBy',
'reduceTo',
'limit', 'limit',
'having', 'having',
'orderBy', 'orderBy',
@ -305,6 +307,7 @@ export const panelTypeDataSourceFormValuesMap: Record<
'aggregateOperator', 'aggregateOperator',
'aggregateAttribute', 'aggregateAttribute',
'groupBy', 'groupBy',
'reduceTo',
'limit', 'limit',
'having', 'having',
'orderBy', 'orderBy',

View File

@ -544,19 +544,21 @@ export const Query = memo(function Query({
)} )}
</Col> </Col>
{isVersionV4 && isMetricsDataSource && panelType === PANEL_TYPES.TABLE && ( {isVersionV4 &&
<Col flex="1 1 12.5rem"> isMetricsDataSource &&
<Row> (panelType === PANEL_TYPES.TABLE || panelType === PANEL_TYPES.PIE) && (
<Col span={6}> <Col flex="1 1 12.5rem">
<FilterLabel label="Reduce to" /> <Row>
</Col> <Col span={6}>
<FilterLabel label="Reduce to" />
</Col>
<Col span={18}> <Col span={18}>
<ReduceToFilter query={query} onChange={handleChangeReduceTo} /> <ReduceToFilter query={query} onChange={handleChangeReduceTo} />
</Col> </Col>
</Row> </Row>
</Col> </Col>
)} )}
</Row> </Row>
</Col> </Col>
)} )}