Skip to content

Commit b7d342a

Browse files
authored
fix: notification flags (#48)
1 parent bd73eff commit b7d342a

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/commands/monitor.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ export default class Monitor extends Command {
6363
bindBroker(flags['broker-api-url'], flags['broker-token']);
6464
bindNotification(
6565
{
66-
host: notificationSmtpHost,
67-
port: notificationSmtpPort,
68-
secure: notificationSmtpSecure,
66+
host: flags['notification-smtp-host'],
67+
port: flags['notification-smtp-port'],
68+
secure: flags['notification-smtp-secure'],
6969
},
7070
{
71-
from: notificationOptionFrom,
72-
subject: notificationOptionSubject,
73-
text: notificationOptionTemplateText,
74-
html: notificationOptionTemplateHtml,
71+
from: flags['notification-option-from'],
72+
subject: flags['notification-option-subject'],
73+
text: flags['notification-option-template-text'],
74+
html: flags['notification-option-template-html'],
7575
},
7676
);
7777
await bindTarget(

src/flags.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,22 @@ This service uses your connections in Broker's graph to enable (and disable) acc
123123

124124
export const notificationOptionTemplateHtml = {
125125
'notification-option-template-html': Flags.string({
126-
default: `Hi <%= summary.user.name %>,
126+
default: `<html><body><p>Hi <%= summary.user.name %>,</p>
127127
128-
This report shows changes to your account access to <%= config.name %>. The following account changes have occurred.
128+
<p>This report shows changes to your account access to <%= config.name %>. The following account changes have occurred.</p>
129129
<% summary.addRoles.forEach(function(role) { %>
130-
Add: <%= role %><% if (addRoleMap[role]) { %>
130+
<p>Add: <%= role %></p><% if (addRoleMap[role]) { %>
131131
132132
<%= addRoleMap[role] %>
133133
<% }}); %>
134134
135135
<% summary.delRoles.forEach(function(role) { %>
136-
Remove: <%= role %>
136+
<p>Remove: <%= role %></p>
137137
<% }); %>
138138
139-
This service uses your connections in Broker's graph to enable (and disable) access by altering your roles in Common Hosted Single Sign-On (CSS).`,
139+
<p>This service uses your connections in Broker's graph to enable (and disable) access by altering your roles in Common Hosted Single Sign-On (CSS).</p>
140+
</body>
141+
</html>`,
140142
description: 'The notification template in html',
141143
env: 'NOTIFICATION_OPTION_TEMPLATE_HTML',
142144
}),

0 commit comments

Comments
 (0)