diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index 57b65c43e..da1871ffe 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -95,6 +95,7 @@ export class Flights { public static readonly MongoIndexing = "mongoindexing"; public static readonly AutoscaleTest = "autoscaletest"; public static readonly SchemaAnalyzer = "schemaanalyzer"; + public static readonly PartitionKeyTest = "partitionkeytest"; } export class AfecFeatures { diff --git a/src/Explorer/Panes/AddCollectionPanel.tsx b/src/Explorer/Panes/AddCollectionPanel.tsx index a946c1091..f0ce4f4d1 100644 --- a/src/Explorer/Panes/AddCollectionPanel.tsx +++ b/src/Explorer/Panes/AddCollectionPanel.tsx @@ -113,7 +113,11 @@ export class AddCollectionPanel extends React.Component + + {this.getPartitionKeySubtext()} + + diff --git a/src/Platform/Hosted/extractFeatures.ts b/src/Platform/Hosted/extractFeatures.ts index 95e3695df..da2c6d917 100644 --- a/src/Platform/Hosted/extractFeatures.ts +++ b/src/Platform/Hosted/extractFeatures.ts @@ -10,6 +10,7 @@ export type Features = { readonly enableSchema: boolean; enableSchemaAnalyzer: boolean; autoscaleDefault: boolean; + partitionKeyDefault: boolean; readonly enableSDKoperations: boolean; readonly enableSpark: boolean; readonly enableTtl: boolean; @@ -70,5 +71,6 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear showMinRUSurvey: "true" === get("showminrusurvey"), ttl90Days: "true" === get("ttl90days"), autoscaleDefault: "true" === get("autoscaledefault"), + partitionKeyDefault: "true" === get("partitionkeytest"), }; } diff --git a/src/hooks/useKnockoutExplorer.ts b/src/hooks/useKnockoutExplorer.ts index e0729bc80..87deee4e2 100644 --- a/src/hooks/useKnockoutExplorer.ts +++ b/src/hooks/useKnockoutExplorer.ts @@ -331,6 +331,9 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) { if (inputs.flights.indexOf(Flights.SchemaAnalyzer) !== -1) { userContext.features.enableSchemaAnalyzer = true; } + if (inputs.flights.indexOf(Flights.PartitionKeyTest) !== -1) { + userContext.features.partitionKeyDefault = true; + } } }