diff --git a/src/processors/processMails.ts b/src/processors/processMails.ts index ef7b260..f4eb812 100644 --- a/src/processors/processMails.ts +++ b/src/processors/processMails.ts @@ -64,14 +64,4 @@ const subjectBuilder = (alertType: T) : string => { default: return 'Alert: Threshold Exceeded'; } -}; - -/** - const data = { - cumulativeOrSpikeVal, - threshold, - component, - incidentTime, - alertType - }; - */ +}; \ No newline at end of file diff --git a/src/templ-generator/alerts/en/cumulativeAlert.html.twig b/src/templ-generator/alerts/en/cumulativeAlert.html.twig deleted file mode 100644 index e5111f7..0000000 --- a/src/templ-generator/alerts/en/cumulativeAlert.html.twig +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Reset Your Password on Fiole - - - - -
-
-

Reset Your Password

-
-
-

Hi {{username }},

-

We received a request to reset your password for your Fiole account. Please use the following OTP to reset your - password:

-
{{otp}}
-

This OTP is valid for the next {{ expiration }} minutes. Please do not share this OTP with anyone.

-

If you did not request a password reset, please ignore this email or contact our support team for assistance. -

-
- -
- - - \ No newline at end of file diff --git a/src/templ-generator/alerts/en/spikeAlert.html.twig b/src/templ-generator/alerts/en/spikeAlert.html.twig deleted file mode 100644 index e5111f7..0000000 --- a/src/templ-generator/alerts/en/spikeAlert.html.twig +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Reset Your Password on Fiole - - - - -
-
-

Reset Your Password

-
-
-

Hi {{username }},

-

We received a request to reset your password for your Fiole account. Please use the following OTP to reset your - password:

-
{{otp}}
-

This OTP is valid for the next {{ expiration }} minutes. Please do not share this OTP with anyone.

-

If you did not request a password reset, please ignore this email or contact our support team for assistance. -

-
- -
- - - \ No newline at end of file diff --git a/src/templ-generator/alerts/en/spikeOrCumulativeAlert.html.twig b/src/templ-generator/alerts/en/spikeOrCumulativeAlert.html.twig new file mode 100644 index 0000000..c5ba7e1 --- /dev/null +++ b/src/templ-generator/alerts/en/spikeOrCumulativeAlert.html.twig @@ -0,0 +1,75 @@ + + + + + Alert Notification + + + +
+
+

WatchdogCloud Alert

+
+
+

Dear recipient,

+

This is to notify you that the {{ component }} has exceeded the defined threshold.

+

Alert Type: {{ alertType }}

+

Component: {{ component }}

+

Value: {{ cumulativeOrSpikeVal }}

+

Threshold: {{ threshold }}

+

Incident Time: {{ incidentTime }}

+

Please take the necessary actions to resolve this issue.

+

Sent from WatchdogCloud.

+ Take Action +
+ +
+ + \ No newline at end of file diff --git a/src/templ-generator/alerts/index.ts b/src/templ-generator/alerts/index.ts index 7e987ee..be74f79 100644 --- a/src/templ-generator/alerts/index.ts +++ b/src/templ-generator/alerts/index.ts @@ -1,4 +1,5 @@ import Twig from 'twig'; +import LocaleEnum from '../../constants/locales-support'; // import fs from 'fs'; // require.extensions['.twig'] = function (module, filename) { @@ -90,7 +91,7 @@ const en = ` export default { - en: Twig.twig({ + [LocaleEnum.EN]: Twig.twig({ data: en, }), // more locales... diff --git a/src/templ-generator/forgotPass/index.ts b/src/templ-generator/forgotPass/index.ts index 7e987ee..be74f79 100644 --- a/src/templ-generator/forgotPass/index.ts +++ b/src/templ-generator/forgotPass/index.ts @@ -1,4 +1,5 @@ import Twig from 'twig'; +import LocaleEnum from '../../constants/locales-support'; // import fs from 'fs'; // require.extensions['.twig'] = function (module, filename) { @@ -90,7 +91,7 @@ const en = ` export default { - en: Twig.twig({ + [LocaleEnum.EN]: Twig.twig({ data: en, }), // more locales...