Message of the Day - OSC/ood-dashboard GitHub Wiki

What is it the MOTD feature?

Optionally display the "message of the day" file on the home page of the dashboard.

Currently, we use a custom format for the MOTD, because MOTDs with dated messages will typically show the latest message at the bottom, but on a webpage we want to show these messages on the top. We also use a markdown renderer to produce html for the body of the messages, so we can have nicely formatted text, bulleted lists, and hyperlinks.

How to enable

Set the environment variable MOTD_PATH in the .env.local file and restart the app (touch tmp/restart.txt):

# cd /path/to/dashboard/directory
echo "MOTD_PATH=/etc/motd" >> .env.local
touch tmp/restart.txt

If this env var is present, the file path specified will be parsed and displayed.

Formatting Rules for MOTD

  1. split messages using a line of multiple **********
  2. each message starts with a single line like this: 2016/03/01
  3. title follows this format on the following line: --- SYSTEM DOWNTIME RESCHEDULED: JULY 12TH 7AM-5PM
  4. after that the message body follows markdown rules for formatting, and is parsed using a markdown parser

Messages that do not match this formatting will be omitted.

Example MOTD file following formatting rules

************************************************************************
Welcome to the Ohio Supercomputer Center!

PLEASE SEE THE OSC SUPERCOMPUTING DOCUMENTATION
FOR ANNOUNCEMENTS/NOTICES AND USER INFORMATION:
http://www.osc.edu/supercomputing

For questions or assistance, contact [email protected]

To check for currently known issues, please visit
https://www.osc.edu/supercomputing/known-issues or follow @HPCNotices
on Twitter.
************************************************************************
2016/11/02
--- OUR NEWEST CLUSTER, OWENS, IS FULLY AVAILABLE

We're pleased to announce the Owens Cluster is in a full capacity
state and is available to our entire user community. The Owens
Cluster provides 706 Tflops of compute performance with 824
compute nodes (23,000 cores).

For information on getting started using Owens, please see
https://www.osc.edu/supercomputing/computing/owens
************************************************************************
2016/11/29
--- SCHEDULING INTERRUPTION ON OWENS NOV. 29

There will be a scheduling interruption on Owens from 3:30pm to 4:30pm on
Tuesday, November 29, 2016.Torque testing will be performed during this time.
Any running jobs won't be affected.
************************************************************************
  • messages are delimited by rows of ***
  • the first welcome message is ignored by the parser since it does not follow the formatting rules
  • the second and third messages follow the formatting rules and are parsed

By enabling the MOTD feature and using the motd file with the contents above, it would change the default dashboard install from:

images/motd_notset.png

to:

images/motd_set.png

Other ideas?

We aren't thrilled with this solution, and welcome to other suggestions. We've also considered (but haven't committed to):

  • just rendering the MOTD file using a markdown rendering, and forget the ordering of the messages
  • use RSS feed instead; then it can be the center's responsibility to convert the important MOTD messages to RSS or provide the same information in another format

If you have any good ideas, please post an issue or add a comment to https://github.com/OSC/ood-dashboard/issues/63.