mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 09:51:11 +00:00
Remvoe Explorer.isServerlessEnabled (#883)
This commit is contained in:
@@ -13,6 +13,7 @@ import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryCons
|
||||
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
||||
import { userContext } from "../../../UserContext";
|
||||
import * as AutoPilotUtils from "../../../Utils/AutoPilotUtils";
|
||||
import { isServerlessAccount } from "../../../Utils/CapabilityUtils";
|
||||
import { ThroughputInput } from "../../Controls/ThroughputInput/ThroughputInput";
|
||||
import Explorer from "../../Explorer";
|
||||
import { CassandraAPIDataClient } from "../../Tables/TableDataClient";
|
||||
@@ -75,7 +76,7 @@ export const CassandraAddCollectionPane: FunctionComponent<CassandraAddCollectio
|
||||
|
||||
const isFreeTierAccount: boolean = userContext.databaseAccount?.properties?.enableFreeTier;
|
||||
|
||||
const canConfigureThroughput = !container.isServerlessEnabled();
|
||||
const canConfigureThroughput = !isServerlessAccount();
|
||||
|
||||
const keyspaceOffers = new Map();
|
||||
const [isExecuting, setIsExecuting] = useState<boolean>();
|
||||
@@ -107,7 +108,7 @@ export const CassandraAddCollectionPane: FunctionComponent<CassandraAddCollectio
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!container.isServerlessEnabled()) {
|
||||
if (!isServerlessAccount()) {
|
||||
setIsAutoPilotSelected(userContext.features.autoscaleDefault);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isShellEnabled": [Function],
|
||||
"isSynapseLinkUpdating": [Function],
|
||||
"isTabsContentExpanded": [Function],
|
||||
|
||||
@@ -18,7 +18,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isShellEnabled": [Function],
|
||||
"isSynapseLinkUpdating": [Function],
|
||||
"isTabsContentExpanded": [Function],
|
||||
|
||||
@@ -19,7 +19,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isSelectedDatabaseShared": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isShellEnabled": [Function],
|
||||
"isSynapseLinkUpdating": [Function],
|
||||
"isTabsContentExpanded": [Function],
|
||||
|
||||
Reference in New Issue
Block a user