Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/features/clusters/upsert/ClusterBilling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function ClusterBilling({
</li>
{clusterId && (
<li>If you scale up, you'll be charged for the additional blocks you've purchased
now${selectedAutoRenew ? ', and your next auto renewal will be for all purchased blocks' : ''}.
now{selectedAutoRenew ? ', and your next auto renewal will be for all purchased blocks' : ''}.
</li>)}
{clusterId && (<li>If you remove a region, that usage block will not be used (because it is specific to that
region).</li>)}
Expand Down
10 changes: 5 additions & 5 deletions src/features/clusters/upsert/components/ResourcesPerInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ export function ResourcesPerInstance({ planLimits, resourcesPerInstance }: {
].filter(excludeFalsy), [planLimits, resourcesPerInstance]);

return <FormItem className="col-span-3 md:col-span-6">
<FormLabel className="inline-flex">
<FormLabel>
Purchasing usage block for {humanNumber(planLimits.readsPerMinuteCount!)} reads/min
&amp; {humanNumber(planLimits.totalReadCount)} total reads per region,
{humanNumber(planLimits.writesPerMinuteCount!)} writes/min &amp; {humanNumber(planLimits.totalWriteCount)} total writes, for 3 months.
<Button
type="button"
variant="link"
className="text-white cursor-pointer"
onClick={onUsageLimitsClick}
>
Purchasing usage block for {humanNumber(planLimits.readsPerMinuteCount!)} reads/min
&amp; {humanNumber(planLimits.totalReadCount)} total reads per region,<br/>
{humanNumber(planLimits.writesPerMinuteCount!)} writes/min &amp; {humanNumber(planLimits.totalWriteCount!)} total writes, for 3 months, expand for more details:
{toggled ? <ArrowDownIcon /> : <ArrowRightIcon />}
Learn More {toggled ? <ArrowDownIcon /> : <ArrowRightIcon />}
</Button>
</FormLabel>
<FormControl>
Expand Down
4 changes: 3 additions & 1 deletion src/features/clusters/upsert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export function UpsertCluster() {
const instances: z.infer<typeof UpsertClusterSchema.shape.instances> = [];
const defaults = calculateDefaultDeploymentPerformanceAndRegionPlans(planTypes, regionLocations);

let isSelfManaged = false;
if (planTypes && regionLocations) {
if (cluster) {
if (cluster.plans) {
Expand All @@ -69,6 +70,7 @@ export function UpsertCluster() {
}
if (!regionPlans.length && cluster.instances) {
for (const instance of cluster.instances) {
isSelfManaged = true;
instances.push({
fqdn: instance.instanceFqdn,
port: instance.operationsApiPort,
Expand All @@ -87,7 +89,7 @@ export function UpsertCluster() {
abbreviatedName: cluster?.abbreviatedName ?? '',
deploymentDescription: selectedPlan?.deploymentDescription ?? defaults?.deploymentDescription ?? '',
performanceDescription: selectedPlan?.performanceDescription ?? defaults?.performanceDescription ?? '',
fqdn: cluster?.fqdn ?? '',
fqdn: isSelfManaged ? cluster?.fqdn ?? '' : '',
instances,
regionPlans,
};
Expand Down