Skip to content

Commit

Permalink
feat(failed-task-alert): Make failed reload task email look the same …
Browse files Browse the repository at this point in the history
…as QS Cloud ditto

Implements ptarmiganlabs#1237
  • Loading branch information
Göran Sander committed Oct 1, 2024
1 parent c3c3ede commit c163ad4
Show file tree
Hide file tree
Showing 4 changed files with 364 additions and 342 deletions.
182 changes: 182 additions & 0 deletions src/config/email_templates/aborted-reload-qseow.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<h1>Qlik Sense reload task aborted</h1>
<p>


<table></table>
<tbody>
<tr>
<td style="padding-right: 20px;">
<strong>Task name</strong><br>
{{taskName}}
</td>
<td style="padding-left: 20px;">
<strong>Task ID</strong><br>
{{taskId}}
</td>
</tr>
<tr>
<td style="padding-right: 20px;">
<strong>App name</strong><br>
{{appName}}
</td>
<td style="padding-left: 20px;">
<strong>App ID</strong><br>
{{appId}}
</td>
</tr>
<tr>
<td style="padding-right: 20px;">
<strong>App description</strong><br>
{{appDescription}}
</td>
<td style="padding-left: 20px;">
<strong>Link to app</strong><br>
{{appUrl}}
</td>
</tr>
<tr>
<td style="padding-right: 20px;">
<strong>App owner</strong><br>
{{appOwnerName}}
</td>
<td style="padding-left: 20px;">
<strong>App owner email</strong><br>
{{appOwnerEmail}}
</td>
</tr>
<tr>
<td style="padding-right: 20px;">
<strong>App owner user</strong><br>
{{appOwnerUserDirectory}}/{{appOwnerUserId}}
</td>
<td style="padding-left: 20px;">
</td>
</tr>

<tr>
<td colspan="2"><hr></td>
</tr>

<tr>
<td style="padding-right: 20px;">
<strong>Task started</strong><br>
{{executionStartTime.startTimeLocal1}}
</td>
<td style="padding-left: 20px;">
<strong>Task ended</strong><br>
{{executionStopTime.stopTimeLocal1}}
</td>
</tr>
<tr>
<td style="padding-right: 20px;">
<strong>Duration</strong><br>
{{executionDuration.hours}} hours, {{executionDuration.minutes}} minutes, {{executionDuration.seconds}} seconds
</td>
<td style="padding-left: 20px;">
<strong>Reload on node</strong><br>
{{executingNodeName}}
</td>
</tr>
<tr>
<td style="padding-right: 20px;">
<strong>User starting reload task</strong><br>
{{user}}
</td>
<td style="padding-left: 20px;">
<strong></strong><br>
</td>
</tr>


<tr>
<td colspan="2"><hr></td>
</tr>

<tr>
<td style="padding-right: 20px;">
<strong>Execution result</strong><br>
{{executionStatusText}}
</td>
<td style="padding-left: 20px;">
<strong>Execution result code</strong><br>
{{executionStatusNum}}
</td>
</tr>

<tr>
<td style="padding-right: 20px;">
<strong>Log timestamp</strong><br>
{{logTimeStamp}}
</td>
<td style="padding-right: 20px;">
<strong>Log message</strong><br>
{{logMessage}}
</td>
</tr>

<tr>
<td colspan="2"><br></td>
</tr>

<tr>
<td colspan="2">
<a href="{{qlikSenseQMC}}" style="display: inline-block; padding: 10px 20px; font-size: 16px; color: black; background-color: #00b140; text-align: center; text-decoration: none; border-radius: 5px; margin: 5px;">Qlik Sense QMC</a>
<a href="{{qlikSenseHub}}" style="display: inline-block; padding: 10px 20px; font-size: 16px; color: black; background-color: #00b140; text-align: center; text-decoration: none; border-radius: 5px; margin: 5px;">Qlik Sense Hub</a>
<a href="{{appUrl}}" style="display: inline-block; padding: 10px 20px; font-size: 16px; color: black; background-color: #00b140; text-align: center; text-decoration: none; border-radius: 5px; margin: 5px;">Open app</a>
</td>
</tr>

<tr>
<td colspan="2"><br></td>
</tr>

<tr>
<td colspan="2">
<strong>History</strong>
</td>
</tr>

{{#each executionDetails}}
<tr>
<td style="padding-right: 20px;">
{{this.timestampLocal1}}
</td>
<td style="padding-right: 20px;">
{{this.message}}
</td>
</tr>
{{/each}}

<tr>
<td colspan="2"><hr></td>
</tr>

<tr>
<td colspan="2">
The script log contains {{scriptLogSize}} rows in total. Here are the first ones:
</td>
</tr>
<tr>
<td colspan="2">
<pre>{{scriptLogHead}}</pre>
</td>
</tr>

<tr>
<td colspan="2"><br></td>
</tr>

<tr>
<td colspan="2">
Here are the last {{scriptLogTailCount}} rows:
</td>
</tr>
<tr>
<td colspan="2">
<pre>{{scriptLogTail}}</pre>
</td>
</tr>


</tbody>
</table>
174 changes: 0 additions & 174 deletions src/config/email_templates/aborted-reload.handlebars

This file was deleted.

Loading

0 comments on commit c163ad4

Please sign in to comment.