Skip to content

Commit 2735e22

Browse files
committed
1 parent 8058201 commit 2735e22

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

src/features/clusters/upsert/ClusterDetails.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ export function ClusterDetails({
9292
<div className="grid grid-cols-3 gap-6 text-white md:grid-cols-6">
9393
<FormField
9494
control={form.control}
95-
name="systemName"
95+
name="clusterName"
9696
render={({ field }) => (
9797
<FormItem className="col-span-3 md:col-span-6">
98-
<FormLabel className="pb-1">Harper System Name</FormLabel>
98+
<FormLabel className="pb-1">Cluster Name</FormLabel>
9999
<FormControl>
100100
<Input
101101
type="text"
102-
maxLength={UpsertClusterSchema.shape.systemName.maxLength!}
102+
maxLength={UpsertClusterSchema.shape.clusterName.maxLength!}
103103
autoCapitalize="words"
104104
disabled={!!clusterId}
105105
{...field} />

src/features/clusters/upsert/ClusterForm.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export function ClusterForm({
151151
}
152152
}, [defaultValues, firstTime, setSavedClusterState]);
153153

154-
const systemName = form.watch('systemName');
154+
const clusterName = form.watch('clusterName');
155155
const abbreviatedName = form.watch('abbreviatedName');
156156
const selectedDeployment = form.watch('deploymentDescription');
157157
const selectedPerformance = form.watch('performanceDescription');
@@ -202,14 +202,14 @@ export function ClusterForm({
202202

203203
const calculatedNames = useMemo(() => {
204204
const suggestedAbbreviatedName = collapseKebabsToMaxLength(
205-
toKebabCase(systemName),
205+
toKebabCase(clusterName),
206206
UpsertClusterSchema.shape.abbreviatedName.unwrap().maxLength!,
207207
);
208208
return {
209209
suggestedAbbreviatedName,
210210
fullHostName: `${abbreviatedName || suggestedAbbreviatedName}.${organization.subdomain || 'your-org'}.harperfabric.com`,
211211
};
212-
}, [systemName, abbreviatedName, organization]);
212+
}, [clusterName, abbreviatedName, organization]);
213213
const selectedPlan = useMemo(() =>
214214
deploymentToPerformanceToPlan?.[selectedDeployment]?.[selectedPerformance], [deploymentToPerformanceToPlan, selectedDeployment, selectedPerformance]);
215215

@@ -340,7 +340,7 @@ export function ClusterForm({
340340
: (formData.abbreviatedName || calculatedNames.suggestedAbbreviatedName),
341341
autoRenew: true,
342342
fqdn: isSelfManaged && formData.fqdn || undefined,
343-
name: formData.systemName,
343+
name: formData.clusterName,
344344
organizationId,
345345
regionPlans: plans,
346346
}, {
@@ -375,11 +375,9 @@ export function ClusterForm({
375375
{!confirmingPaymentDetails
376376
? (<>
377377
<h1 className="text-lg leading-none text-white font-semibold mb-4">Cluster Configuration</h1>
378-
<p className="text-muted-foreground text-sm mb-6">Configure your Harper system and define
379-
deployment
380-
plans.</p>
378+
<p className="text-muted-foreground text-sm mb-6">
379+
Configure your Harper cluster and define deployment plans.</p>
381380

382-
<h1 className="text-lg leading-none text-white font-semibold mb-4">System</h1>
383381
<form onSubmit={form.handleSubmit(submitClusterDetailsForm)}>
384382
<ClusterDetails
385383
calculatedNames={calculatedNames}

src/features/clusters/upsert/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function UpsertCluster() {
110110

111111
return {
112112
autoRenew: cluster?.plans?.[0]?.autoRenew ?? true,
113-
systemName: cluster?.name ?? '',
113+
clusterName: cluster?.name ?? '',
114114
abbreviatedName: cluster?.abbreviatedName ?? '',
115115
deploymentDescription: selectedPlan?.deploymentDescription ?? defaults?.deploymentDescription ?? '',
116116
performanceDescription: selectedPlan?.performanceDescription ?? defaults?.performanceDescription ?? '',

src/features/clusters/upsert/upsertClusterSchema.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { maxPortNumber, minPortNumber } from '@/lib/types/portNumbers';
33
import { z } from 'zod';
44

55
export const UpsertClusterSchema = z.object({
6-
systemName: z.string()
7-
.nonempty('Please enter a system name.')
8-
.max(255, 'System name cannot be longer than 255 characters long.'),
6+
clusterName: z.string()
7+
.nonempty('Please enter a cluster name.')
8+
.max(255, 'Cluster name cannot be longer than 255 characters long.'),
99
abbreviatedName: z
1010
.string()
1111
.max(20, 'Must be at most 20 characters long.')

0 commit comments

Comments
 (0)