-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from TeskaLabs/Enhancement/Beautify-md-output
Beautify markdown to html output
- Loading branch information
Showing
5 changed files
with
176 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>TeskaLabs LogMan.io</title> | ||
<style> | ||
body { | ||
font-family: 'Arial', sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f4f4f4; /* Background color of the entire page */ | ||
} | ||
.content { | ||
background-color: #ffffff; /* Background color of the content area */ | ||
color: #333333; /* Text color for the content */ | ||
padding: 20px; | ||
margin: 20px; | ||
border-radius: 5px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
} | ||
footer { | ||
background-color: #f6f6f6; /* Light grey background for the footer */ | ||
color: #333333; /* Text color for the footer */ | ||
text-align: center; | ||
padding: 20px; | ||
font-size: 14px; | ||
} | ||
footer .footer-title { | ||
font-size: 16px; /* Slightly larger font size for the title */ | ||
font-weight: normal; /* Normal font weight for the title */ | ||
} | ||
footer p { | ||
margin: 0; /* Remove margin from paragraphs in the footer for tighter spacing */ | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="content"> | ||
<h1>TeskaLabs LogMan.io</h1> <!-- Displaying TeskaLabs LogMan.io as page content title --> | ||
{{ content }} | ||
</div> | ||
<footer> | ||
<p class="footer-title">TeskaLabs LogMan.io</p> | ||
<p>Stay safe and secure,<br> | ||
PS: TeskaLabs LogMan.io is proudly made with love and innovation by the TeskaLabs team.<br> | ||
Thank you for choosing us as your trusted partner in cyber security.</p> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
1) Configure proper SMTP server for a test | ||
2) Replace `[email protected]` by the valid email address that you have access into | ||
|
||
## TSM001: Send an email using Markdown template(Subject should be taken from md file) | ||
## TSM001A: Send an email using Markdown template(Subject should be taken from md file) | ||
|
||
`PUT /send_mail` | ||
|
||
|
@@ -21,6 +21,58 @@ | |
} | ||
``` | ||
|
||
## TSM001B: Send an email using Markdown template(Subject should be taken from md file) with html wrapper | ||
|
||
`PUT /send_mail` | ||
|
||
``` | ||
{ | ||
"to": ["[email protected]"], | ||
"body": { | ||
"template": "/Templates/Email/message.md", | ||
"wrapper": "/Templates/Email/body_wrapper.html", | ||
"params":{ | ||
"name":"Iris" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## TSM001C: Send an email using Markdown template with html wrapper from incorrect path. | ||
|
||
`PUT /send_mail` | ||
|
||
``` | ||
{ | ||
"to": ["[email protected]"], | ||
"body": { | ||
"template": "/Templates/Email/message.md", | ||
"wrapper": "/Templates/Emails/body_wrapper.html", | ||
"params":{ | ||
"name":"Iris" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## TSM001D: Send an email using Markdown template with html wrapper from a template that does not exist. | ||
|
||
`PUT /send_mail` | ||
|
||
``` | ||
{ | ||
"to": ["[email protected]"], | ||
"body": { | ||
"template": "/Templates/Email/message.md", | ||
"wrapper": "/Templates/Email/body_wrapper.md", | ||
"params":{ | ||
"name":"Iris" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
|
||
|
||
## TSM002: Send an email using HTML template | ||
|
||
|
@@ -1344,3 +1396,61 @@ EXPECTED RESPONSE: | |
} | ||
} | ||
``` | ||
|
||
|
||
## TSM033: Kakka handler | ||
|
||
`EMAIL` | ||
|
||
``` | ||
{"type":"email", "to": ["Shivashankar <[email protected]>"], "from": "[email protected]", "body":{"template":"/Templates/Email/message.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
{"type":"email", "to": ["Shivashankar <[email protected]>"], "from": "[email protected]", "body":{"template":"/Templates/Export.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Missing from' | ||
{"type":"email", "to": ["Shivashankar <[email protected]>"], "body":{"template":"/Templates/Email/message.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Bad template path' | ||
{"type":"email", "to": ["Shivashankar <[email protected]>"], "body":{"template":"/Templates/Emails/message.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Access non existant template' | ||
{"type":"email", "to": ["Shivashankar <[email protected]>"], "body":{"template":"/Templates/Email/message22.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
``` | ||
|
||
`SLACK` | ||
|
||
``` | ||
{"type":"slack", "body":{"template":"/Templates/Slack/Slack example.txt", "params":{"name": "I am testing a template", "error": "None" }}} | ||
{"type":"slack", "body":{"template":"/Templates/Slack/Slack example.txt", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Bad template path' | ||
{"type":"slack", "body":{"template":"/Templates/SlackS/message.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Access non existant template' | ||
{"type":"slack", "body":{"template":"/Templates/Slack/message.md2", "params":{"name": "I am testing a template", "error": "None" }}} | ||
``` | ||
|
||
`MSTEAMS` | ||
|
||
``` | ||
{"type":"msteams", "body":{"template":"/Templates/MSTeams/Slack example.txt", "params":{"name": "I am testing a template", "error": "None" }}} | ||
{"type":"msteams", "body":{"template":"/Templates/MSTeams/Slack example.txt", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Bad template path' | ||
{"type":"msteams", "body":{"template":"/Templates/MSTeamss/message.md", "params":{"name": "I am testing a template", "error": "None" }}} | ||
'Access non existant template' | ||
{"type":"msteams", "body":{"template":"/Templates/MSTeams/message.md2", "params":{"name": "I am testing a template", "error": "None" }}} | ||
``` | ||
|
||
|
||
`UNSUPPORTED-TYPE` | ||
|
||
``` | ||
{"type":"sms", "body":{"template":"/Templates/MSTeams/Slack example.txt", "params":{"name": "I am testing a template", "error": "None" }}} | ||
``` |