mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-02 01:15:31 +00:00
Co-authored-by: Alan Buscaglia <alanbuscaglia@MacBook-Pro.local> Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com> Co-authored-by: César Arroba <cesar@prowler.com> Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com>
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import { Divider } from "@heroui/divider";
|
|
import { Tooltip } from "@heroui/tooltip";
|
|
|
|
import { DateWithTime, EntityInfoShort } from "@/components/ui/entities";
|
|
import { ProviderType } from "@/types";
|
|
|
|
interface ComplianceScanInfoProps {
|
|
scan: {
|
|
providerInfo: {
|
|
provider: ProviderType;
|
|
alias?: string;
|
|
uid?: string;
|
|
};
|
|
attributes: {
|
|
name?: string;
|
|
completed_at: string;
|
|
};
|
|
};
|
|
}
|
|
|
|
export const ComplianceScanInfo = ({ scan }: ComplianceScanInfoProps) => {
|
|
return (
|
|
<div className="flex items-center gap-2">
|
|
<EntityInfoShort
|
|
cloudProvider={scan.providerInfo.provider}
|
|
entityAlias={scan.providerInfo.alias}
|
|
entityId={scan.providerInfo.uid}
|
|
hideCopyButton
|
|
snippetWidth="max-w-[100px]"
|
|
/>
|
|
<Divider orientation="vertical" className="h-6" />
|
|
<div className="flex flex-col items-start whitespace-nowrap">
|
|
<Tooltip
|
|
content={scan.attributes.name || "- -"}
|
|
placement="top"
|
|
size="sm"
|
|
>
|
|
<p className="text-default-500 text-xs">
|
|
{scan.attributes.name || "- -"}
|
|
</p>
|
|
</Tooltip>
|
|
<DateWithTime inline dateTime={scan.attributes.completed_at} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|