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 ConnectionStatusPartialEmail: EmailTemplate = props => { let { name, workspaceName, entityType, entityName, entityFrom, entityTo, incidentDetails, incidentStatus, incidentStartedAt, streamsFailed, recurringAlertsPeriodHours, detailsUrl, unsubscribeLink, } = props; if (!workspaceName?.toLowerCase().endsWith(" workspace")) { workspaceName += " workspace"; } return ( ⚠️ {capitalize(entityType)} job "{entityName}" has PARTIALLY failed in the {workspaceName}
⚠️ {capitalize(entityType)} job of the connection {entityName} has PARTIALLY failed
Hi {name || "there"}! The last job of the connection from {entityFrom} to {entityTo} has PARTIALLY failed in the {workspaceName}
{recurringAlertsPeriodHours ? ( No additional reports will be sent for this connection in {recurringAlertsPeriodHours} hours unless the status changes. ) : ( <> )}