Show cert status

This commit is contained in:
Owen
2026-04-22 20:36:00 -07:00
parent 245755a140
commit fc69364feb
2 changed files with 48 additions and 25 deletions

View File

@@ -54,6 +54,7 @@ import { CaretSortIcon } from "@radix-ui/react-icons";
import { MachinesSelector } from "./machines-selector"; import { MachinesSelector } from "./machines-selector";
import DomainPicker from "@app/components/DomainPicker"; import DomainPicker from "@app/components/DomainPicker";
import { SwitchInput } from "@app/components/SwitchInput"; import { SwitchInput } from "@app/components/SwitchInput";
import CertificateStatus from "@app/components/CertificateStatus";
// --- Helpers (shared) --- // --- Helpers (shared) ---
@@ -1072,11 +1073,12 @@ export function InternalResourceForm({
}} }}
/> />
</div> </div>
<div className="flex items-start justify-between gap-4">
<FormField <FormField
control={form.control} control={form.control}
name="ssl" name="ssl"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem className="flex-1">
<FormControl> <FormControl>
<SwitchInput <SwitchInput
id="internal-resource-ssl" id="internal-resource-ssl"
@@ -1094,6 +1096,25 @@ export function InternalResourceForm({
</FormItem> </FormItem>
)} )}
/> />
{variant === "edit" &&
resource?.domainId &&
httpConfigFullDomain &&
form.watch("ssl") && (
<div className="flex items-center gap-1 pt-1">
<span className="text-sm font-medium text-muted-foreground">
{t("certificateStatus")}:
</span>
<CertificateStatus
orgId={resource.orgId}
domainId={resource.domainId}
fullDomain={httpConfigFullDomain}
autoFetch={true}
showLabel={false}
polling={true}
/>
</div>
)}
</div>
</div> </div>
) : ( ) : (
<div className="space-y-4"> <div className="space-y-4">

View File

@@ -30,7 +30,7 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
<AlertDescription> <AlertDescription>
{/* 4 cols because of the certs */} {/* 4 cols because of the certs */}
<InfoSections <InfoSections
cols={resource.http && env.flags.usePangolinDns ? 5 : 4} cols={resource.http ? 5 : 4}
> >
<InfoSection> <InfoSection>
<InfoSectionTitle>{t("identifier")}</InfoSectionTitle> <InfoSectionTitle>{t("identifier")}</InfoSectionTitle>
@@ -43,7 +43,10 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
<InfoSection> <InfoSection>
<InfoSectionTitle>URL</InfoSectionTitle> <InfoSectionTitle>URL</InfoSectionTitle>
<InfoSectionContent> <InfoSectionContent>
<CopyToClipboard text={fullUrl} isLink={true} /> <CopyToClipboard
text={fullUrl}
isLink={true}
/>
</InfoSectionContent> </InfoSectionContent>
</InfoSection> </InfoSection>
<InfoSection> <InfoSection>
@@ -133,8 +136,7 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
{/* Certificate Status Column */} {/* Certificate Status Column */}
{resource.http && {resource.http &&
resource.domainId && resource.domainId &&
resource.fullDomain && resource.fullDomain && (
env.flags.usePangolinDns && (
<InfoSection> <InfoSection>
<InfoSectionTitle> <InfoSectionTitle>
{t("certificateStatus", { {t("certificateStatus", {