import { EmailTemplate } from "@jitsu-internal/webapps-shared"; import { Body, Container, Html, Preview, Section, Text } from "@react-email/components"; import React from "react"; import dayjs from "dayjs"; import utc from "dayjs/plugin/utc"; import { main } from "./styles"; import { CheckJobStatusButton, Details, Footer, MetaList } from "./shared"; import capitalize from "lodash/capitalize"; import { ConnectionStatusNotificationProps } from "../pages/api/admin/notifications"; dayjs.extend(utc); export const ConnectionStatusOngoingEmail: EmailTemplate = props => { let { name, workspaceName, entityType, entityName, entityFrom, entityTo, tableName, incidentDetails, incidentStatus, incidentStartedAt, queueSize, streamsFailed, recurringAlertsPeriodHours, detailsUrl, unsubscribeLink, } = props; if (!workspaceName?.toLowerCase().endsWith(" workspace")) { workspaceName += " workspace"; } const partial = incidentStatus === "PARTIAL" || incidentStatus === "TIME_EXCEEDED"; return ( {partial ? "⚠️" : "🚨"} Ongoing {entityType} processing issues with "{entityName}" in the {workspaceName}
{partial ? "⚠️" : "🚨"} Ongoing {entityType} processing issues with the connection {entityName}
Hi {name || "there"}! {capitalize(entityType)} processing issues persist with the connection from {entityFrom} to{" "} {entityTo} in the {workspaceName}
{recurringAlertsPeriodHours && ( No additional reports will be sent for this connection in {recurringAlertsPeriodHours} hours unless the status changes. )}