Hierarchical Partitioning - Expose container type and hashkey version for all containers. (#1458)

* Able to find needed data without RP calls.  Quick test blurb on settings page for SQL accounts.

* Added hierarchical partition message for SQL accounts.

* Rearranging import to match master and bypass auto formatting.

* Update snapshot tests with new partition hierarchy message.

* Updating formatting

---------

Co-authored-by: Craig Boger <craig.boger@microsoft.com>
This commit is contained in:
bogercraig 2023-05-24 15:42:42 -04:00 committed by GitHub
parent d1c4059320
commit abff435e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 6 deletions

View File

@ -311,8 +311,15 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
)}
{userContext.apiType === "SQL" && this.isLargePartitionKeyEnabled() && (
<Text>Large {this.partitionKeyName.toLowerCase()} has been enabled</Text>
<Text>Large {this.partitionKeyName.toLowerCase()} has been enabled.</Text>
)}
{userContext.apiType === "SQL" &&
(this.isHierarchicalPartitionedContainer() ? (
<Text>Hierarchically partitioned container.</Text>
) : (
<Text>Non-hierarchically partitioned container.</Text>
))}
</Stack>
);
@ -330,6 +337,7 @@ export class SubSettingsComponent extends React.Component<SubSettingsComponentPr
};
public isLargePartitionKeyEnabled = (): boolean => this.props.collection.partitionKey?.version >= 2;
public isHierarchicalPartitionedContainer = (): boolean => this.props.collection.partitionKey?.kind === "MultiHash";
public render(): JSX.Element {
return (

View File

@ -218,7 +218,10 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
<Text>
Large
partition key
has been enabled
has been enabled.
</Text>
<Text>
Non-hierarchically partitioned container.
</Text>
</Stack>
</Stack>
@ -495,7 +498,10 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
<Text>
Large
partition key
has been enabled
has been enabled.
</Text>
<Text>
Non-hierarchically partitioned container.
</Text>
</Stack>
</Stack>
@ -734,7 +740,10 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
<Text>
Large
partition key
has been enabled
has been enabled.
</Text>
<Text>
Non-hierarchically partitioned container.
</Text>
</Stack>
</Stack>
@ -1036,7 +1045,10 @@ exports[`SubSettingsComponent renders 1`] = `
<Text>
Large
partition key
has been enabled
has been enabled.
</Text>
<Text>
Non-hierarchically partitioned container.
</Text>
</Stack>
</Stack>
@ -1313,7 +1325,10 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
<Text>
Large
partition key
has been enabled
has been enabled.
</Text>
<Text>
Non-hierarchically partitioned container.
</Text>
</Stack>
</Stack>