Dashing-Rails widget that changes the widget's color depending on the value displayed.
Add this line to your Dashing-Rails application's Gemfile:
gem 'dashing-hotness'
And then execute:
$ bundle
Follow the following steps in order to make it work on your dashing-rails project:
-
Add the following line to your
app/assets/javascripts/dashing/widgets/index.js
file://= require hotness
-
Add the following line to your
app/assets/stylesheets/dashing/widgets/index.css
file:*= require hotness
-
Add the following html to your dashboard:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="your_id" data-view="Hotness" data-title="Hotness Widget Title" data-cool="0" data-warm="100"></div> </li>
Note: the paths to index files may have changed depending on your Dashing-Rails configuration.
data-id
: Like all widgets, you must include an identifier so that your jobs can update the value.data-cool
: Anything below this value will show the 'cold' colour. It should be set high enough to include all the 'good' range of value for this metric.data-warm
: Anything above this value will show the 'hot' colour. It should be set just below the 'bad' range of value for this metric - ie. those that need attention!
data-title
: Optional title to show in the widget box (above the value).data-prefix
: Optional prefix to the value.data-suffix
: Optional suffix to the value.
The default colour scheme is Sweet Lolly by nekyo.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Full credits for this widget should go to Rowan. Please read his blog post for more informations about the widget.
The colour schemes and this widget are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 license Developed by Rowan. Adapted by gottfrois.