From 6ebfcc4cada2a47297ef08beca15b48843f64565 Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Tue, 29 Apr 2025 09:11:40 -0400 Subject: [PATCH] change text for GSI and container in VectorEmbedding Policy --- src/Explorer/Controls/Settings/SettingsComponent.tsx | 1 + .../ContainerPolicyComponent.tsx | 1 + .../VectorSearch/VectorEmbeddingPoliciesComponent.tsx | 11 +++++++++-- .../AddGlobalSecondaryIndexPanel.tsx | 1 + .../Components/VectorSearchComponent.tsx | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Explorer/Controls/Settings/SettingsComponent.tsx b/src/Explorer/Controls/Settings/SettingsComponent.tsx index 684858c56..65000e7ee 100644 --- a/src/Explorer/Controls/Settings/SettingsComponent.tsx +++ b/src/Explorer/Controls/Settings/SettingsComponent.tsx @@ -1215,6 +1215,7 @@ export class SettingsComponent extends React.Component void; + isGlobalSecondaryIndex?: boolean; } export const ContainerPolicyComponent: React.FC = ({ diff --git a/src/Explorer/Controls/VectorSearch/VectorEmbeddingPoliciesComponent.tsx b/src/Explorer/Controls/VectorSearch/VectorEmbeddingPoliciesComponent.tsx index e527084bd..ba0c5b62b 100644 --- a/src/Explorer/Controls/VectorSearch/VectorEmbeddingPoliciesComponent.tsx +++ b/src/Explorer/Controls/VectorSearch/VectorEmbeddingPoliciesComponent.tsx @@ -30,6 +30,7 @@ export interface IVectorEmbeddingPoliciesComponentProps { discardChanges?: boolean; onChangesDiscarded?: () => void; disabled?: boolean; + isGlobalSecondaryIndex?: boolean; } export interface VectorEmbeddingPolicyData { @@ -87,6 +88,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent { const onVectorEmbeddingPathError = (path: string, index?: number): string => { let error = ""; @@ -284,6 +286,11 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent { + const containerName: string = isGlobalSecondaryIndex ? "global secondary index" : "container"; + return `This is dynamically set by the ${containerName} if left blank, or it can be set to a fixed number`; + }; + return ( {vectorEmbeddingPolicyData && @@ -394,7 +401,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent Quantization byte size - Dynamic by default, can optionally be set to a fixed number. + {getQuantizationByteSizeTooltipContent()} )} diff --git a/src/Explorer/Panes/AddGlobalSecondaryIndexPanel/Components/VectorSearchComponent.tsx b/src/Explorer/Panes/AddGlobalSecondaryIndexPanel/Components/VectorSearchComponent.tsx index 440d51ea4..8b5ad9a28 100644 --- a/src/Explorer/Panes/AddGlobalSecondaryIndexPanel/Components/VectorSearchComponent.tsx +++ b/src/Explorer/Panes/AddGlobalSecondaryIndexPanel/Components/VectorSearchComponent.tsx @@ -14,6 +14,7 @@ export interface VectorSearchComponentProps { vectorIndexingPolicy: VectorIndex[]; setVectorIndexingPolicy: React.Dispatch>; setVectorPolicyValidated: React.Dispatch>; + isGlobalSecondaryIndex?: boolean; } export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.Element => { @@ -23,6 +24,7 @@ export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.El vectorIndexingPolicy, setVectorIndexingPolicy, setVectorPolicyValidated, + isGlobalSecondaryIndex, } = props; return ( @@ -49,6 +51,7 @@ export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.El setVectorIndexingPolicy(vectorIndexingPolicy); setVectorPolicyValidated(vectorPolicyValidated); }} + isGlobalSecondaryIndex={isGlobalSecondaryIndex} />