Compare commits

...

1 Commits

Author SHA1 Message Date
Nishtha Ahuja
0d574221ce disabled change partition key section for emulator 2024-12-09 13:17:57 +05:30

View File

@@ -14,6 +14,7 @@ import * as ViewModels from "../../../../Contracts/ViewModels";
import { handleError } from "Common/ErrorHandlingUtils"; import { handleError } from "Common/ErrorHandlingUtils";
import { cancelDataTransferJob, pollDataTransferJob } from "Common/dataAccess/dataTransfers"; import { cancelDataTransferJob, pollDataTransferJob } from "Common/dataAccess/dataTransfers";
import { Platform, configContext } from "ConfigContext";
import Explorer from "Explorer/Explorer"; import Explorer from "Explorer/Explorer";
import { ChangePartitionKeyPane } from "Explorer/Panes/ChangePartitionKeyPane/ChangePartitionKeyPane"; import { ChangePartitionKeyPane } from "Explorer/Panes/ChangePartitionKeyPane/ChangePartitionKeyPane";
import { import {
@@ -148,6 +149,7 @@ export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({ da
}; };
return ( return (
configContext.platform !== Platform.Emulator && (
<Stack tokens={{ childrenGap: 20 }} styles={{ root: { maxWidth: 600 } }}> <Stack tokens={{ childrenGap: 20 }} styles={{ root: { maxWidth: 600 } }}>
<Stack tokens={{ childrenGap: 10 }}> <Stack tokens={{ childrenGap: 10 }}>
<Text styles={textHeadingStyle}>Change {partitionKeyName.toLowerCase()}</Text> <Text styles={textHeadingStyle}>Change {partitionKeyName.toLowerCase()}</Text>
@@ -163,8 +165,8 @@ export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({ da
</Stack> </Stack>
</Stack> </Stack>
<MessageBar messageBarType={MessageBarType.warning}> <MessageBar messageBarType={MessageBarType.warning}>
To safeguard the integrity of the data being copied to the new container, ensure that no updates are made to the To safeguard the integrity of the data being copied to the new container, ensure that no updates are made to
source container for the entire duration of the partition key change process. the source container for the entire duration of the partition key change process.
<Link <Link
href="https://learn.microsoft.com/azure/cosmos-db/container-copy#how-does-container-copy-work" href="https://learn.microsoft.com/azure/cosmos-db/container-copy#how-does-container-copy-work"
target="_blank" target="_blank"
@@ -212,5 +214,6 @@ export const PartitionKeyComponent: React.FC<PartitionKeyComponentProps> = ({ da
</Stack> </Stack>
)} )}
</Stack> </Stack>
)
); );
}; };