From c5652e638ac3b5892d0c4ed9ee20484d42885aac Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Fri, 29 Sep 2023 11:38:51 -0400 Subject: [PATCH] [8.10] feat(slo): add partition by field in APM indicators (#165106) (#167652) # Backport This will backport the following commits from `main` to `8.10`: - [feat(slo): add partition by field in APM indicators (#165106)](https://github.com/elastic/kibana/pull/165106) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --- .../apm_availability/apm_availability_indicator_type_form.tsx | 4 ++++ .../apm_latency/apm_latency_indicator_type_form.tsx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/x-pack/plugins/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx b/x-pack/plugins/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx index 5c6f06051eb3d..377f5e0dc0710 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx @@ -12,10 +12,12 @@ import { useFormContext } from 'react-hook-form'; import { CreateSLOForm } from '../../types'; import { FieldSelector } from '../apm_common/field_selector'; import { DataPreviewChart } from '../common/data_preview_chart'; +import { GroupByFieldSelector } from '../common/group_by_field_selector'; import { QueryBuilder } from '../common/query_builder'; export function ApmAvailabilityIndicatorTypeForm() { const { watch } = useFormContext(); + const index = watch('indicator.params.index'); return ( @@ -119,6 +121,8 @@ export function ApmAvailabilityIndicatorTypeForm() { + + ); 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 e91080e2910dd..316f17f5072e6 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 @@ -12,10 +12,12 @@ import { Controller, useFormContext } from 'react-hook-form'; import { CreateSLOForm } from '../../types'; import { FieldSelector } from '../apm_common/field_selector'; import { DataPreviewChart } from '../common/data_preview_chart'; +import { GroupByFieldSelector } from '../common/group_by_field_selector'; import { QueryBuilder } from '../common/query_builder'; export function ApmLatencyIndicatorTypeForm() { const { control, watch, getFieldState } = useFormContext(); + const index = watch('indicator.params.index'); return ( @@ -162,6 +164,8 @@ export function ApmLatencyIndicatorTypeForm() { + + );