mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Check for -1 throughput cap value (#1159)
This commit is contained in:
@@ -311,7 +311,8 @@ function createNewDatabase(container: Explorer): CommandButtonComponentProps {
|
||||
iconSrc: AddDatabaseIcon,
|
||||
iconAlt: label,
|
||||
onCommandClick: async () => {
|
||||
if (userContext.databaseAccount?.properties.capacity?.totalThroughputLimit) {
|
||||
const throughputCap = userContext.databaseAccount?.properties.capacity?.totalThroughputLimit;
|
||||
if (throughputCap && throughputCap !== -1) {
|
||||
await useDatabases.getState().loadAllOffers();
|
||||
}
|
||||
useSidePanel.getState().openSidePanel("New " + getDatabaseName(), <AddDatabasePanel explorer={container} />);
|
||||
|
||||
Reference in New Issue
Block a user