diff --git a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts index 5bdc40d6acd75..e60da12d924cc 100644 --- a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts +++ b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts @@ -131,7 +131,7 @@ describe('toPackagePolicy', () => { data_stream: 'logs-nginx.access', features: { synthetic_source: true, - TSDB: false, + tsdb: false, }, }, ], @@ -143,7 +143,7 @@ describe('toPackagePolicy', () => { data_stream: 'logs-nginx.access', features: { synthetic_source: true, - TSDB: false, + tsdb: false, }, }, ]); diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 821526a6b8ce6..ca7cc3200da4b 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -445,7 +445,7 @@ export type PackageInfo = | Installable>; // TODO - Expand this with other experimental indexing types -export type ExperimentalIndexingFeature = 'synthetic_source' | 'TSDB'; +export type ExperimentalIndexingFeature = 'synthetic_source' | 'tsdb'; export interface ExperimentalDataStreamFeature { data_stream: string; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.tsx index 8f15277d02e44..7bcda09d08d8f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.tsx @@ -143,14 +143,14 @@ export const PackagePolicyInputPanel: React.FunctionComponent<{ (feat) => feat.data_stream === dsName ); if (match) { - if (!match.features.TSDB) { - match.features.TSDB = true; + if (!match.features.tsdb) { + match.features.tsdb = true; isUpdated = true; } } else { packagePolicy.package!.experimental_data_stream_features.push({ data_stream: dsName, - features: { TSDB: true, synthetic_source: false }, + features: { tsdb: true, synthetic_source: false }, }); isUpdated = true; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx index 4039d3b5c172c..2e5f98c8359e7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx @@ -137,7 +137,7 @@ export const PackagePolicyInputStreamConfig = memo( const newExperimentalIndexingFeature = { synthetic_source: isFeatureEnabled('synthetic_source'), - TSDB: isFeatureEnabled('TSDB'), + tsdb: isFeatureEnabled('tsdb'), }; const onIndexingSettingChange = ( @@ -392,8 +392,8 @@ export const PackagePolicyInputStreamConfig = memo( } > ( } onChange={(e) => { onIndexingSettingChange({ - TSDB: e.target.checked, + tsdb: e.target.checked, }); }} /> diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index 685c6b34b8ddf..f2ee5b034bf95 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -284,7 +284,7 @@ const getSavedObjectTypes = ( type: 'nested', properties: { synthetic_source: { type: 'boolean' }, - TSDB: { type: 'boolean' }, + tsdb: { type: 'boolean' }, }, }, }, diff --git a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts index a7ffce1be10c7..3eaa10af56c0c 100644 --- a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts +++ b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts @@ -35,7 +35,7 @@ function getNewTestPackagePolicy({ data_stream: 'metrics-test.test', features: { synthetic_source: isSyntheticSourceEnabled, - TSDB: isTSDBEnabled, + tsdb: isTSDBEnabled, }, }, ], @@ -69,7 +69,7 @@ function getExistingTestPackagePolicy({ data_stream: 'metrics-test.test', features: { synthetic_source: isSyntheticSourceEnabled, - TSDB: isTSDBEnabled, + tsdb: isTSDBEnabled, }, }, ], @@ -106,7 +106,7 @@ describe('experimental_datastream_features', () => { experimental_data_stream_features: [ { data_stream: 'metrics-test.test', - features: { synthetic_source: false, TSDB: false }, + features: { synthetic_source: false, tsdb: false }, }, ], }, @@ -162,7 +162,7 @@ describe('experimental_datastream_features', () => { experimental_data_stream_features: [ { data_stream: 'metrics-test.test', - features: { synthetic_source: true, TSDB: false }, + features: { synthetic_source: true, tsdb: false }, }, ], }, @@ -190,7 +190,7 @@ describe('experimental_datastream_features', () => { experimental_data_stream_features: [ { data_stream: 'metrics-test.test', - features: { synthetic_source: false, TSDB: false }, + features: { synthetic_source: false, tsdb: false }, }, ], }, diff --git a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts index abd84179b40fd..8914da429e463 100644 --- a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts +++ b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts @@ -44,7 +44,7 @@ export async function handleExperimentalDatastreamFeatureOptIn({ const isOptInChanged = existingOptIn?.features.synthetic_source !== featureMapEntry.features.synthetic_source || - existingOptIn?.features.TSDB !== featureMapEntry.features.TSDB; + existingOptIn?.features.tsdb !== featureMapEntry.features.tsdb; // If the feature opt-in status in unchanged, we don't need to update any component templates if (!isOptInChanged) { @@ -76,7 +76,7 @@ export async function handleExperimentalDatastreamFeatureOptIn({ body, }); - if (featureMapEntry.features.TSDB) { + if (featureMapEntry.features.tsdb) { const indexTemplateRes = await esClient.indices.getIndexTemplate({ name: featureMapEntry.data_stream, }); diff --git a/x-pack/plugins/fleet/server/types/models/package_policy.ts b/x-pack/plugins/fleet/server/types/models/package_policy.ts index 0ebb03a0ebd05..64837501b941b 100644 --- a/x-pack/plugins/fleet/server/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/package_policy.ts @@ -84,7 +84,7 @@ const ExperimentalDataStreamFeatures = schema.arrayOf( data_stream: schema.string(), features: schema.object({ synthetic_source: schema.boolean(), - TSDB: schema.boolean(), + tsdb: schema.boolean(), }), }) ); @@ -129,7 +129,7 @@ const CreatePackagePolicyProps = { schema.arrayOf( schema.object({ data_stream: schema.string(), - features: schema.object({ synthetic_source: schema.boolean(), TSDB: schema.boolean() }), + features: schema.object({ synthetic_source: schema.boolean(), tsdb: schema.boolean() }), }) ) ),