summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJonathan <jonfritz@gmail.com>2018-02-07 09:02:46 -0500
committerGitHub <noreply@github.com>2018-02-07 09:02:46 -0500
commitd3e934d07ac0a58a24a435ea7c5b3bd222ef509a (patch)
treeb356b134878ee8686326475b04c90317e195bf86 /templates
parentb2ee5077931013d308aaf60d790d341e2cb0c3e3 (diff)
downloadchat-d3e934d07ac0a58a24a435ea7c5b3bd222ef509a.tar.gz
chat-d3e934d07ac0a58a24a435ea7c5b3bd222ef509a.tar.bz2
chat-d3e934d07ac0a58a24a435ea7c5b3bd222ef509a.zip
XYZ-35: Added Support for GlobalRelay Compliance Export Format
* Added username to ChannelMemberHistory struct in anticipation of supporting GlobalRelay in Compliance Export * Removed translation from debug output - this makes it complicated to use utils functions from tests in the enterprise repo * Added an advanced email function that allows for greater control over message details. Updated MessageExport config to support GlobalRelay. Added attachment support to InBucket unit tests * Moving templates in from enterprise to solve test issues * Added export format to diagnostics * Changed email attachment code to use FileBackend so that S3 storage is properly supported
Diffstat (limited to 'templates')
-rw-r--r--templates/globalrelay_compliance_export.html91
-rw-r--r--templates/globalrelay_compliance_export_message.html8
-rw-r--r--templates/globalrelay_compliance_export_participant_row.html10
3 files changed, 109 insertions, 0 deletions
diff --git a/templates/globalrelay_compliance_export.html b/templates/globalrelay_compliance_export.html
new file mode 100644
index 000000000..91028d11c
--- /dev/null
+++ b/templates/globalrelay_compliance_export.html
@@ -0,0 +1,91 @@
+{{define "globalrelay_compliance_export"}}
+<style type="text/css">
+ body {
+ font-family:Arial, sans-serif;
+ font-size:14px;
+ font-weight:normal;
+ }
+
+ .summary-list ul {
+ padding: 0px;
+ list-style:none;
+ }
+ .summary-list li {
+ display: inline;
+ padding: 0 1em 0 0;
+ }
+ .summary-list .bold {
+ font-weight: bold;
+ }
+
+ .participants {
+ border-collapse:collapse;
+ border-spacing:0;
+ }
+ .participants td {
+ padding:10px 5px;
+ border:1px solid black;
+ overflow:hidden;
+ text-align: center;
+ word-break:normal;
+ }
+ .participants th {
+ padding:10px 5px;
+ border:1px solid black;
+ overflow:hidden;
+ word-break:normal;
+ }
+ .participants th,td {
+ vertical-align:top
+ }
+
+ .message-list ul {
+ list-style:none;
+ padding: 0;
+ }
+ .message-list li {
+ padding: 0 0 1em 0;
+ }
+ .message .sent_time {
+ font-weight:bold;
+ }
+ .message .username {
+ font-weight:bold;
+ }
+ .message .email {
+ font-weight: bold;
+ }
+</style>
+
+<h1>Mattermost Compliance Export</h1>
+
+<h2>Conversation Summary</h2>
+<div class="summary-list">
+ <ul>
+ <li><span class="bold">Channel:&nbsp;</span>{{.Props.ChannelName}}</li>
+ <li><span class="bold">Started:&nbsp;</span>{{.Props.Started}}</li>
+ <li><span class="bold">Ended:&nbsp;</span>{{.Props.Ended}}</li>
+ <li><span class="bold">Duration:&nbsp;</span>{{.Props.Duration}}&nbsp;Minutes</li>
+ </ul>
+</div>
+<table class="participants">
+ <tr>
+ <th class="username">Username<br></th>
+ <th class="email">Email</th>
+ <th class="joined">Joined</th>
+ <th class="left">Left</th>
+ <th class="duration">Duration</th>
+ <th class="messages">Messages</th>
+ </tr>
+ {{.Props.ParticipantRows}}
+</table>
+
+<h2>Messages</h2>
+<div class="message-list">
+ <ul>
+ {{.Props.Messages}}
+ </ul>
+</div>
+
+<p>Exported on {{.Props.ExportDate}}</p>
+{{end}} \ No newline at end of file
diff --git a/templates/globalrelay_compliance_export_message.html b/templates/globalrelay_compliance_export_message.html
new file mode 100644
index 000000000..3a47b29b7
--- /dev/null
+++ b/templates/globalrelay_compliance_export_message.html
@@ -0,0 +1,8 @@
+{{define "globalrelay_compliance_export_message"}}
+<li class="message">
+ <span class="sent_time">{{.Props.SentTime}}</span>
+ <span class="username">@{{.Props.Username}}</span>
+ <span class="email">({{.Props.Email}}):</span>
+ <span class="message">{{.Props.Message}}</span>
+</li>
+{{end}}
diff --git a/templates/globalrelay_compliance_export_participant_row.html b/templates/globalrelay_compliance_export_participant_row.html
new file mode 100644
index 000000000..7a61e23eb
--- /dev/null
+++ b/templates/globalrelay_compliance_export_participant_row.html
@@ -0,0 +1,10 @@
+{{define "globalrelay_compliance_export_participant_row"}}
+<tr>
+ <td class="username">@{{.Props.Username}}</td>
+ <td class="email">{{.Props.Email}}</td>
+ <td class="joined">{{.Props.Joined}}</td>
+ <td class="left">{{.Props.Left}}</td>
+ <td class="duration">{{.Props.DurationMinutes}} Minutes</td>
+ <td class="messages">{{.Props.NumMessages}}</td>
+</tr>
+{{end}} \ No newline at end of file