Since I've already created the Nagios Command and bound it to my contact information, all I need to do is install jade into the project folder's node_modules:
$ npm install jade
We then need to create our templates. Since I wanted to use a layout, I created a jade sub-folder in my projects folder.
Here is the layout (./jade/layout.jade):
Here is a neat header bar that I'm using(./jade/nav-bar-email.jade):
Here is the alert e-mail(./jade/nagiosAlert.jade):
Here is what my notify-service.coffee script looks like(/opt/bin/notify-service.coffee):
The final result is a pretty looking E-Mail. I'm viewing this with Mail.app in OS X. Ive blanked out a few bits. Just imagine there is Company Text to the left of home and a link between home and projects in the nav-bar
No comments:
Post a Comment