mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 06:56:38 +00:00
Hide provision throughput checkbox for serverless account (#861)
This commit is contained in:
parent
ee60f61cfe
commit
16b09df5fa
@ -179,10 +179,12 @@ export const AddDatabasePanel: FunctionComponent<AddDatabasePaneProps> = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="panelMainContent">
|
<div className="panelMainContent">
|
||||||
<div>
|
<Stack>
|
||||||
<Stack horizontal>
|
<Stack horizontal>
|
||||||
<span className="mandatoryStar">*</span>
|
<span className="mandatoryStar">* </span>
|
||||||
<Text variant="small">{databaseIdLabel}</Text>
|
<Text className="panelTextBold" variant="small">
|
||||||
|
{databaseIdLabel}
|
||||||
|
</Text>
|
||||||
<InfoTooltip>{databaseIdTooltipText}</InfoTooltip>
|
<InfoTooltip>{databaseIdTooltipText}</InfoTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
@ -203,32 +205,34 @@ export const AddDatabasePanel: FunctionComponent<AddDatabasePaneProps> = ({
|
|||||||
styles={{ root: { width: 300 } }}
|
styles={{ root: { width: 300 } }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Stack horizontal>
|
{!isServerlessAccount() && (
|
||||||
<Checkbox
|
<Stack horizontal>
|
||||||
title="Provision shared throughput"
|
<Checkbox
|
||||||
styles={{
|
title="Provision shared throughput"
|
||||||
text: { fontSize: 12 },
|
styles={{
|
||||||
checkbox: { width: 12, height: 12 },
|
text: { fontSize: 12 },
|
||||||
label: { padding: 0, alignItems: "center" },
|
checkbox: { width: 12, height: 12 },
|
||||||
}}
|
label: { padding: 0, alignItems: "center" },
|
||||||
label="Provision throughput"
|
}}
|
||||||
checked={databaseCreateNewShared}
|
label="Provision throughput"
|
||||||
onChange={() => setDatabaseCreateNewShared(!databaseCreateNewShared)}
|
checked={databaseCreateNewShared}
|
||||||
/>
|
onChange={() => setDatabaseCreateNewShared(!databaseCreateNewShared)}
|
||||||
<InfoTooltip>{databaseLevelThroughputTooltipText}</InfoTooltip>
|
/>
|
||||||
</Stack>
|
<InfoTooltip>{databaseLevelThroughputTooltipText}</InfoTooltip>
|
||||||
|
</Stack>
|
||||||
{!isServerlessAccount() && databaseCreateNewShared && (
|
|
||||||
<ThroughputInput
|
|
||||||
showFreeTierExceedThroughputTooltip={isFreeTierAccount && !container?.isFirstResourceCreated()}
|
|
||||||
isDatabase={true}
|
|
||||||
isSharded={databaseCreateNewShared}
|
|
||||||
setThroughputValue={(newThroughput: number) => (throughput = newThroughput)}
|
|
||||||
setIsAutoscale={(isAutoscale: boolean) => (isAutoscaleSelected = isAutoscale)}
|
|
||||||
onCostAcknowledgeChange={(isAcknowledged: boolean) => (isCostAcknowledged = isAcknowledged)}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</Stack>
|
||||||
|
|
||||||
|
{!isServerlessAccount() && databaseCreateNewShared && (
|
||||||
|
<ThroughputInput
|
||||||
|
showFreeTierExceedThroughputTooltip={isFreeTierAccount && !container?.isFirstResourceCreated()}
|
||||||
|
isDatabase={true}
|
||||||
|
isSharded={databaseCreateNewShared}
|
||||||
|
setThroughputValue={(newThroughput: number) => (throughput = newThroughput)}
|
||||||
|
setIsAutoscale={(isAutoscale: boolean) => (isAutoscaleSelected = isAutoscale)}
|
||||||
|
onCostAcknowledgeChange={(isAcknowledged: boolean) => (isCostAcknowledged = isAcknowledged)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
);
|
);
|
||||||
|
@ -10,16 +10,17 @@ exports[`AddDatabasePane Pane should render Default properly 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="panelMainContent"
|
className="panelMainContent"
|
||||||
>
|
>
|
||||||
<div>
|
<Stack>
|
||||||
<Stack
|
<Stack
|
||||||
horizontal={true}
|
horizontal={true}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="mandatoryStar"
|
className="mandatoryStar"
|
||||||
>
|
>
|
||||||
*
|
*
|
||||||
</span>
|
</span>
|
||||||
<Text
|
<Text
|
||||||
|
className="panelTextBold"
|
||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
Database id
|
Database id
|
||||||
@ -82,14 +83,14 @@ exports[`AddDatabasePane Pane should render Default properly 1`] = `
|
|||||||
Provisioned throughput at the database level will be shared across all collections within the database.
|
Provisioned throughput at the database level will be shared across all collections within the database.
|
||||||
</InfoTooltip>
|
</InfoTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
<ThroughputInput
|
</Stack>
|
||||||
isDatabase={true}
|
<ThroughputInput
|
||||||
isSharded={true}
|
isDatabase={true}
|
||||||
onCostAcknowledgeChange={[Function]}
|
isSharded={true}
|
||||||
setIsAutoscale={[Function]}
|
onCostAcknowledgeChange={[Function]}
|
||||||
setThroughputValue={[Function]}
|
setIsAutoscale={[Function]}
|
||||||
/>
|
setThroughputValue={[Function]}
|
||||||
</div>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</RightPaneForm>
|
</RightPaneForm>
|
||||||
`;
|
`;
|
||||||
|
Loading…
Reference in New Issue
Block a user