mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 08:51:24 +00:00
add capacityMode (#1826)
* add capacityMode * add check for capacityMode for serverless
This commit is contained in:
@@ -9,4 +9,10 @@ export const isCapabilityEnabled = (capabilityName: string): boolean => {
|
||||
return false;
|
||||
};
|
||||
|
||||
export const isServerlessAccount = (): boolean => isCapabilityEnabled(Constants.CapabilityNames.EnableServerless);
|
||||
export const isServerlessAccount = (): boolean => {
|
||||
const { databaseAccount } = userContext;
|
||||
return (
|
||||
databaseAccount?.properties?.capacityMode === Constants.CapacityMode.Serverless ||
|
||||
isCapabilityEnabled(Constants.CapabilityNames.EnableServerless)
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user