From 43b48adbc427416e0d9bd0bc656d0265c7719869 Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:14:48 +0530 Subject: [PATCH] [SLO] Rename Partition by to Group by (#173239) Resolves https://github.com/elastic/kibana/issues/172210 --- .../burn_rate_rule_editor/burn_rate_rule_editor.tsx | 2 +- .../slo_delete_confirmation_modal.tsx | 13 +++++-------- .../slo/slo_status_badge/slo_group_by_badge.tsx | 6 +++--- .../apm_availability_indicator_type_form.tsx | 8 ++++---- .../apm_latency/apm_latency_indicator_type_form.tsx | 8 ++++---- .../custom_kql/custom_kql_indicator_type_form.tsx | 8 ++++---- .../custom_metric/custom_metric_type_form.tsx | 8 ++++---- .../histogram/histogram_indicator_type_form.tsx | 8 ++++---- .../timeslice_metric/timeslice_metric_indicator.tsx | 8 ++++---- .../compact_view/slo_list_compact_view.tsx | 6 +++--- x-pack/plugins/translations/translations/fr-FR.json | 2 -- x-pack/plugins/translations/translations/ja-JP.json | 2 -- x-pack/plugins/translations/translations/zh-CN.json | 2 -- 13 files changed, 36 insertions(+), 45 deletions(-) diff --git a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate_rule_editor.tsx b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate_rule_editor.tsx index 8eb9ca972d28c..44a0a55e4e083 100644 --- a/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate_rule_editor.tsx +++ b/x-pack/plugins/observability/public/components/burn_rate_rule_editor/burn_rate_rule_editor.tsx @@ -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 }, })} /> diff --git a/x-pack/plugins/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx b/x-pack/plugins/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx index eee88b8daf9cb..aa5cd00972b49 100644 --- a/x-pack/plugins/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx +++ b/x-pack/plugins/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx @@ -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.", })} diff --git a/x-pack/plugins/observability/public/components/slo/slo_status_badge/slo_group_by_badge.tsx b/x-pack/plugins/observability/public/components/slo/slo_status_badge/slo_group_by_badge.tsx index f79b700ed9be5..dd0aa83bc14cb 100644 --- a/x-pack/plugins/observability/public/components/slo/slo_status_badge/slo_group_by_badge.tsx +++ b/x-pack/plugins/observability/public/components/slo/slo_status_badge/slo_group_by_badge.tsx @@ -26,10 +26,10 @@ export function SloGroupByBadge({ slo, color }: Props) { field.aggregatable); + const groupByFields = indexFields.filter((field) => field.aggregatable); return ( @@ -135,13 +135,13 @@ export function ApmAvailabilityIndicatorTypeForm() { {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { - defaultMessage: 'Partition by', + defaultMessage: 'Group by', })}{' '} } 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} diff --git a/x-pack/plugins/observability/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx b/x-pack/plugins/observability/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx index 32b5729762abd..b75c9fd8d110c 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx @@ -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 ( @@ -178,13 +178,13 @@ export function ApmLatencyIndicatorTypeForm() { {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { - defaultMessage: 'Partition by', + defaultMessage: 'Group by', })}{' '} } 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} diff --git a/x-pack/plugins/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx b/x-pack/plugins/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx index 05b58ab2aa198..33b8a2eb6def3 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx @@ -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 ( @@ -135,13 +135,13 @@ export function CustomKqlIndicatorTypeForm() { {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { - defaultMessage: 'Partition by', + defaultMessage: 'Group by', })}{' '} } 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} diff --git a/x-pack/plugins/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx b/x-pack/plugins/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx index d69619d1121ef..c7a180d59cfbe 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx @@ -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) ); @@ -152,13 +152,13 @@ export function CustomMetricIndicatorTypeForm() { {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { - defaultMessage: 'Partition by', + defaultMessage: 'Group by', })}{' '} } 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} diff --git a/x-pack/plugins/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx b/x-pack/plugins/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx index 50a84c121d73c..9f8831fa9dfab 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx @@ -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 ( <> @@ -139,13 +139,13 @@ export function HistogramIndicatorTypeForm() { {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { - defaultMessage: 'Partition by', + defaultMessage: 'Group by', })}{' '} } 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} diff --git a/x-pack/plugins/observability/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx b/x-pack/plugins/observability/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx index b2d788bf28654..2fde2468d78ec 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx @@ -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'); @@ -129,13 +129,13 @@ export function TimesliceMetricIndicatorTypeForm() { {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { - defaultMessage: 'Partition by', + defaultMessage: 'Group by', })}{' '} } 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} diff --git a/x-pack/plugins/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx b/x-pack/plugins/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx index 6052007abc328..d7e1c78d117e6 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx @@ -272,10 +272,10 @@ export function SloListCompactView({ sloList, loading, error }: Props) { slo.groupBy !== ALL_VALUE ? (