diff --git a/emails/file-expiry.tsx b/emails/file-expiry.tsx new file mode 100644 index 0000000..1483538 --- /dev/null +++ b/emails/file-expiry.tsx @@ -0,0 +1,63 @@ +import { + Hr, + Link, + Section, + Text +} from "@react-email/components"; +import { z } from "zod"; +import { WATcloudEmail } from "./_common/watcloud-email"; + +const EmailProps = z.object({ + name: z.string(), + paths: z.array(z.string()), + daysForExpiry: z.string(), + deletionDate: z.string() +}); + +type EmailProps = z.infer; + +const Email = (props: EmailProps) => { + const { name, paths, daysForExpiry, deletionDate } = EmailProps.parse(props); + + const previewText = `Some of your files in the WATcloud compute cluster are expiring soon`; + + const expiredPaths = ( +
+ +
+ ); + + return ( + + Hi {name}, + + In an ongoing effort to keep WATcloud's file storage efficient and maintain optimal performance, we routinely clean up specific directories that haven't been accessed in the past {daysForExpiry} days. + +
+
+ The following paths are expired: + {expiredPaths} +
+
+ + If you do not access files in any of these directories, then they will be automatically deleted on {deletionDate}. + + + If you have any questions, please reach out to your WATcloud contact or the WATcloud team at infra-outreach@watonomous.ca. + +
+ ); +}; + +Email.PreviewProps = { + name: "John Doe", + paths: ["delta-ubuntu2:/var/lib/cluster/users/1234/docker", "delta-ubuntu2:/var/lib/cluster/users/1234/containers", "tr-ubuntu3:/var/lib/cluster/users/1234/containers", "/mnt/wato-drive2/someuser", "/mnt/wato-drive2/other"], + daysForExpiry: "70", + deletionDate: "2025-01-01" +} as EmailProps; + +export default Email; \ No newline at end of file