Skip to content

Commit

Permalink
fix: update chart sorting control labels/descriptions (apache#1462)
Browse files Browse the repository at this point in the history
Co-authored-by: John Bodley <john.bodley@airbnb.com>
  • Loading branch information
2 people authored and zhaoyongjie committed Nov 25, 2021
1 parent e84f3b5 commit a9fd15b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const dndGroupByControl: SharedControlConfig<'DndColumnSelect'> = {
label: t('Group by'),
default: [],
description: t(
'One or many columns to group by. High cardinality groupings should include a sort by metric ' +
'and series limit to limit the number of fetched and rendered series.',
'One or many columns to group by. High cardinality groupings should include a series limit ' +
'to limit the number of fetched and rendered series.',
),
mapStateToProps(state, { includeTime }) {
const newState: ExtraControlProps = {};
Expand Down Expand Up @@ -125,8 +125,8 @@ export const dnd_sort_by: SharedControlConfig<'DndMetricSelect'> = {
label: t('Sort by'),
default: null,
description: t(
'Metric used to define the top series. Should be used in conjunction with the series or row ' +
'limit.',
'Metric used to define how the top series are sorted if a series or row limit is present. ' +
'If undefined reverts to the first metric (where appropriate).',
),
mapStateToProps: ({ datasource }) => ({
columns: datasource?.columns || [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,7 @@ const row_limit: SharedControlConfig<'SelectControl'> = {
validators: [legacyValidateInteger],
default: 10000,
choices: formatSelectOptions(ROW_LIMIT_OPTIONS),
description: t(
'Limits the number of rows that get displayed. Should be used in conjunction with a sort ' +
'by metric.',
),
description: t('Limits the number of rows that get displayed.'),
};

const limit: SharedControlConfig<'SelectControl'> = {
Expand All @@ -346,11 +343,10 @@ const limit: SharedControlConfig<'SelectControl'> = {
choices: formatSelectOptions(SERIES_LIMITS),
clearable: true,
description: t(
'Limits the number of series that get displayed. Should be used in conjunction with a sort ' +
'by metric. A joined subquery (or an extra phase where subqueries are not supported) is ' +
'applied to limit the number of series that get fetched and rendered. This feature is ' +
'useful when grouping by high cardinality column(s) though does increase the query ' +
'complexity and cost.',
'Limits the number of series that get displayed. A joined subquery (or an extra phase ' +
'where subqueries are not supported) is applied to limit the number of series that get ' +
'fetched and rendered. This feature is useful when grouping by high cardinality ' +
'column(s) though does increase the query complexity and cost.',
),
};

Expand All @@ -361,11 +357,10 @@ const series_limit: SharedControlConfig<'SelectControl'> = {
validators: [legacyValidateInteger],
choices: formatSelectOptions(SERIES_LIMITS),
description: t(
'Limits the number of series that get displayed. Should be used in conjunction with a sort ' +
'by metric. A joined subquery (or an extra phase where subqueries are not supported) is ' +
'applied to limit the number of series that get fetched and rendered. This feature is ' +
'useful when grouping by high cardinality column(s) though does increase the query ' +
'complexity and cost.',
'Limits the number of series that get displayed. A joined subquery (or an extra phase ' +
'where subqueries are not supported) is applied to limit the number of series that get ' +
'fetched and rendered. This feature is useful when grouping by high cardinality ' +
'column(s) though does increase the query complexity and cost.',
),
};

Expand All @@ -374,8 +369,8 @@ const sort_by: SharedControlConfig<'MetricsControl'> = {
label: t('Sort by'),
default: null,
description: t(
'Metric used to define the top series. Should be used in conjunction with the series or row ' +
'limit',
'Metric used to define how the top series are sorted if a series or row limit is present. ' +
'If undefined reverts to the first metric (where appropriate).',
),
mapStateToProps: ({ datasource }) => ({
columns: datasource?.columns || [],
Expand Down

0 comments on commit a9fd15b

Please sign in to comment.