Last active
August 29, 2015 14:24
-
-
Save mapledyne/5d03c632d63ccb28f29e to your computer and use it in GitHub Desktop.
Exposing Dashing widget data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript'> | |
$(function() { | |
// These settings override the defaults set in application.coffee. You can do this on a per dashboard basis. | |
Dashing.widget_base_dimensions = [356, 470] | |
Dashing.widget_margins = [5, 5] | |
Dashing.numColumns = 3 | |
}); | |
</script> | |
<% content_for :title do %>Widget Data<% end %> | |
<div class="gridster"> | |
<ul> | |
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> | |
<div data-id="widget_count" data-view="Number" data-service="Dashing" data-title="Widget Count" data-suffix=""></div> | |
</li> | |
<li data-row="1" data-col="2" data-sizex="1" data-sizey="1"> | |
<div data-id="stale_widgets" data-view="Number" data-service="Dashing" data-title="Stale Widgets" data-suffix=""></div> | |
</li> | |
</ul> | |
</div> | |
<H1>Raw Widget Data:</H1><P> | |
<% list = Sinatra::Application.settings.history %> | |
<%=list.to_s.gsub("\\n\\n","\"<br><br>").gsub("\\\"","\"").gsub("\", \"","\"")%> | |
</P> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment