mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
UI cleanup for cert auth list header and list item descriptions (#27378)
This commit is contained in:
parent
92dd9a7deb
commit
735328c1e7
2 changed files with 15 additions and 1 deletions
|
|
@ -12,4 +12,8 @@
|
|||
display: flex;
|
||||
gap: $pad-small;
|
||||
}
|
||||
|
||||
&__add-button {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,16 @@ const Actions = ({ onEdit, onDelete }: IActionsProps) => {
|
|||
);
|
||||
};
|
||||
|
||||
const generateCertDetails = (certId: string) => {
|
||||
if (certId.includes("ndes")) {
|
||||
return "Microsoft Network Device Enrollment Service (NDES)";
|
||||
} else if (certId.includes("digicert")) {
|
||||
return "DigiCert";
|
||||
}
|
||||
|
||||
return "Custom Simple Certificate Enrollment Protocol (SCEP)";
|
||||
};
|
||||
|
||||
interface ICertAuthorityListItemProps {
|
||||
cert: ICertAuthorityListData;
|
||||
onClickEdit: () => void;
|
||||
|
|
@ -63,7 +73,7 @@ const CertAuthorityListItem = ({
|
|||
className={baseClass}
|
||||
graphic="file-certificate"
|
||||
title={cert.name}
|
||||
details={cert.name}
|
||||
details={generateCertDetails(cert.id)}
|
||||
actions={<Actions onEdit={onClickEdit} onDelete={onClickDelete} />}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue