mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-07 11:36:47 +00:00
Update throughput settings tab with new elasticity properties (#1461)
* Adding RU thermometer to settings throughput tab * Finalizing RU thermometer on throughput settings * Updated snapshot * Fixing formatting * Fixing lint errors * Rerun prettier * Fixing Offer properties * Fixing Types * Updating ARM clients, and enabling new elasticity properties * Updating snapshots * Updating an issue caused by updating ARM client * Latest changes based on feedback * Fixing lint and unit tests * Minor fix * Minor text change * Changed some formatting
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { Resource, StoredProcedureDefinition } from "@azure/cosmos";
|
||||
import { CloudError, SqlStoredProcedureListResult } from "Utils/arm/generatedClients/cosmos/types";
|
||||
import { AuthType } from "../../AuthType";
|
||||
import { userContext } from "../../UserContext";
|
||||
import { listSqlStoredProcedures } from "../../Utils/arm/generatedClients/cosmos/sqlResources";
|
||||
import { logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
||||
import { listSqlStoredProcedures } from "../../Utils/arm/generatedClients/cosmos/sqlResources";
|
||||
import { client } from "../CosmosClient";
|
||||
import { handleError } from "../ErrorHandlingUtils";
|
||||
|
||||
@@ -24,7 +25,13 @@ export async function readStoredProcedures(
|
||||
databaseId,
|
||||
collectionId
|
||||
);
|
||||
return rpResponse?.value?.map((sproc) => sproc.properties?.resource as StoredProcedureDefinition & Resource);
|
||||
const listResult = rpResponse as SqlStoredProcedureListResult;
|
||||
if (listResult) {
|
||||
return listResult?.value?.map((sproc) => sproc.properties?.resource as StoredProcedureDefinition & Resource);
|
||||
}
|
||||
|
||||
const cloudError = rpResponse as CloudError;
|
||||
throw new Error(cloudError?.error?.message);
|
||||
}
|
||||
|
||||
const response = await client()
|
||||
|
||||
Reference in New Issue
Block a user