minor adjustments to blueprints screens

This commit is contained in:
miloschwartz
2025-11-08 14:15:36 -08:00
parent a776b2ea94
commit 5f11630e27
3 changed files with 57 additions and 64 deletions

View File

@@ -1165,13 +1165,13 @@
"sidebarDomains": "Domains", "sidebarDomains": "Domains",
"sidebarBluePrints": "Blueprints", "sidebarBluePrints": "Blueprints",
"blueprints": "Blueprints", "blueprints": "Blueprints",
"blueprintsDescription": "Blueprints are declarative YAML configurations that define your resources and their settings", "blueprintsDescription": "Apply declarative configurations and view previous runs",
"blueprintAdd": "Add Blueprint", "blueprintAdd": "Add Blueprint",
"blueprintGoBack": "See all Blueprints", "blueprintGoBack": "See all Blueprints",
"blueprintCreate": "Create Blueprint", "blueprintCreate": "Create Blueprint",
"blueprintCreateDescription2": "Follow the steps below to create and apply a new blueprint", "blueprintCreateDescription2": "Follow the steps below to create and apply a new blueprint",
"blueprintDetails": "Blueprint details", "blueprintDetails": "Blueprint Details",
"blueprintDetailsDescription": "See the blueprint run details", "blueprintDetailsDescription": "See the result of the applied blueprint and any errors that occurred",
"blueprintInfo": "Blueprint Information", "blueprintInfo": "Blueprint Information",
"message": "Message", "message": "Message",
"blueprintContentsDescription": "Define the YAML content describing your infrastructure", "blueprintContentsDescription": "Define the YAML content describing your infrastructure",
@@ -1181,7 +1181,7 @@
"appliedAt": "Applied At", "appliedAt": "Applied At",
"source": "Source", "source": "Source",
"contents": "Contents", "contents": "Contents",
"parsedContents": "Parsed Contents", "parsedContents": "Parsed Contents (Read Only)",
"enableDockerSocket": "Enable Docker Blueprint", "enableDockerSocket": "Enable Docker Blueprint",
"enableDockerSocketDescription": "Enable Docker Socket label scraping for blueprint labels. Socket path must be provided to Newt.", "enableDockerSocketDescription": "Enable Docker Socket label scraping for blueprint labels. Socket path must be provided to Newt.",
"enableDockerSocketLink": "Learn More", "enableDockerSocketLink": "Learn More",

View File

@@ -54,22 +54,7 @@ export default function BlueprintDetailsForm({
<div className="flex flex-col gap-6"> <div className="flex flex-col gap-6">
<Alert> <Alert>
<AlertDescription> <AlertDescription>
<InfoSections cols={2}> <InfoSections cols={3}>
<InfoSection>
<InfoSectionTitle>
{t("appliedAt")}
</InfoSectionTitle>
<InfoSectionContent>
<time
className="text-muted-foreground"
dateTime={blueprint.createdAt.toString()}
>
{new Date(
blueprint.createdAt * 1000
).toLocaleString()}
</time>
</InfoSectionContent>
</InfoSection>
<InfoSection> <InfoSection>
<InfoSectionTitle> <InfoSectionTitle>
{t("status")} {t("status")}
@@ -88,16 +73,6 @@ export default function BlueprintDetailsForm({
)} )}
</InfoSectionContent> </InfoSectionContent>
</InfoSection> </InfoSection>
<InfoSection>
<InfoSectionTitle>
{t("message")}
</InfoSectionTitle>
<InfoSectionContent>
<p className="text-muted-foreground">
{blueprint.message}
</p>
</InfoSectionContent>
</InfoSection>
<InfoSection> <InfoSection>
<InfoSectionTitle> <InfoSectionTitle>
{t("source")} {t("source")}
@@ -106,35 +81,59 @@ export default function BlueprintDetailsForm({
{blueprint.source === "API" && ( {blueprint.source === "API" && (
<Badge <Badge
variant="secondary" variant="secondary"
className="-mx-2" className="inline-flex items-center gap-1 "
> >
<span className="inline-flex items-center gap-1 "> API
API <Webhook className="w-3 h-3 flex-none" />
<Webhook className="size-4 flex-none" />
</span>
</Badge> </Badge>
)} )}
{blueprint.source === "NEWT" && ( {blueprint.source === "NEWT" && (
<Badge variant="secondary"> <Badge
<span className="inline-flex items-center gap-1 "> variant="secondary"
Newt CLI className="inline-flex items-center gap-1 "
<Terminal className="size-4 flex-none" /> >
</span> <Terminal className="w-3 h-3 flex-none" />
Newt CLI
</Badge> </Badge>
)} )}
{blueprint.source === "UI" && ( {blueprint.source === "UI" && (
<Badge <Badge
variant="secondary" variant="secondary"
className="-mx-1 py-1" className="inline-flex items-center gap-1 "
> >
<span className="inline-flex items-center gap-1 "> <Globe className="w-3 h-3 flex-none" />
Dashboard{" "} Dashboard
<Globe className="size-4 flex-none" />
</span>
</Badge> </Badge>
)}{" "} )}{" "}
</InfoSectionContent> </InfoSectionContent>
</InfoSection> </InfoSection>
<InfoSection>
<InfoSectionTitle>
{t("appliedAt")}
</InfoSectionTitle>
<InfoSectionContent>
<time
className="text-muted-foreground"
dateTime={blueprint.createdAt.toString()}
>
{new Date(
blueprint.createdAt * 1000
).toLocaleString()}
</time>
</InfoSectionContent>
</InfoSection>
{blueprint.message && (
<InfoSection>
<InfoSectionTitle>
{t("message")}
</InfoSectionTitle>
<InfoSectionContent>
<p className="text-muted-foreground">
{blueprint.message}
</p>
</InfoSectionContent>
</InfoSection>
)}
</InfoSections> </InfoSections>
</AlertDescription> </AlertDescription>
</Alert> </Alert>
@@ -169,11 +168,6 @@ export default function BlueprintDetailsForm({
<FormLabel> <FormLabel>
{t("parsedContents")} {t("parsedContents")}
</FormLabel> </FormLabel>
<FormDescription>
{t(
"blueprintContentsDescription"
)}
</FormDescription>
<FormControl> <FormControl>
<div <div
className={cn( className={cn(

View File

@@ -116,10 +116,13 @@ export default function BlueprintsTable({ blueprints, orgId }: Props) {
} }
case "UI": { case "UI": {
return ( return (
<Badge variant="secondary"> <Badge
variant="secondary"
className="inline-flex items-center gap-1"
>
<span className="inline-flex items-center gap-1 "> <span className="inline-flex items-center gap-1 ">
Dashboard{" "} <Globe className="w-3 h-3" />
<Globe className="size-4 flex-none" /> Dashboard
</span> </span>
</Badge> </Badge>
); );
@@ -163,18 +166,14 @@ export default function BlueprintsTable({ blueprints, orgId }: Props) {
cell: ({ row }) => { cell: ({ row }) => {
return ( return (
<div className="flex justify-end"> <div className="flex justify-end">
<Button <Link
variant="outline" href={`/${orgId}/settings/blueprints/${row.original.blueprintId}`}
className="items-center"
asChild
> >
<Link <Button variant="outline" className="items-center">
href={`/${orgId}/settings/blueprints/${row.original.blueprintId}`} View Details
> <ArrowRight className="ml-2 w-4 h-4" />
View details{" "} </Button>
<ArrowRight className="size-4 flex-none" /> </Link>
</Link>
</Button>
</div> </div>
); );
} }