Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor(v5): remove CLI-specific fields and labels from clusters UI

Andras Bacsai155b07378c53
diff --git a/resources/js/v5/Pages/Clusters.tsx b/resources/js/v5/Pages/Clusters.tsx
index 0f784bdc66..21ffbeae44 100644
--- a/resources/js/v5/Pages/Clusters.tsx
+++ b/resources/js/v5/Pages/Clusters.tsx
@@ -1000,10 +1000,6 @@ export default function Clusters({
{isDeletingCluster ? 'Deleting...' : 'Delete cluster'}
</Button>
) : null}
- <div className="rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-muted-foreground">
- {selectedCluster.serversCount}{' '}
- {selectedCluster.serversCount === 1 ? 'server' : 'servers'}
- </div>
</div>
</div>
{deleteClusterError ? (
@@ -1067,7 +1063,7 @@ export default function Clusters({
<div className="rounded-lg border border-border bg-background p-4">
<p className="text-xs font-medium uppercase tracking-wide text-muted-foreground">
- CLI state
+ Cluster state
</p>
<dl className="mt-3 space-y-2 text-xs">
<div className="flex justify-between gap-3">
@@ -1082,18 +1078,7 @@ export default function Clusters({
{selectedCluster.corrosionVersion}
</dd>
</div>
- <div className="flex justify-between gap-3">
- <dt className="text-muted-foreground">Last run</dt>
- <dd className="font-medium text-foreground">
- {selectedCluster.lastCliStatus ?? 'Never'}
- </dd>
- </div>
</dl>
- {selectedCluster.lastCliSummary ? (
- <pre className="mt-3 max-h-28 overflow-auto whitespace-pre-wrap rounded bg-muted/30 p-2 text-xs text-muted-foreground">
- {selectedCluster.lastCliSummary}
- </pre>
- ) : null}
</div>
</div>
@@ -1493,8 +1478,7 @@ export default function Clusters({
<DialogHeader>
<DialogTitle>Add server</DialogTitle>
<DialogDescription>
- Add a remote server to this WireGuard cluster. CLI-generated mesh values are
- saved after bootstrap or extend runs.
+ Add a remote server to this WireGuard cluster. Generated mesh values are saved after bootstrap or extend runs.
</DialogDescription>
</DialogHeader>
diff --git a/tests/Feature/V5/DashboardTest.php b/tests/Feature/V5/DashboardTest.php
index 73e31d1cff..4b4a77f84a 100644
--- a/tests/Feature/V5/DashboardTest.php
+++ b/tests/Feature/V5/DashboardTest.php
@@ -2043,6 +2043,13 @@ it('defines the v5 cluster management page and create cluster form', function ()
->toContain("import { csrfToken } from '@/lib/csrf';")
->toContain("fetch('/v5/clusters'")
->toContain('aria-label="Select a cluster"')
+ ->toContain('Cluster state')
+ ->not->toContain('Last run')
+ ->not->toContain('selectedCluster.lastCliStatus')
+ ->not->toContain('selectedCluster.lastCliSummary')
+ ->toContain('Generated mesh values are saved after bootstrap or extend runs.')
+ ->not->toContain('CLI state')
+ ->not->toContain('CLI-generated mesh values')
->toContain('Select a cluster')
->toContain('setSelectedClusterId(value)')
->toContain('aria-label="Create cluster"')
@@ -2163,6 +2170,7 @@ it('defines the v5 cluster management page and create cluster form', function ()
->toContain("method: 'DELETE'")
->toContain('Delete cluster')
->toContain('selectedCluster.serversCount === 0')
+ ->not->toContain("selectedCluster.serversCount === 1 ? 'server' : 'servers'")
->toContain('Only empty clusters can be deleted.')
->toContain('min-h-dvh overflow-y-auto bg-background text-foreground lg:h-dvh lg:overflow-hidden')
->toContain('flex min-h-dvh overflow-visible px-4 pt-16 lg:h-full lg:min-h-0 lg:overflow-hidden lg:px-6')