Mark Dashing widget data as stale

I wanted an easy way to know if a Dashing widget hadn't been updated in a while to know if that data was stale. There's a little "last updated" line in the widget, but it's only really useful if I walk up to our dashboard. I want something that's obvious from a distance, but invisible when things are going well.

The below gist files can help set this up. The stale-widgets.rb file can go in your jobs/ folder and will run and go through each widget. If it's older than the threshold (set, here, at two hours), then it changes the status of that widget to "stale". The application.scss changes (just add those lines into your application.css file, or change to suit) then create a new status called "status-stale" which determine what a stale widget looks like.

Beware, though, that a status isn't changed until a new status shows up. All of our widgets push "status:normal" when all is good, which clears other status messages. If your widget updates don't push something similar, the widget may stay marked stale if it gets a future update.