Skip to content

Commit

Permalink
[SLO] Rename Partition by to Group by (#173239)
Browse files Browse the repository at this point in the history
Resolves #172210
  • Loading branch information
benakansara authored Dec 13, 2023
1 parent fd25bb1 commit 43b48ad
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function BurnRateRuleEditor(props: Props) {
size="s"
title={i18n.translate('xpack.observability.slo.rules.groupByMessage', {
defaultMessage:
'The SLO you selected has been created with a partition on "{groupByField}". This rule will monitor and generate an alert for every instance found in the partition field.',
'The SLO you selected has been created with a group-by on "{groupByField}". This rule will monitor and generate an alert for every instance found in the group-by field.',
values: { groupByField: selectedSlo.groupBy },
})}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ export function SloDeleteConfirmationModal({
onConfirm={onConfirm}
>
{groupBy !== ALL_VALUE
? i18n.translate(
'xpack.observability.slo.deleteConfirmationModal.partitionByDisclaimerText',
{
defaultMessage:
'This SLO has been generated with a partition key on "{partitionKey}". Deleting this SLO definition will result in all instances being deleted.',
values: { partitionKey: groupBy },
}
)
? i18n.translate('xpack.observability.slo.deleteConfirmationModal.groupByDisclaimerText', {
defaultMessage:
'This SLO has been generated with a group key on "{groupKey}". Deleting this SLO definition will result in all instances being deleted.',
values: { groupKey: groupBy },
})
: i18n.translate('xpack.observability.slo.deleteConfirmationModal.descriptionText', {
defaultMessage: "You can't recover this SLO after deleting it.",
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export function SloGroupByBadge({ slo, color }: Props) {
<EuiBadge color={color ?? euiLightVars.euiColorDisabled}>
<EuiToolTip
position="top"
content={i18n.translate('xpack.observability.slo.partitionByBadge', {
defaultMessage: 'Partition by {partitionKey}',
content={i18n.translate('xpack.observability.slo.groupByBadge', {
defaultMessage: 'Group by {groupKey}',
values: {
partitionKey: slo.groupBy,
groupKey: slo.groupBy,
},
})}
display="block"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function ApmAvailabilityIndicatorTypeForm() {

const { isLoading: isIndexFieldsLoading, data: indexFields = [] } =
useFetchIndexPatternFields(apmIndex);
const partitionByFields = indexFields.filter((field) => field.aggregatable);
const groupByFields = indexFields.filter((field) => field.aggregatable);

return (
<EuiFlexGroup direction="column" gutterSize="l">
Expand Down Expand Up @@ -135,13 +135,13 @@ export function ApmAvailabilityIndicatorTypeForm() {
</EuiFlexGroup>

<IndexFieldSelector
indexFields={partitionByFields}
indexFields={groupByFields}
name="groupBy"
defaultValue={ALL_VALUE}
label={
<span>
{i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', {
defaultMessage: 'Partition by',
defaultMessage: 'Group by',
})}{' '}
<EuiIconTip
content={i18n.translate('xpack.observability.slo.sloEdit.groupBy.tooltip', {
Expand All @@ -152,7 +152,7 @@ export function ApmAvailabilityIndicatorTypeForm() {
</span>
}
placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', {
defaultMessage: 'Select an optional field to partition by',
defaultMessage: 'Select an optional field to group by',
})}
isLoading={!!apmIndex && isIndexFieldsLoading}
isDisabled={!apmIndex}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function ApmLatencyIndicatorTypeForm() {

const { isLoading: isIndexFieldsLoading, data: indexFields = [] } =
useFetchIndexPatternFields(apmIndex);
const partitionByFields = indexFields.filter((field) => field.aggregatable);
const groupByFields = indexFields.filter((field) => field.aggregatable);

return (
<EuiFlexGroup direction="column" gutterSize="l">
Expand Down Expand Up @@ -178,13 +178,13 @@ export function ApmLatencyIndicatorTypeForm() {
</EuiFlexGroup>

<IndexFieldSelector
indexFields={partitionByFields}
indexFields={groupByFields}
name="groupBy"
defaultValue={ALL_VALUE}
label={
<span>
{i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', {
defaultMessage: 'Partition by',
defaultMessage: 'Group by',
})}{' '}
<EuiIconTip
content={i18n.translate('xpack.observability.slo.sloEdit.groupBy.tooltip', {
Expand All @@ -195,7 +195,7 @@ export function ApmLatencyIndicatorTypeForm() {
</span>
}
placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', {
defaultMessage: 'Select an optional field to partition by',
defaultMessage: 'Select an optional field to group by',
})}
isLoading={!!apmIndex && isIndexFieldsLoading}
isDisabled={!apmIndex}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function CustomKqlIndicatorTypeForm() {
const { isLoading: isIndexFieldsLoading, data: indexFields = [] } =
useFetchIndexPatternFields(index);
const timestampFields = indexFields.filter((field) => field.type === 'date');
const partitionByFields = indexFields.filter((field) => field.aggregatable);
const groupByFields = indexFields.filter((field) => field.aggregatable);

return (
<EuiFlexGroup direction="column" gutterSize="l">
Expand Down Expand Up @@ -135,13 +135,13 @@ export function CustomKqlIndicatorTypeForm() {
</EuiFlexItem>

<IndexFieldSelector
indexFields={partitionByFields}
indexFields={groupByFields}
name="groupBy"
defaultValue={ALL_VALUE}
label={
<span>
{i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', {
defaultMessage: 'Partition by',
defaultMessage: 'Group by',
})}{' '}
<EuiIconTip
content={i18n.translate('xpack.observability.slo.sloEdit.groupBy.tooltip', {
Expand All @@ -152,7 +152,7 @@ export function CustomKqlIndicatorTypeForm() {
</span>
}
placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', {
defaultMessage: 'Select an optional field to partition by',
defaultMessage: 'Select an optional field to group by',
})}
isLoading={!!index && isIndexFieldsLoading}
isDisabled={!index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function CustomMetricIndicatorTypeForm() {
const { isLoading: isIndexFieldsLoading, data: indexFields = [] } =
useFetchIndexPatternFields(index);
const timestampFields = indexFields.filter((field) => field.type === 'date');
const partitionByFields = indexFields.filter((field) => field.aggregatable);
const groupByFields = indexFields.filter((field) => field.aggregatable);
const metricFields = indexFields.filter((field) =>
SUPPORTED_METRIC_FIELD_TYPES.includes(field.type)
);
Expand Down Expand Up @@ -152,13 +152,13 @@ export function CustomMetricIndicatorTypeForm() {
</EuiFlexItem>

<IndexFieldSelector
indexFields={partitionByFields}
indexFields={groupByFields}
name="groupBy"
defaultValue={ALL_VALUE}
label={
<span>
{i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', {
defaultMessage: 'Partition by',
defaultMessage: 'Group by',
})}{' '}
<EuiIconTip
content={i18n.translate('xpack.observability.slo.sloEdit.groupBy.tooltip', {
Expand All @@ -169,7 +169,7 @@ export function CustomMetricIndicatorTypeForm() {
</span>
}
placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', {
defaultMessage: 'Select an optional field to partition by',
defaultMessage: 'Select an optional field to group by',
})}
isLoading={!!index && isIndexFieldsLoading}
isDisabled={!index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function HistogramIndicatorTypeForm() {
useFetchIndexPatternFields(index);
const histogramFields = indexFields.filter((field) => field.type === 'histogram');
const timestampFields = indexFields.filter((field) => field.type === 'date');
const partitionByFields = indexFields.filter((field) => field.aggregatable);
const groupByFields = indexFields.filter((field) => field.aggregatable);

return (
<>
Expand Down Expand Up @@ -139,13 +139,13 @@ export function HistogramIndicatorTypeForm() {
</EuiFlexItem>

<IndexFieldSelector
indexFields={partitionByFields}
indexFields={groupByFields}
name="groupBy"
defaultValue={ALL_VALUE}
label={
<span>
{i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', {
defaultMessage: 'Partition by',
defaultMessage: 'Group by',
})}{' '}
<EuiIconTip
content={i18n.translate('xpack.observability.slo.sloEdit.groupBy.tooltip', {
Expand All @@ -156,7 +156,7 @@ export function HistogramIndicatorTypeForm() {
</span>
}
placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', {
defaultMessage: 'Select an optional field to partition by',
defaultMessage: 'Select an optional field to group by',
})}
isLoading={!!index && isIndexFieldsLoading}
isDisabled={!index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function TimesliceMetricIndicatorTypeForm() {
const { isLoading: isIndexFieldsLoading, data: indexFields = [] } =
useFetchIndexPatternFields(index);
const timestampFields = indexFields.filter((field) => field.type === 'date');
const partitionByFields = indexFields.filter((field) => field.aggregatable);
const groupByFields = indexFields.filter((field) => field.aggregatable);
const { uiSettings } = useKibana().services;
const threshold = watch('indicator.params.metric.threshold');
const comparator = watch('indicator.params.metric.comparator');
Expand Down Expand Up @@ -129,13 +129,13 @@ export function TimesliceMetricIndicatorTypeForm() {
</EuiFlexItem>

<IndexFieldSelector
indexFields={partitionByFields}
indexFields={groupByFields}
name="groupBy"
defaultValue={ALL_VALUE}
label={
<span>
{i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', {
defaultMessage: 'Partition by',
defaultMessage: 'Group by',
})}{' '}
<EuiIconTip
content={i18n.translate('xpack.observability.slo.sloEdit.groupBy.tooltip', {
Expand All @@ -146,7 +146,7 @@ export function TimesliceMetricIndicatorTypeForm() {
</span>
}
placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', {
defaultMessage: 'Select an optional field to partition by',
defaultMessage: 'Select an optional field to group by',
})}
isLoading={!!index && isIndexFieldsLoading}
isDisabled={!index}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ export function SloListCompactView({ sloList, loading, error }: Props) {
slo.groupBy !== ALL_VALUE ? (
<EuiToolTip
position="top"
content={i18n.translate('xpack.observability.slo.partitionByBadge', {
defaultMessage: 'Partition by {partitionKey}',
content={i18n.translate('xpack.observability.slo.groupByBadge', {
defaultMessage: 'Group by {groupKey}',
values: {
partitionKey: slo.groupBy,
groupKey: slo.groupBy,
},
})}
display="block"
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -28803,7 +28803,6 @@
"xpack.observability.slo.clone.successNotification": "{name} créé avec succès",
"xpack.observability.slo.create.errorNotification": "Un problème est survenu lors de la création de {name}",
"xpack.observability.slo.create.successNotification": "{name} créé avec succès",
"xpack.observability.slo.deleteConfirmationModal.partitionByDisclaimerText": "Ce SLO a été généré avec une clé de partition sur \"{partitionKey}\". La suppression de cette définition de SLO entraînera la suppression de toutes les instances.",
"xpack.observability.slo.deleteConfirmationModal.title": "Supprimer {name} ?",
"xpack.observability.slo.duration.day": "{duration, plural, one {1 jour} many {# jours} other {# jours}}",
"xpack.observability.slo.duration.hour": "{duration, plural, one {1 heure} many {# heures} other {# heures}}",
Expand All @@ -28812,7 +28811,6 @@
"xpack.observability.slo.duration.week": "{duration, plural, one {1 semaine} many {# semaines} other {# prochaines semaines}}",
"xpack.observability.slo.indicatorTypeBadge.exploreInApm": "Afficher les détails de {service}",
"xpack.observability.slo.list.sortByType": "Trier par {type}",
"xpack.observability.slo.partitionByBadge": "Partition par {partitionKey}",
"xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue": "Le seuil du taux d'avancement doit être compris entre 1 et {maxBurnRate}.",
"xpack.observability.slo.rules.groupByMessage": "Le SLO que vous avez sélectionné a été créé avec une partition sur \"{groupByField}\". Cette règle surveille et génère une alerte pour chaque instance trouvée dans le champ de partition.",
"xpack.observability.slo.rules.longWindowDuration.tooltip": "Période historique sur laquelle le taux d'avancement est calculé. Une période historique plus courte de {shortWindowDuration} minutes (1/12 de la période historique) sera utilisée pour une récupération plus rapide",
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 @@ -28803,7 +28803,6 @@
"xpack.observability.slo.clone.successNotification": "{name}の作成が正常に完了しました",
"xpack.observability.slo.create.errorNotification": "{name}の作成中に問題が発生しました",
"xpack.observability.slo.create.successNotification": "{name}の作成が正常に完了しました",
"xpack.observability.slo.deleteConfirmationModal.partitionByDisclaimerText": "このSLOは\"{partitionKey}\"のパーティションキーで生成されました。このSLO定義を削除すると、すべてのインスタンスが削除されます。",
"xpack.observability.slo.deleteConfirmationModal.title": "{name}を削除しますか?",
"xpack.observability.slo.duration.day": "{duration, plural, other {#日}}",
"xpack.observability.slo.duration.hour": "{duration, plural, other {#時間}}",
Expand All @@ -28812,7 +28811,6 @@
"xpack.observability.slo.duration.week": "{duration, plural, other {#週}}",
"xpack.observability.slo.indicatorTypeBadge.exploreInApm": "{service}詳細を表示",
"xpack.observability.slo.list.sortByType": "{type}で並べ替え",
"xpack.observability.slo.partitionByBadge": "{partitionKey}でパーティション",
"xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue": "バーンレートしきい値は1以上{maxBurnRate}以下でなければなりません。",
"xpack.observability.slo.rules.groupByMessage": "選択したSLOは\"{groupByField}\"にパーティションが作成されました。このルールは、パーティションフィールドで見つかったすべてのインスタンスを監視し、アラートを生成します。",
"xpack.observability.slo.rules.longWindowDuration.tooltip": "バーンレートが計算されるルックバック期間。ルックバック期間を{shortWindowDuration}分(ルックバック期間の1/12)と短くすることで、より高速な復帰が可能になります",
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 @@ -28800,7 +28800,6 @@
"xpack.observability.slo.clone.successNotification": "已成功创建 {name}",
"xpack.observability.slo.create.errorNotification": "创建 {name} 时出现问题",
"xpack.observability.slo.create.successNotification": "已成功创建 {name}",
"xpack.observability.slo.deleteConfirmationModal.partitionByDisclaimerText": "已使用分区密钥“{partitionKey}”生成此 SLO。删除此 SLO 定义将导致删除所有实例。",
"xpack.observability.slo.deleteConfirmationModal.title": "删除 {name}?",
"xpack.observability.slo.duration.day": "{duration, plural, other {# 天}}",
"xpack.observability.slo.duration.hour": "{duration, plural, other {# 小时}}",
Expand All @@ -28809,7 +28808,6 @@
"xpack.observability.slo.duration.week": "{duration, plural, other {# 周}}",
"xpack.observability.slo.indicatorTypeBadge.exploreInApm": "查看 {service} 详情",
"xpack.observability.slo.list.sortByType": "按 {type} 排序",
"xpack.observability.slo.partitionByBadge": "按 {partitionKey} 分区",
"xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue": "消耗速度阈值必须介于 1 和 {maxBurnRate} 之间。",
"xpack.observability.slo.rules.groupByMessage": "已使用分区在“{groupByField}”上创建您选定的 SLO。此规则将监测在分区字段中发现的每个实例并为其生成告警。",
"xpack.observability.slo.rules.longWindowDuration.tooltip": "在其间计算消耗速度的回顾期。将使用 {shortWindowDuration} 分钟的较短回顾期(1/12 的回顾期)以便更快恢复",
Expand Down

0 comments on commit 43b48ad

Please sign in to comment.