Skip to content

Commit

Permalink
Merge pull request #1264 from mountaindude/1259
Browse files Browse the repository at this point in the history
1259
  • Loading branch information
mountaindude authored Oct 10, 2024
2 parents 642af1b + 16032c0 commit 697ec95
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 195 deletions.
41 changes: 21 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@
"systeminformation": "^5.23.5",
"upath": "^2.0.1",
"uuid": "^10.0.0",
"winston": "^3.14.2",
"winston": "^3.15.0",
"winston-daily-rotate-file": "^5.0.0",
"ws": "^8.18.0",
"xstate": "^5.18.2"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.1",
"@babel/plugin-syntax-import-assertions": "^7.25.6",
"@eslint/js": "^9.11.1",
"@babel/eslint-parser": "^7.25.7",
"@babel/plugin-syntax-import-assertions": "^7.25.7",
"@eslint/js": "^9.12.0",
"esbuild": "^0.24.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/config/email_templates/failed-reload-qseow.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<p>


<table></table>
<table>
<tbody>
<tr>
<td style="padding-right: 20px;">
Expand Down
93 changes: 39 additions & 54 deletions src/config/email_templates/service-started.handlebars
Original file line number Diff line number Diff line change
@@ -1,44 +1,6 @@
<h1>Windows service {{serviceStatus}}: '{{serviceDisplayName}}'</h1>
<p>

<style type="text/css">
.tg {
border-collapse: collapse;
border-spacing: 0;
}
.tg td {
border-color: black;
border-style: solid;
border-width: 1px;
font-family: Arial, sans-serif;
font-size: 14px;
overflow: hidden;
padding: 10px 5px;
word-break: normal;
}
.tg .tg-nalo {
background-color: #efefef;
border-color: inherit;
color: #000000;
font-family: "Courier New", Courier, monospace !important;
;
font-weight: bold;
text-align: left;
vertical-align: top
}
.tg .tg-ipfp {
background-color: #efefef;
border-color: inherit;
color: #000000;
font-family: "Courier New", Courier, monospace !important;
;
text-align: left;
vertical-align: top
}
</style>

<table class="tg">
<tbody>
Expand All @@ -47,32 +9,55 @@
{{! Please refer to https://handlebarsjs.com/guide/#simple-expressions for info on Handlebars templating syntax }}

<tr>
<td class="tg-nalo">Host</th>
<td class="tg-ipfp">{{host}}</th>
</tr>
<tr>
<td class="tg-nalo">Service name</th>
<td class="tg-ipfp">{{serviceName}}</th>
<td style="padding-right: 20px;">
<strong>Host</strong><br>
{{host}}
</td>
<td style="padding-left: 20px;">
<strong>Service name</strong><br>
{{serviceName}}
</tr>
<tr>
<td class="tg-nalo">Service display name</td>
<td class="tg-ipfp">{{serviceDisplayName}}</td>
<td style="padding-right: 20px;">
<strong>Service status</strong><br>
{{serviceStatus}}
</td>
<td style="padding-left: 20px;">
<strong>Service display name</strong><br>
{{serviceDisplayName}}
</td>
</tr>
<tr>
<td class="tg-nalo">Service status</td>
<td class="tg-ipfp">{{serviceStatus}}</th>
<td style="padding-right: 20px;">
<strong>Previous service status</strong><br>
{{servicePrevStatus}}
</td>
<td style="padding-left: 20px;">
<strong>Service startup mode</strong><br>
{{serviceStartType}}
</td>
</tr>
<tr>
<td class="tg-nalo">Previous service status</td>
<td class="tg-ipfp">{{servicePrevStatus}}</th>
<td colspan="2">
<strong>EXE path</strong><br>
{{serviceExePath}}
</td>
</tr>

<tr>
<td class="tg-nalo">Service startup mode</td>
<td class="tg-ipfp">{{serviceStartType}}</th>
<td colspan="2"><hr></td>
</tr>

<tr>
<td class="tg-nalo">EXE path</td>
<td class="tg-ipfp">{{serviceExePath}}</td>
<td colspan="2">
{{#each genericUrls}}
{{!-- Possible to use conditional logic in the template to include or exclude buttons based on the value of a variable. For example, the following code snippet includes a button only if the value of the id variable is "butler_docs": --}}
{{!-- {{#if (eq id "butler_docs")}} --}}
<a href="{{this.url}}" 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;">{{this.linkText}}</a>
{{!-- {{/if}} --}}
{{/each}}
</td>
</tr>

</tbody>
</table>
93 changes: 39 additions & 54 deletions src/config/email_templates/service-stopped.handlebars
Original file line number Diff line number Diff line change
@@ -1,44 +1,6 @@
<h1>Windows service {{serviceStatus}}: '{{serviceDisplayName}}'</h1>
<p>

<style type="text/css">
.tg {
border-collapse: collapse;
border-spacing: 0;
}
.tg td {
border-color: black;
border-style: solid;
border-width: 1px;
font-family: Arial, sans-serif;
font-size: 14px;
overflow: hidden;
padding: 10px 5px;
word-break: normal;
}
.tg .tg-nalo {
background-color: #efefef;
border-color: inherit;
color: #000000;
font-family: "Courier New", Courier, monospace !important;
;
font-weight: bold;
text-align: left;
vertical-align: top
}
.tg .tg-ipfp {
background-color: #efefef;
border-color: inherit;
color: #000000;
font-family: "Courier New", Courier, monospace !important;
;
text-align: left;
vertical-align: top
}
</style>

<table class="tg">
<tbody>
Expand All @@ -47,32 +9,55 @@
{{! Please refer to https://handlebarsjs.com/guide/#simple-expressions for info on Handlebars templating syntax }}

<tr>
<td class="tg-nalo">Host</th>
<td class="tg-ipfp">{{host}}</th>
</tr>
<tr>
<td class="tg-nalo">Service name</th>
<td class="tg-ipfp">{{serviceName}}</th>
<td style="padding-right: 20px;">
<strong>Host</strong><br>
{{host}}
</td>
<td style="padding-left: 20px;">
<strong>Service name</strong><br>
{{serviceName}}
</tr>
<tr>
<td class="tg-nalo">Service display name</td>
<td class="tg-ipfp">{{serviceDisplayName}}</td>
<td style="padding-right: 20px;">
<strong>Service status</strong><br>
{{serviceStatus}}
</td>
<td style="padding-left: 20px;">
<strong>Service display name</strong><br>
{{serviceDisplayName}}
</td>
</tr>
<tr>
<td class="tg-nalo">Service status</td>
<td class="tg-ipfp">{{serviceStatus}}</th>
<td style="padding-right: 20px;">
<strong>Previous service status</strong><br>
{{servicePrevStatus}}
</td>
<td style="padding-left: 20px;">
<strong>Service startup mode</strong><br>
{{serviceStartType}}
</td>
</tr>
<tr>
<td class="tg-nalo">Previous service status</td>
<td class="tg-ipfp">{{servicePrevStatus}}</th>
<td colspan="2">
<strong>EXE path</strong><br>
{{serviceExePath}}
</td>
</tr>

<tr>
<td class="tg-nalo">Service startup mode</td>
<td class="tg-ipfp">{{serviceStartType}}</th>
<td colspan="2"><hr></td>
</tr>

<tr>
<td class="tg-nalo">EXE path</td>
<td class="tg-ipfp">{{serviceExePath}}</td>
<td colspan="2">
{{#each genericUrls}}
{{!-- Possible to use conditional logic in the template to include or exclude buttons based on the value of a variable. For example, the following code snippet includes a button only if the value of the id variable is "butler_docs": --}}
{{!-- {{#if (eq id "butler_docs")}} --}}
<a href="{{this.url}}" 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;">{{this.linkText}}</a>
{{!-- {{/if}} --}}
{{/each}}
</td>
</tr>

</tbody>
</table>
8 changes: 2 additions & 6 deletions src/config/log_appender_xml/scheduler/LocalLogConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- Appender for detecting successful reload tasks -->
<appender name="ReloadTaskSuccessLogger" type="log4net.Appender.UdpAppender">
<filter type="log4net.Filter.StringMatchFilter">
<param name="stringToMatch" value="Reload complete" />
<param name="stringToMatch" value="Execution State Change to FinishedSuccess" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<param name="remoteAddress" value="<IP of server where Butler is running>" />
Expand Down Expand Up @@ -86,17 +86,13 @@

<!-- Send message to Butler on task failure -->
<!-- Send message to Butler on task abort -->
<!-- Send message to Butler on reload task success -->
<logger name="System.Scheduler.Scheduler.Master.Task.TaskSession">
<appender-ref ref="TaskFailureLogger" />
<appender-ref ref="AbortedReloadTaskLogger" />
</logger>

<!-- Send message to Butler on reload task success -->
<logger name="System.Scheduler.Scheduler.Slave.Tasks.ReloadTask">
<appender-ref ref="ReloadTaskSuccessLogger" />
</logger>


<!--Send email on task failure-->
<!-- <logger name="System.Scheduler.Scheduler.Slave.Tasks.ReloadTask"> -->
<!-- Tip: Logger name identifies the component to monitor. This can be found by investigating the actual log file-->
Expand Down
Loading

0 comments on commit 697ec95

Please sign in to comment.