mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-03 15:04:04 +01:00
change text for GSI and container in VectorEmbedding Policy
This commit is contained in:
parent
65eb03cfef
commit
6ebfcc4cad
@ -1215,6 +1215,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
isFullTextSearchEnabled: this.isFullTextSearchEnabled,
|
isFullTextSearchEnabled: this.isFullTextSearchEnabled,
|
||||||
shouldDiscardContainerPolicies: this.state.shouldDiscardContainerPolicies,
|
shouldDiscardContainerPolicies: this.state.shouldDiscardContainerPolicies,
|
||||||
resetShouldDiscardContainerPolicyChange: this.resetShouldDiscardContainerPolicies,
|
resetShouldDiscardContainerPolicyChange: this.resetShouldDiscardContainerPolicies,
|
||||||
|
isGlobalSecondaryIndex: this.isGlobalSecondaryIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
const indexingPolicyComponentProps: IndexingPolicyComponentProps = {
|
const indexingPolicyComponentProps: IndexingPolicyComponentProps = {
|
||||||
|
@ -22,6 +22,7 @@ export interface ContainerPolicyComponentProps {
|
|||||||
isFullTextSearchEnabled: boolean;
|
isFullTextSearchEnabled: boolean;
|
||||||
shouldDiscardContainerPolicies: boolean;
|
shouldDiscardContainerPolicies: boolean;
|
||||||
resetShouldDiscardContainerPolicyChange: () => void;
|
resetShouldDiscardContainerPolicyChange: () => void;
|
||||||
|
isGlobalSecondaryIndex?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ContainerPolicyComponent: React.FC<ContainerPolicyComponentProps> = ({
|
export const ContainerPolicyComponent: React.FC<ContainerPolicyComponentProps> = ({
|
||||||
|
@ -30,6 +30,7 @@ export interface IVectorEmbeddingPoliciesComponentProps {
|
|||||||
discardChanges?: boolean;
|
discardChanges?: boolean;
|
||||||
onChangesDiscarded?: () => void;
|
onChangesDiscarded?: () => void;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
isGlobalSecondaryIndex?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VectorEmbeddingPolicyData {
|
export interface VectorEmbeddingPolicyData {
|
||||||
@ -87,6 +88,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
|
|||||||
discardChanges,
|
discardChanges,
|
||||||
onChangesDiscarded,
|
onChangesDiscarded,
|
||||||
disabled,
|
disabled,
|
||||||
|
isGlobalSecondaryIndex,
|
||||||
}): JSX.Element => {
|
}): JSX.Element => {
|
||||||
const onVectorEmbeddingPathError = (path: string, index?: number): string => {
|
const onVectorEmbeddingPathError = (path: string, index?: number): string => {
|
||||||
let error = "";
|
let error = "";
|
||||||
@ -284,6 +286,11 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
|
|||||||
setVectorEmbeddingPolicyData(vectorEmbeddings);
|
setVectorEmbeddingPolicyData(vectorEmbeddings);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getQuantizationByteSizeTooltipContent = (): string => {
|
||||||
|
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 (
|
return (
|
||||||
<Stack tokens={{ childrenGap: 4 }}>
|
<Stack tokens={{ childrenGap: 4 }}>
|
||||||
{vectorEmbeddingPolicyData &&
|
{vectorEmbeddingPolicyData &&
|
||||||
@ -394,7 +401,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
|
|||||||
styles={labelStyles}
|
styles={labelStyles}
|
||||||
>
|
>
|
||||||
Quantization byte size
|
Quantization byte size
|
||||||
<InfoTooltip>Dynamic by default, can optionally be set to a fixed number.</InfoTooltip>
|
<InfoTooltip>{getQuantizationByteSizeTooltipContent()}</InfoTooltip>
|
||||||
</Label>
|
</Label>
|
||||||
<TextField
|
<TextField
|
||||||
disabled={
|
disabled={
|
||||||
@ -426,7 +433,7 @@ export const VectorEmbeddingPoliciesComponent: FunctionComponent<IVectorEmbeddin
|
|||||||
</Stack>
|
</Stack>
|
||||||
<Stack style={{ marginLeft: "10px" }}>
|
<Stack style={{ marginLeft: "10px" }}>
|
||||||
<Label disabled={disabled || vectorEmbeddingPolicy.indexType !== "diskANN"} styles={labelStyles}>
|
<Label disabled={disabled || vectorEmbeddingPolicy.indexType !== "diskANN"} styles={labelStyles}>
|
||||||
Vector Index Shard Key
|
Vector index shard key
|
||||||
</Label>
|
</Label>
|
||||||
<TextField
|
<TextField
|
||||||
disabled={disabled || vectorEmbeddingPolicy.indexType !== "diskANN"}
|
disabled={disabled || vectorEmbeddingPolicy.indexType !== "diskANN"}
|
||||||
|
@ -388,6 +388,7 @@ export const AddGlobalSecondaryIndexPanel = (props: AddGlobalSecondaryIndexPanel
|
|||||||
setVectorIndexingPolicy,
|
setVectorIndexingPolicy,
|
||||||
vectorPolicyValidated,
|
vectorPolicyValidated,
|
||||||
setVectorPolicyValidated,
|
setVectorPolicyValidated,
|
||||||
|
isGlobalSecondaryIndex: true,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -14,6 +14,7 @@ export interface VectorSearchComponentProps {
|
|||||||
vectorIndexingPolicy: VectorIndex[];
|
vectorIndexingPolicy: VectorIndex[];
|
||||||
setVectorIndexingPolicy: React.Dispatch<React.SetStateAction<VectorIndex[]>>;
|
setVectorIndexingPolicy: React.Dispatch<React.SetStateAction<VectorIndex[]>>;
|
||||||
setVectorPolicyValidated: React.Dispatch<React.SetStateAction<boolean>>;
|
setVectorPolicyValidated: React.Dispatch<React.SetStateAction<boolean>>;
|
||||||
|
isGlobalSecondaryIndex?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.Element => {
|
export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.Element => {
|
||||||
@ -23,6 +24,7 @@ export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.El
|
|||||||
vectorIndexingPolicy,
|
vectorIndexingPolicy,
|
||||||
setVectorIndexingPolicy,
|
setVectorIndexingPolicy,
|
||||||
setVectorPolicyValidated,
|
setVectorPolicyValidated,
|
||||||
|
isGlobalSecondaryIndex,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -49,6 +51,7 @@ export const VectorSearchComponent = (props: VectorSearchComponentProps): JSX.El
|
|||||||
setVectorIndexingPolicy(vectorIndexingPolicy);
|
setVectorIndexingPolicy(vectorIndexingPolicy);
|
||||||
setVectorPolicyValidated(vectorPolicyValidated);
|
setVectorPolicyValidated(vectorPolicyValidated);
|
||||||
}}
|
}}
|
||||||
|
isGlobalSecondaryIndex={isGlobalSecondaryIndex}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user