Skip to content

Commit

Permalink
renamed to lowercase tsdb
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Nov 14, 2022
1 parent 9c3fe32 commit 99da806
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('toPackagePolicy', () => {
data_stream: 'logs-nginx.access',
features: {
synthetic_source: true,
TSDB: false,
tsdb: false,
},
},
],
Expand All @@ -143,7 +143,7 @@ describe('toPackagePolicy', () => {
data_stream: 'logs-nginx.access',
features: {
synthetic_source: true,
TSDB: false,
tsdb: false,
},
},
]);
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/types/models/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export type PackageInfo =
| Installable<Merge<ArchivePackage, EpmPackageAdditions>>;

// 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>(

const newExperimentalIndexingFeature = {
synthetic_source: isFeatureEnabled('synthetic_source'),
TSDB: isFeatureEnabled('TSDB'),
tsdb: isFeatureEnabled('tsdb'),
};

const onIndexingSettingChange = (
Expand Down Expand Up @@ -392,8 +392,8 @@ export const PackagePolicyInputStreamConfig = memo<Props>(
}
>
<EuiSwitch
disabled={isFeatureEnabled('TSDB')}
checked={isFeatureEnabled('TSDB')}
disabled={isFeatureEnabled('tsdb')}
checked={isFeatureEnabled('tsdb')}
label={
<FormattedMessage
id="xpack.fleet.createPackagePolicy.experimentalFeatures.TSDBLabel"
Expand All @@ -402,7 +402,7 @@ export const PackagePolicyInputStreamConfig = memo<Props>(
}
onChange={(e) => {
onIndexingSettingChange({
TSDB: e.target.checked,
tsdb: e.target.checked,
});
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ const getSavedObjectTypes = (
type: 'nested',
properties: {
synthetic_source: { type: 'boolean' },
TSDB: { type: 'boolean' },
tsdb: { type: 'boolean' },
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getNewTestPackagePolicy({
data_stream: 'metrics-test.test',
features: {
synthetic_source: isSyntheticSourceEnabled,
TSDB: isTSDBEnabled,
tsdb: isTSDBEnabled,
},
},
],
Expand Down Expand Up @@ -69,7 +69,7 @@ function getExistingTestPackagePolicy({
data_stream: 'metrics-test.test',
features: {
synthetic_source: isSyntheticSourceEnabled,
TSDB: isTSDBEnabled,
tsdb: isTSDBEnabled,
},
},
],
Expand Down Expand Up @@ -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 },
},
],
},
Expand Down Expand Up @@ -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 },
},
],
},
Expand Down Expand Up @@ -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 },
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
});
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/server/types/models/package_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}),
})
);
Expand Down Expand Up @@ -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() }),
})
)
),
Expand Down

0 comments on commit 99da806

Please sign in to comment.