Skip to content

Commit

Permalink
[7.x] [Lens] Improves ranking feature in Top values (#90749) (#91385)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
dej611 and kibanamachine authored Feb 15, 2021
1 parent 3f4e926 commit 48a22ec
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
EuiPopover,
EuiButtonEmpty,
EuiText,
EuiIconTip,
} from '@elastic/eui';
import { AggFunctionsMapping } from '../../../../../../../../src/plugins/data/public';
import { buildExpressionFunction } from '../../../../../../../../src/plugins/expressions/public';
Expand Down Expand Up @@ -316,9 +317,25 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field
</EuiText>
)}
<EuiFormRow
label={i18n.translate('xpack.lens.indexPattern.terms.orderBy', {
defaultMessage: 'Order by',
})}
label={
<>
{i18n.translate('xpack.lens.indexPattern.terms.orderBy', {
defaultMessage: 'Rank by',
})}{' '}
<EuiIconTip
color="subdued"
content={i18n.translate('xpack.lens.indexPattern.terms.orderByHelp', {
defaultMessage: `Specifies the dimension the top values are ranked by.`,
})}
iconProps={{
className: 'eui-alignTop',
}}
position="top"
size="s"
type="questionInCircle"
/>
</>
}
display="columnCompressed"
fullWidth
>
Expand All @@ -338,14 +355,30 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field
)
}
aria-label={i18n.translate('xpack.lens.indexPattern.terms.orderBy', {
defaultMessage: 'Order by',
defaultMessage: 'Rank by',
})}
/>
</EuiFormRow>
<EuiFormRow
label={i18n.translate('xpack.lens.indexPattern.terms.orderDirection', {
defaultMessage: 'Order direction',
})}
label={
<>
{i18n.translate('xpack.lens.indexPattern.terms.orderDirection', {
defaultMessage: 'Rank direction',
})}{' '}
<EuiIconTip
color="subdued"
content={i18n.translate('xpack.lens.indexPattern.terms.orderDirectionHelp', {
defaultMessage: `Specifies the ranking order of the top values.`,
})}
iconProps={{
className: 'eui-alignTop',
}}
position="top"
size="s"
type="questionInCircle"
/>
</>
}
display="columnCompressed"
fullWidth
>
Expand Down Expand Up @@ -378,7 +411,7 @@ export const termsOperation: OperationDefinition<TermsIndexPatternColumn, 'field
)
}
aria-label={i18n.translate('xpack.lens.indexPattern.terms.orderBy', {
defaultMessage: 'Order by',
defaultMessage: 'Rank by',
})}
/>
</EuiFormRow>
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -11332,9 +11332,7 @@
"xpack.lens.indexPattern.terms.missingLabel": "(欠落値)",
"xpack.lens.indexPattern.terms.orderAlphabetical": "アルファベット順",
"xpack.lens.indexPattern.terms.orderAscending": "昇順",
"xpack.lens.indexPattern.terms.orderBy": "並び順",
"xpack.lens.indexPattern.terms.orderDescending": "降順",
"xpack.lens.indexPattern.terms.orderDirection": "全体的な方向",
"xpack.lens.indexPattern.terms.otherBucketDescription": "他の値を「その他」としてグループ化",
"xpack.lens.indexPattern.terms.otherLabel": "その他",
"xpack.lens.indexPattern.terms.size": "値の数",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -11360,9 +11360,7 @@
"xpack.lens.indexPattern.terms.missingLabel": "(缺失值)",
"xpack.lens.indexPattern.terms.orderAlphabetical": "按字母顺序",
"xpack.lens.indexPattern.terms.orderAscending": "升序",
"xpack.lens.indexPattern.terms.orderBy": "排序依据",
"xpack.lens.indexPattern.terms.orderDescending": "降序",
"xpack.lens.indexPattern.terms.orderDirection": "排序方向",
"xpack.lens.indexPattern.terms.otherBucketDescription": "将其他值分组为“其他”",
"xpack.lens.indexPattern.terms.otherLabel": "其他",
"xpack.lens.indexPattern.terms.size": "值数目",
Expand Down

0 comments on commit 48a22ec

Please sign in to comment.