template files for review
This commit is contained in:
1 parent
8cc83a4422
commit
0781d3984c
7 files changed
+2189
-11
No files matched your search
Generated
+1872
-11
File diff suppressed because it is too large.
Load diff
@@ -25,6 +25,7 @@
|
|||||||
"dayjs": "1.11.11",
|
"dayjs": "1.11.11",
|
||||||
"joi": "17.13.1",
|
"joi": "17.13.1",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
|
"mjml-react": "^2.0.8",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-redux": "9.1.2",
|
"react-redux": "9.1.2",
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ import Details from "./Pages/Details";
|
|||||||
import Maintenance from "./Pages/Maintenance";
|
import Maintenance from "./Pages/Maintenance";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
import { ToastContainer } from "react-toastify";
|
import { ToastContainer } from "react-toastify";
|
||||||
|
import WelcomeEmail from "./Templates/WelcomeEmail";
|
||||||
|
import ServerIsUp from "./Templates/ServerIsUp";
|
||||||
|
import ServerIsDown from "./Templates/ServerIsDown";
|
||||||
|
import PasswordReset from "./Templates/PasswordReset";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const PasswordReset = () => {
|
||||||
|
const { html, errors } = render(
|
||||||
|
<mjml>
|
||||||
|
<mj-head>
|
||||||
|
<mj-font
|
||||||
|
name="Roboto"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Roboto:300,500"
|
||||||
|
></mj-font>
|
||||||
|
<mj-attributes>
|
||||||
|
<mj-all font-family="Roboto, Helvetica, sans-serif"></mj-all>
|
||||||
|
<mj-text
|
||||||
|
font-weight="300"
|
||||||
|
font-size="16px"
|
||||||
|
color="#616161"
|
||||||
|
line-height="24px"
|
||||||
|
></mj-text>
|
||||||
|
<mj-section padding="0px"></mj-section>
|
||||||
|
</mj-attributes>
|
||||||
|
</mj-head>
|
||||||
|
<mj-body>
|
||||||
|
<mj-section padding="20px 0">
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text align="left" font-size="10px">
|
||||||
|
Message from BlueWave Uptime Service
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
<mj-section>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text>
|
||||||
|
<p>Hello Alex!</p>
|
||||||
|
<p>
|
||||||
|
You are receiving this email because a password reset request
|
||||||
|
has been made for gorkem.cetin@bluewavelabs.ca. Please use the
|
||||||
|
code below on the site to reset your password.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Verification Code: <b>4CCDFC45</b>
|
||||||
|
</p>
|
||||||
|
<p>If you didn't request this, please ignore this email.</p>
|
||||||
|
|
||||||
|
<p>Thank you.</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-divider border-width="1px" border-color="#E0E0E0"></mj-divider>
|
||||||
|
<mj-text font-size="12px">
|
||||||
|
<p>This email was sent by BlueWave Uptime.</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
</mj-body>
|
||||||
|
</mjml>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (errors.length > 0) {
|
||||||
|
console.error("MJML Errors:", errors);
|
||||||
|
return null; // Handle errors gracefully
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div dangerouslySetInnerHTML={{ __html: html }} />;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PasswordReset;
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const ServerIsDown = () => {
|
||||||
|
const { html, errors } = render(
|
||||||
|
<mjml>
|
||||||
|
<mj-head>
|
||||||
|
<mj-font
|
||||||
|
name="Roboto"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Roboto:300,500"
|
||||||
|
></mj-font>
|
||||||
|
<mj-attributes>
|
||||||
|
<mj-all font-family="Roboto, Helvetica, sans-serif"></mj-all>
|
||||||
|
<mj-text
|
||||||
|
font-weight="300"
|
||||||
|
font-size="16px"
|
||||||
|
color="#616161"
|
||||||
|
line-height="24px"
|
||||||
|
></mj-text>
|
||||||
|
<mj-section padding="0px"></mj-section>
|
||||||
|
</mj-attributes>
|
||||||
|
</mj-head>
|
||||||
|
<mj-body>
|
||||||
|
<mj-section padding="20px 0">
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text align="left" font-size="10px">
|
||||||
|
Message from BlueWave Uptime Service
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
<mj-column width="45%" padding-top="20px">
|
||||||
|
<mj-text
|
||||||
|
align="center"
|
||||||
|
font-weight="500"
|
||||||
|
padding="0px"
|
||||||
|
font-size="18px"
|
||||||
|
color="red"
|
||||||
|
>
|
||||||
|
Google.com is down
|
||||||
|
</mj-text>
|
||||||
|
<mj-divider border-width="2px" border-color="#616161"></mj-divider>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
<mj-section>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text>
|
||||||
|
<p>Hello Alex!</p>
|
||||||
|
<p>
|
||||||
|
{" "}
|
||||||
|
We detected an incident on one of your monitors. Your service is
|
||||||
|
currently down. We'll send a message to you once it is up again.{" "}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Monitor name:</b> Google.com
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>URL:</b> https://google.com
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Problem:</b> Connection timeout
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Start date:</b> Jun 8, 2024 8:15pm
|
||||||
|
</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-divider border-width="1px" border-color="#E0E0E0"></mj-divider>
|
||||||
|
<mj-button background-color="#1570EF">
|
||||||
|
View incident details
|
||||||
|
</mj-button>
|
||||||
|
<mj-text font-size="12px">
|
||||||
|
<p>This email was sent by BlueWave Uptime.</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
</mj-body>
|
||||||
|
</mjml>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (errors.length > 0) {
|
||||||
|
console.error("MJML Errors:", errors);
|
||||||
|
return null; // Handle errors gracefully
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div dangerouslySetInnerHTML={{ __html: html }} />;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ServerIsDown;
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const ServerIsUp = () => {
|
||||||
|
const { html, errors } = render(
|
||||||
|
<mjml>
|
||||||
|
<mj-head>
|
||||||
|
<mj-font
|
||||||
|
name="Roboto"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Roboto:300,500"
|
||||||
|
></mj-font>
|
||||||
|
<mj-attributes>
|
||||||
|
<mj-all font-family="Roboto, Helvetica, sans-serif"></mj-all>
|
||||||
|
<mj-text
|
||||||
|
font-weight="300"
|
||||||
|
font-size="16px"
|
||||||
|
color="#616161"
|
||||||
|
line-height="24px"
|
||||||
|
></mj-text>
|
||||||
|
<mj-section padding="0px"></mj-section>
|
||||||
|
</mj-attributes>
|
||||||
|
</mj-head>
|
||||||
|
<mj-body>
|
||||||
|
<mj-section padding="20px 0">
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text align="left" font-size="10px">
|
||||||
|
Message from BlueWave Uptime Service
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
<mj-column width="45%" padding-top="20px">
|
||||||
|
<mj-text
|
||||||
|
align="center"
|
||||||
|
font-weight="500"
|
||||||
|
padding="0px"
|
||||||
|
font-size="18px"
|
||||||
|
color="green"
|
||||||
|
>
|
||||||
|
Google.com is up
|
||||||
|
</mj-text>
|
||||||
|
<mj-divider border-width="2px" border-color="#616161"></mj-divider>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
<mj-section>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text>
|
||||||
|
<p>Hello Alex!</p>
|
||||||
|
<p>
|
||||||
|
{" "}
|
||||||
|
Your latest incident is resolved and your monitored service is
|
||||||
|
up again.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Monitor name:</b> Google.com
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>URL:</b> https://google.com
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Problem:</b> Connection timeout
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Start date:</b> Jun 8, 2024 8:15pm
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Resolved date:</b> Jun 8, 2024 8:15pm
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Duration:</b>3 minutes and 15 seconds
|
||||||
|
</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-divider border-width="1px" border-color="#E0E0E0"></mj-divider>
|
||||||
|
<mj-button background-color="#1570EF">
|
||||||
|
View incident details
|
||||||
|
</mj-button>
|
||||||
|
<mj-text font-size="12px">
|
||||||
|
<p>This email was sent by BlueWave Uptime.</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
</mj-body>
|
||||||
|
</mjml>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (errors.length > 0) {
|
||||||
|
console.error("MJML Errors:", errors);
|
||||||
|
return null; // Handle errors gracefully
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div dangerouslySetInnerHTML={{ __html: html }} />;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ServerIsUp;
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const WelcomeEmail = () => {
|
||||||
|
const { html, errors } = render(
|
||||||
|
<mjml>
|
||||||
|
<mj-head>
|
||||||
|
<mj-font
|
||||||
|
name="Roboto"
|
||||||
|
href="https://fonts.googleapis.com/css?family=Roboto:300,500"
|
||||||
|
></mj-font>
|
||||||
|
<mj-attributes>
|
||||||
|
<mj-all font-family="Roboto, Helvetica, sans-serif"></mj-all>
|
||||||
|
<mj-text
|
||||||
|
font-weight="300"
|
||||||
|
font-size="16px"
|
||||||
|
color="#616161"
|
||||||
|
line-height="24px"
|
||||||
|
></mj-text>
|
||||||
|
<mj-section padding="0px"></mj-section>
|
||||||
|
</mj-attributes>
|
||||||
|
</mj-head>
|
||||||
|
<mj-body>
|
||||||
|
<mj-section padding="20px 0">
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text align="left" font-size="10px">
|
||||||
|
Message from BlueWave Uptime Service
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
<mj-section>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-text>
|
||||||
|
<p>Hello Alex!</p>
|
||||||
|
<p>
|
||||||
|
Thank you for trying out BlueWave Uptime! We developed it with
|
||||||
|
great care to meet our own needs, and we're excited to share it
|
||||||
|
with you.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
BlueWave Uptime is an automated way of checking whether a
|
||||||
|
service such as a website or an application is available or not.
|
||||||
|
</p>
|
||||||
|
<p>We hope you find our service as valuable as we do.</p>
|
||||||
|
<p>Thank you.</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
<mj-column width="100%">
|
||||||
|
<mj-divider border-width="1px" border-color="#E0E0E0"></mj-divider>
|
||||||
|
<mj-text font-size="12px">
|
||||||
|
<p>This email was sent by BlueWave Uptime.</p>
|
||||||
|
</mj-text>
|
||||||
|
</mj-column>
|
||||||
|
</mj-section>
|
||||||
|
</mj-body>
|
||||||
|
</mjml>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (errors.length > 0) {
|
||||||
|
console.error("MJML Errors:", errors);
|
||||||
|
return null; // Handle errors gracefully
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div dangerouslySetInnerHTML={{ __html: html }} />;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default WelcomeEmail;
|
||||||
Reference in new issue
Block a user