Skip to content

Commit 1c2ea88

Browse files
committed
Merge branch 'beta-in-header' into dev
2 parents aab8265 + cda3de6 commit 1c2ea88

File tree

12 files changed

+39
-24
lines changed

12 files changed

+39
-24
lines changed

.github/workflows/deploy-dev-with-restart.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ jobs:
3131
run: pnpm lint
3232
- name: Determine version tag for build
3333
run: |
34-
VERSION_TAG="SHA-${GITHUB_SHA:0:7}"
34+
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
35+
if [ -z "$VERSION_TAG" ]; then
36+
VERSION_TAG="dev_${GITHUB_SHA:0:7}"
37+
fi
3538
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
3639
- name: Build dev
3740
run: pnpm build:dev

.github/workflows/deploy-dev.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ jobs:
3434
run: pnpm lint
3535
- name: Determine version tag for build
3636
run: |
37-
VERSION_TAG="SHA-${GITHUB_SHA:0:7}"
37+
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
38+
if [ -z "$VERSION_TAG" ]; then
39+
VERSION_TAG="dev_${GITHUB_SHA:0:7}"
40+
fi
3841
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
3942
- name: Build dev
4043
run: pnpm build:dev

.github/workflows/deploy-prod-with-restart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
3535
if [ -z "$VERSION_TAG" ]; then
36-
VERSION_TAG="v0.0.0+${GITHUB_SHA:0:7}"
36+
VERSION_TAG="prod_${GITHUB_SHA:0:7}"
3737
fi
3838
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
3939
- name: Build prod

.github/workflows/deploy-prod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
3737
if [ -z "$VERSION_TAG" ]; then
38-
VERSION_TAG="v0.0.0+${GITHUB_SHA:0:7}"
38+
VERSION_TAG="prod_${GITHUB_SHA:0:7}"
3939
fi
4040
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
4141
- name: Build prod

.github/workflows/deploy-stage-with-restart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: |
3939
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
4040
if [ -z "$VERSION_TAG" ]; then
41-
VERSION_TAG="v0.0.0+${GITHUB_SHA:0:7}"
41+
VERSION_TAG="stage_${GITHUB_SHA:0:7}"
4242
fi
4343
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
4444
- name: Build stage for release

.github/workflows/deploy-stage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
VERSION_TAG=$(git tag --points-at HEAD | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n1)
5151
if [ -z "$VERSION_TAG" ]; then
52-
VERSION_TAG="v0.0.0+${GITHUB_SHA:0:7}"
52+
VERSION_TAG="stage_${GITHUB_SHA:0:7}"
5353
fi
5454
echo "VITE_STUDIO_VERSION=$VERSION_TAG" >> $GITHUB_ENV
5555
- name: Build stage for release

src/components/Navbar.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NavigationMenu } from '@/components/ui/navigation/NavigationMenu';
33
import { NavigationMenuItem } from '@/components/ui/navigation/NavigationMenuItem';
44
import { NavigationMenuLink } from '@/components/ui/navigation/NavigationMenuLink';
55
import { NavigationMenuList } from '@/components/ui/navigation/NavigationMenuList';
6+
import { Version } from '@/components/Version';
67
import { defaultInstanceRoute, isLocalStudio } from '@/config/constants';
78
import { useLogoutMutation } from '@/features/auth/hooks/useLogout';
89
import { useOverallAuth } from '@/hooks/useAuth';
@@ -39,7 +40,7 @@ function MobileNav({ signOut }: { signOut: () => void }) {
3940
<div className="flex items-center justify-between">
4041
<Link to={isLocalStudio ? defaultInstanceRoute : defaultCloudRoute}>
4142
<Logo />
42-
<span className="text-grey text-xs inline-block pl-2">{import.meta.env.VITE_STUDIO_VERSION}</span>
43+
<Version />
4344
</Link>
4445
<button
4546
type="button"
@@ -137,7 +138,7 @@ function DesktopNav({ signOut }: { signOut: () => void }) {
137138
<div className="inline-block">
138139
<Link to={isLocalStudio ? defaultInstanceRoute : defaultCloudRoute}>
139140
<Logo />
140-
<span className="text-grey text-xs inline-block pl-2">{import.meta.env.VITE_STUDIO_VERSION}</span>
141+
<Version />
141142
</Link>
142143
</div>
143144
<NavigationMenu>
@@ -233,7 +234,7 @@ function AnonymousNav() {
233234
<div className="inline-block">
234235
<Link to="/sign-in">
235236
<Logo />
236-
<span className="text-grey text-xs inline-block pl-2">{import.meta.env.VITE_STUDIO_VERSION}</span>
237+
<Version />
237238
</Link>
238239
</div>
239240
<NavigationMenu>

src/components/Version.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { badgeVariants } from '@/components/ui/badgeVariants';
2+
import { cn } from '@/lib/cn';
3+
4+
export function Version() {
5+
return (<>
6+
<span
7+
className={cn(badgeVariants({ variant: 'default' }), 'text-xs inline-block ml-2 align-text-top')}
8+
>{import.meta.env.VITE_STUDIO_VERSION} BETA</span>
9+
</>);
10+
}

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}

0 commit comments

Comments
 (0)