diff --git a/x-pack/plugins/observability/server/assets/constants.ts b/x-pack/plugins/observability/common/slo/constants.ts similarity index 100% rename from x-pack/plugins/observability/server/assets/constants.ts rename to x-pack/plugins/observability/common/slo/constants.ts diff --git a/x-pack/plugins/observability/public/components/slo/error_rate_chart/use_lens_definition.ts b/x-pack/plugins/observability/public/components/slo/error_rate_chart/use_lens_definition.ts index ce01ac20ee69d..8c7fe7f33ebd2 100644 --- a/x-pack/plugins/observability/public/components/slo/error_rate_chart/use_lens_definition.ts +++ b/x-pack/plugins/observability/public/components/slo/error_rate_chart/use_lens_definition.ts @@ -8,6 +8,7 @@ import { useEuiTheme } from '@elastic/eui'; import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; import { ALL_VALUE, SLOResponse, timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../common/slo/constants'; export function useLensDefinition(slo: SLOResponse): TypedLensByValueInput['attributes'] { const { euiTheme } = useEuiTheme(); @@ -555,7 +556,7 @@ export function useLensDefinition(slo: SLOResponse): TypedLensByValueInput['attr adHocDataViews: { '32ca1ad4-81c0-4daf-b9d1-07118044bdc5': { id: '32ca1ad4-81c0-4daf-b9d1-07118044bdc5', - title: '.slo-observability.sli-v2.*', + title: SLO_DESTINATION_INDEX_PATTERN, timeFieldName: '@timestamp', sourceFilters: [], fieldFormats: {}, diff --git a/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts b/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts index 71896e2593f0a..b4aef3c39a80d 100644 --- a/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts +++ b/x-pack/plugins/observability/server/assets/component_templates/slo_mappings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOMappingsTemplate = (name: string) => ({ name, diff --git a/x-pack/plugins/observability/server/assets/component_templates/slo_settings_template.ts b/x-pack/plugins/observability/server/assets/component_templates/slo_settings_template.ts index 9b0a6931e7c15..37abff5bdc46d 100644 --- a/x-pack/plugins/observability/server/assets/component_templates/slo_settings_template.ts +++ b/x-pack/plugins/observability/server/assets/component_templates/slo_settings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOSettingsTemplate = (name: string) => ({ name, diff --git a/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts b/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts index fa8e803631181..9641b64f5f1d0 100644 --- a/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts +++ b/x-pack/plugins/observability/server/assets/component_templates/slo_summary_mappings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOSummaryMappingsTemplate = (name: string) => ({ name, diff --git a/x-pack/plugins/observability/server/assets/component_templates/slo_summary_settings_template.ts b/x-pack/plugins/observability/server/assets/component_templates/slo_summary_settings_template.ts index 336b7d9e0c35c..9995e2239d07f 100644 --- a/x-pack/plugins/observability/server/assets/component_templates/slo_summary_settings_template.ts +++ b/x-pack/plugins/observability/server/assets/component_templates/slo_summary_settings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOSummarySettingsTemplate = (name: string) => ({ name, diff --git a/x-pack/plugins/observability/server/assets/index_templates/slo_index_templates.ts b/x-pack/plugins/observability/server/assets/index_templates/slo_index_templates.ts index fc9ed97f95cf8..ae6f179476b22 100644 --- a/x-pack/plugins/observability/server/assets/index_templates/slo_index_templates.ts +++ b/x-pack/plugins/observability/server/assets/index_templates/slo_index_templates.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOIndexTemplate = (name: string, indexPattern: string, composedOf: string[]) => ({ name, diff --git a/x-pack/plugins/observability/server/assets/index_templates/slo_summary_index_templates.ts b/x-pack/plugins/observability/server/assets/index_templates/slo_summary_index_templates.ts index a32c0d8416921..2e613c4273bab 100644 --- a/x-pack/plugins/observability/server/assets/index_templates/slo_summary_index_templates.ts +++ b/x-pack/plugins/observability/server/assets/index_templates/slo_summary_index_templates.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOSummaryIndexTemplate = ( name: string, diff --git a/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts b/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts index eafa7399a7c35..30724989925d7 100644 --- a/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts +++ b/x-pack/plugins/observability/server/assets/ingest_templates/slo_pipeline_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOPipelineTemplate = (id: string, indexNamePrefix: string) => ({ id, diff --git a/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts b/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts index d3c8e04b93730..8246504ac216c 100644 --- a/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts +++ b/x-pack/plugins/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export const getSLOSummaryPipelineTemplate = (id: string) => ({ id, diff --git a/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts b/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts index aac6a7c2ddb8c..118c22425aa76 100644 --- a/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts +++ b/x-pack/plugins/observability/server/assets/transform_templates/slo_transform_template.ts @@ -12,7 +12,7 @@ import { TransformSource, TransformTimeSync, } from '@elastic/elasticsearch/lib/api/types'; -import { SLO_RESOURCES_VERSION } from '../constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; export interface TransformSettings { frequency: TransformPutTransformRequest['frequency']; diff --git a/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts b/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts index 8461382fc1564..45ebba7bb2693 100644 --- a/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts +++ b/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts @@ -9,7 +9,7 @@ import { ElasticsearchClient } from '@kbn/core/server'; import { get } from 'lodash'; import { Duration, SLO, toDurationUnit } from '../../../../domain/models'; import { BurnRateRuleParams } from '../types'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../assets/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../../common/slo/constants'; import { buildQuery, EvaluationAfterKey, diff --git a/x-pack/plugins/observability/server/services/slo/create_slo.ts b/x-pack/plugins/observability/server/services/slo/create_slo.ts index 51c3fbec71dc8..cebe8188a7cbd 100644 --- a/x-pack/plugins/observability/server/services/slo/create_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/create_slo.ts @@ -8,7 +8,7 @@ import { ElasticsearchClient } from '@kbn/core/server'; import { ALL_VALUE, CreateSLOParams, CreateSLOResponse } from '@kbn/slo-schema'; import { v4 as uuidv4 } from 'uuid'; -import { SLO_SUMMARY_TEMP_INDEX_NAME } from '../../assets/constants'; +import { SLO_SUMMARY_TEMP_INDEX_NAME } from '../../../common/slo/constants'; import { Duration, DurationUnit, SLO } from '../../domain/models'; import { validateSLO } from '../../domain/services'; import { SLORepository } from './slo_repository'; diff --git a/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts b/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts index a136945edcd2c..8a19890e2ebc2 100644 --- a/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/delete_slo.test.ts @@ -13,7 +13,7 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { DeleteSLO } from './delete_slo'; import { createAPMTransactionErrorRateIndicator, createSLO } from './fixtures/slo'; import { createSLORepositoryMock, createTransformManagerMock } from './mocks'; diff --git a/x-pack/plugins/observability/server/services/slo/delete_slo.ts b/x-pack/plugins/observability/server/services/slo/delete_slo.ts index de908ceac7842..78c3bffd05417 100644 --- a/x-pack/plugins/observability/server/services/slo/delete_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/delete_slo.ts @@ -11,7 +11,7 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability/server/services/slo/delete_slo_instances.ts b/x-pack/plugins/observability/server/services/slo/delete_slo_instances.ts index adbea2809bb28..97c622f354564 100644 --- a/x-pack/plugins/observability/server/services/slo/delete_slo_instances.ts +++ b/x-pack/plugins/observability/server/services/slo/delete_slo_instances.ts @@ -10,7 +10,7 @@ import { ALL_VALUE, DeleteSLOInstancesParams } from '@kbn/slo-schema'; import { SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { IllegalArgumentError } from '../../errors'; interface SloInstanceTuple { diff --git a/x-pack/plugins/observability/server/services/slo/get_slo_instances.ts b/x-pack/plugins/observability/server/services/slo/get_slo_instances.ts index 17dc9b7614733..405f355777c23 100644 --- a/x-pack/plugins/observability/server/services/slo/get_slo_instances.ts +++ b/x-pack/plugins/observability/server/services/slo/get_slo_instances.ts @@ -7,7 +7,7 @@ import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { ALL_VALUE, GetSLOInstancesResponse } from '@kbn/slo-schema'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../assets/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { SLORepository } from './slo_repository'; export class GetSLOInstances { diff --git a/x-pack/plugins/observability/server/services/slo/historical_summary_client.ts b/x-pack/plugins/observability/server/services/slo/historical_summary_client.ts index 41ff658c89de5..e1f979da5fa83 100644 --- a/x-pack/plugins/observability/server/services/slo/historical_summary_client.ts +++ b/x-pack/plugins/observability/server/services/slo/historical_summary_client.ts @@ -20,7 +20,7 @@ import { import { assertNever } from '@kbn/std'; import * as t from 'io-ts'; import moment from 'moment'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../assets/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { DateRange, HistoricalSummary, SLO, SLOId } from '../../domain/models'; import { computeSLI, diff --git a/x-pack/plugins/observability/server/services/slo/manage_slo.ts b/x-pack/plugins/observability/server/services/slo/manage_slo.ts index 4db8e8b893aba..b7220f084a64d 100644 --- a/x-pack/plugins/observability/server/services/slo/manage_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/manage_slo.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getSLOTransformId } from '../../assets/constants'; +import { getSLOTransformId } from '../../../common/slo/constants'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts b/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts index 8337c85b5f156..6634b3bc052af 100644 --- a/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts +++ b/x-pack/plugins/observability/server/services/slo/resource_installer.test.ts @@ -16,7 +16,7 @@ import { SLO_SUMMARY_COMPONENT_TEMPLATE_SETTINGS_NAME, SLO_SUMMARY_INDEX_TEMPLATE_NAME, SLO_SUMMARY_INGEST_PIPELINE_NAME, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { DefaultResourceInstaller } from './resource_installer'; describe('resourceInstaller', () => { diff --git a/x-pack/plugins/observability/server/services/slo/resource_installer.ts b/x-pack/plugins/observability/server/services/slo/resource_installer.ts index 4fc77ea2399c7..2975e07333599 100644 --- a/x-pack/plugins/observability/server/services/slo/resource_installer.ts +++ b/x-pack/plugins/observability/server/services/slo/resource_installer.ts @@ -30,7 +30,7 @@ import { SLO_SUMMARY_INDEX_TEMPLATE_PATTERN, SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { getSLOIndexTemplate } from '../../assets/index_templates/slo_index_templates'; import { getSLOSummaryIndexTemplate } from '../../assets/index_templates/slo_summary_index_templates'; import { getSLOPipelineTemplate } from '../../assets/ingest_templates/slo_pipeline_template'; diff --git a/x-pack/plugins/observability/server/services/slo/sli_client.ts b/x-pack/plugins/observability/server/services/slo/sli_client.ts index 5614345d3aefd..1eab9181e8b0f 100644 --- a/x-pack/plugins/observability/server/services/slo/sli_client.ts +++ b/x-pack/plugins/observability/server/services/slo/sli_client.ts @@ -20,7 +20,7 @@ import { timeslicesBudgetingMethodSchema, } from '@kbn/slo-schema'; import { assertNever } from '@kbn/std'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../assets/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { DateRange, Duration, IndicatorData, SLO } from '../../domain/models'; import { InternalQueryError } from '../../errors'; import { getDelayInSecondsFromSLO } from '../../domain/services/get_delay_in_seconds_from_slo'; diff --git a/x-pack/plugins/observability/server/services/slo/summary_client.test.ts b/x-pack/plugins/observability/server/services/slo/summary_client.test.ts index 3e5f4402097d1..f6850e73575ee 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_client.test.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_client.test.ts @@ -7,7 +7,7 @@ import { ElasticsearchClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; import moment from 'moment'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../assets/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { Duration, DurationUnit } from '../../domain/models'; import { createSLO } from './fixtures/slo'; import { sevenDaysRolling, weeklyCalendarAligned } from './fixtures/time_window'; diff --git a/x-pack/plugins/observability/server/services/slo/summary_client.ts b/x-pack/plugins/observability/server/services/slo/summary_client.ts index 3f799b2ca3473..d5ec52b226e9d 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_client.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_client.ts @@ -15,7 +15,7 @@ import { toMomentUnitOfTime, } from '@kbn/slo-schema'; import moment from 'moment'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../assets/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { DateRange, SLO, Summary } from '../../domain/models'; import { computeSLI, computeSummaryStatus, toErrorBudget } from '../../domain/services'; import { toDateRange } from '../../domain/services/date_range'; diff --git a/x-pack/plugins/observability/server/services/slo/summary_search_client.ts b/x-pack/plugins/observability/server/services/slo/summary_search_client.ts index f2bfa1ed29df3..2361e8dd3678e 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_search_client.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_search_client.ts @@ -9,7 +9,7 @@ import { ElasticsearchClient, Logger } from '@kbn/core/server'; import { ALL_VALUE } from '@kbn/slo-schema'; import { assertNever } from '@kbn/std'; import _ from 'lodash'; -import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../assets/constants'; +import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; import { SLOId, Status, Summary } from '../../domain/models'; import { toHighPrecision } from '../../utils/number'; import { getElastichsearchQueryOrThrow } from './transform_generators'; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts index d1be4c0711e5d..0a51338615b42 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/summary_transform_installer.ts @@ -10,7 +10,7 @@ import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import { SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { retryTransientEsErrors } from '../../../utils/retry'; import { ALL_TRANSFORM_TEMPLATES } from './templates'; diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts index 4fea113a54233..9fb34a38051f7 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_30d_rolling.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_OCCURRENCES_30D_ROLLING: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts index 629f7b234843c..9ceb6cd4290a0 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_7d_rolling.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_OCCURRENCES_7D_ROLLING: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts index dfd77783ef3d2..d0f1729f77225 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_90d_rolling.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_OCCURRENCES_90D_ROLLING: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts index 9d07bcf9cd5af..a5b2a70932a5e 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_monthly_aligned.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_OCCURRENCES_MONTHLY_ALIGNED: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts index 0fc3ec19d3cf2..43ed92704c119 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_occurrences_weekly_aligned.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_OCCURRENCES_WEEKLY_ALIGNED: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts index 5f48a86d0bca8..5d1c6c48f8f1f 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_30d_rolling.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_TIMESLICES_30D_ROLLING: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts index 7a491337fba65..a9256955ac08a 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_7d_rolling.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_TIMESLICES_7D_ROLLING: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts index c26c9f84e554f..f922bd210e253 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_90d_rolling.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_TIMESLICES_90D_ROLLING: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts index 18fd40a729403..3b39d9acd3372 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_monthly_aligned.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_TIMESLICES_MONTHLY_ALIGNED: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts index af062b7b6abe6..3cae5f9bcd9b1 100644 --- a/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts +++ b/x-pack/plugins/observability/server/services/slo/summary_transform/templates/summary_timeslices_weekly_aligned.ts @@ -12,7 +12,7 @@ import { SLO_SUMMARY_INGEST_PIPELINE_NAME, SLO_SUMMARY_TRANSFORMS_VERSION, SLO_SUMMARY_TRANSFORM_NAME_PREFIX, -} from '../../../../assets/constants'; +} from '../../../../../common/slo/constants'; import { groupBy } from './common'; export const SUMMARY_TIMESLICES_WEEKLY_ALIGNED: TransformPutTransformRequest = { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.ts index 171a5ca15e2de..98a182f07fafb 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_duration.ts @@ -16,7 +16,7 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; import { APMTransactionDurationIndicator, SLO } from '../../../domain/models'; import { InvalidTransformError } from '../../../errors'; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts index d038876f5ee9d..4e96e124dcd40 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts @@ -16,7 +16,7 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; import { APMTransactionErrorRateIndicator, SLO } from '../../../domain/models'; import { InvalidTransformError } from '../../../errors'; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.ts index 844703003257a..695e408a39dee 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/histogram.ts @@ -19,7 +19,7 @@ import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { SLO } from '../../../domain/models'; import { GetHistogramIndicatorAggregation } from '../aggregations'; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.ts index 02c7757ec1362..6fcb4f56522c1 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/kql_custom.ts @@ -15,7 +15,7 @@ import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { KQLCustomIndicator, SLO } from '../../../domain/models'; export class KQLCustomTransformGenerator extends TransformGenerator { diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.ts index 063e6fbe1e3dc..452e90c343e2d 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/metric_custom.ts @@ -15,7 +15,7 @@ import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { MetricCustomIndicator, SLO } from '../../../domain/models'; import { GetCustomMetricIndicatorAggregation } from '../aggregations'; diff --git a/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.ts b/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.ts index 944b7d0622aad..3bdfee4f761cc 100644 --- a/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.ts +++ b/x-pack/plugins/observability/server/services/slo/transform_generators/timeslice_metric.ts @@ -20,7 +20,7 @@ import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../assets/constants'; +} from '../../../../common/slo/constants'; import { SLO } from '../../../domain/models'; import { GetTimesliceMetricIndicatorAggregation } from '../aggregations'; diff --git a/x-pack/plugins/observability/server/services/slo/update_slo.test.ts b/x-pack/plugins/observability/server/services/slo/update_slo.test.ts index 797f6eb2218ee..1fb6550e12c47 100644 --- a/x-pack/plugins/observability/server/services/slo/update_slo.test.ts +++ b/x-pack/plugins/observability/server/services/slo/update_slo.test.ts @@ -14,7 +14,7 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { SLO } from '../../domain/models'; import { fiveMinute, oneMinute } from './fixtures/duration'; import { diff --git a/x-pack/plugins/observability/server/services/slo/update_slo.ts b/x-pack/plugins/observability/server/services/slo/update_slo.ts index 97f6ed2e7bba3..0d039c93c1ab0 100644 --- a/x-pack/plugins/observability/server/services/slo/update_slo.ts +++ b/x-pack/plugins/observability/server/services/slo/update_slo.ts @@ -13,7 +13,7 @@ import { SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '../../assets/constants'; +} from '../../../common/slo/constants'; import { SLO } from '../../domain/models'; import { validateSLO } from '../../domain/services'; import { SLORepository } from './slo_repository';