Permalink
Browse files

Add dashing

  • Loading branch information...
1 parent c08de24 commit 5c9ce2428618ba43ba549efaf4d0d8497b8abc5b @lukec committed Feb 23, 2013
Showing with 5,361 additions and 1,383 deletions.
  1. +3 −0 Gemfile
  2. +61 −0 Gemfile.lock
  3. +1 −0 README.md
  4. +65 −0 \
  5. BIN assets/fonts/fontawesome-webfont.eot
  6. +255 −0 assets/fonts/fontawesome-webfont.svg
  7. BIN assets/fonts/fontawesome-webfont.ttf
  8. BIN assets/fonts/fontawesome-webfont.woff
  9. BIN assets/images/favicon.ico
  10. BIN assets/images/logo.png
  11. +25 −0 assets/javascripts/application.coffee
  12. +4 −0 assets/javascripts/d3.v2.min.js
  13. +37 −0 assets/javascripts/dashing.gridster.coffee
  14. +2,890 −0 assets/javascripts/gridster/jquery.gridster.js
  15. +5 −0 assets/javascripts/gridster/jquery.leanModal.min.js
  16. +646 −0 assets/javascripts/jquery.knob.js
  17. +2 −0 assets/javascripts/rickshaw.min.js
  18. +255 −0 assets/stylesheets/application.scss
  19. +303 −0 assets/stylesheets/font-awesome.css
  20. +57 −0 assets/stylesheets/jquery.gridster.css
  21. +12 −2 bin/parse
  22. +19 −0 config.ru
  23. +48 −0 dashboards/issues.erb
  24. +32 −0 dashboards/layout.erb
  25. +25 −0 dashboards/sample.erb
  26. +56 −0 dashboards/sampletv.erb
  27. +1 −0 dashboards/vancouver.erb
  28. +9 −0 jobs/buzzwords.rb
  29. +14 −0 jobs/convergence.rb
  30. +20 −0 jobs/rentals.rb
  31. +17 −0 jobs/twitter.rb
  32. +1 −1,381 metrics.json
  33. +18 −0 widgets/clock/clock.coffee
  34. +2 −0 widgets/clock/clock.html
  35. +13 −0 widgets/clock/clock.scss
  36. +24 −0 widgets/comments/comments.coffee
  37. +7 −0 widgets/comments/comments.html
  38. +33 −0 widgets/comments/comments.scss
  39. +35 −0 widgets/graph/graph.coffee
  40. +5 −0 widgets/graph/graph.html
  41. +65 −0 widgets/graph/graph.scss
  42. +9 −0 widgets/iframe/iframe.coffee
  43. +1 −0 widgets/iframe/iframe.html
  44. +8 −0 widgets/iframe/iframe.scss
  45. +9 −0 widgets/image/image.coffee
  46. +1 −0 widgets/image/image.html
  47. +13 −0 widgets/image/image.scss
  48. +6 −0 widgets/list/list.coffee
  49. +18 −0 widgets/list/list.html
  50. +65 −0 widgets/list/list.scss
  51. +14 −0 widgets/meter/meter.coffee
  52. +7 −0 widgets/meter/meter.html
  53. +35 −0 widgets/meter/meter.scss
  54. +20 −0 widgets/number/number.coffee
  55. +11 −0 widgets/number/number.html
  56. +39 −0 widgets/number/number.scss
  57. +1 −0 widgets/text/text.coffee
  58. +7 −0 widgets/text/text.html
  59. +32 −0 widgets/text/text.scss
View
@@ -0,0 +1,3 @@
+source :rubygems
+
+gem 'dashing'
View
@@ -0,0 +1,61 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ backports (2.8.2)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.4.0)
+ daemons (1.1.9)
+ dashing (1.0.3)
+ coffee-script
+ rack
+ rufus-scheduler
+ sass
+ sinatra
+ sinatra-contrib
+ sprockets
+ thin
+ thor
+ eventmachine (1.0.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ hike (1.2.1)
+ multi_json (1.5.0)
+ rack (1.5.2)
+ rack-protection (1.3.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rufus-scheduler (2.0.17)
+ tzinfo (>= 0.3.23)
+ sass (3.2.5)
+ sinatra (1.3.4)
+ rack (~> 1.4)
+ rack-protection (~> 1.3)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-contrib (1.3.2)
+ backports (>= 2.0)
+ eventmachine
+ rack-protection
+ rack-test
+ sinatra (~> 1.3.0)
+ tilt (~> 1.3)
+ sprockets (2.8.2)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.17.0)
+ tilt (1.3.3)
+ tzinfo (0.3.35)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ dashing
View
@@ -0,0 +1 @@
+Check out http://shopify.github.com/dashing for more information.
View
65 \
@@ -0,0 +1,65 @@
+// ----------------------------------------------------------------------------
+// Sass declarations
+// ----------------------------------------------------------------------------
+$background-color: #12b0c5;
+$value-color: #fff;
+
+$title-color: rgba(255, 255, 255, 0.7);
+$label-color: rgba(255, 255, 255, 0.7);
+$moreinfo-color: rgba(255, 255, 255, 0.7);
+
+// ----------------------------------------------------------------------------
+// Widget-list styles
+// ----------------------------------------------------------------------------
+.widget-list {
+
+ background-color: $background-color;
+ vertical-align: top;
+
+ .title {
+ color: $title-color;
+ }
+
+ ol, ul {
+ margin: 0 15px;
+ text-align: left;
+ color: $label-color;
+ }
+
+ ol {
+ list-style-position: outside;
+ padding-left: 15px;
+ }
+
+ .list-nostyle {
+ list-style: none;
+ }
+
+ li {
+ margin-bottom: 5px;
+ position: relative;
+ padding-right: 35px;
+
+ .label {
+ color: $label-color;
+ }
+
+ .value {
+ position: absolute;
+ top: 0;
+ right: 0;
+ margin-left: 12px;
+ font-weight: 600;
+ color: $value-color;
+ }
+ }
+
+ .updated-at {
+ color: rgba(0, 0, 0, 0.3);
+ }
+
+ .more-info {
+ color: $moreinfo-color;
+ }
+
+}
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,25 @@
+# dashing.js is located in the dashing framework
+# It includes jquery & batman for you.
+#= require dashing.js
+
+#= require_directory .
+#= require_tree ../../widgets
+
+console.log("Yeah! The dashboard has started!")
+
+Dashing.on 'ready', ->
+ Dashing.widget_margins ||= [5, 5]
+ Dashing.widget_base_dimensions ||= [300, 360]
+ Dashing.numColumns ||= 4
+
+ contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns
+
+ Batman.setImmediate ->
+ $('.gridster').width(contentWidth)
+ $('.gridster ul:first').gridster
+ widget_margins: Dashing.widget_margins
+ widget_base_dimensions: Dashing.widget_base_dimensions
+ avoid_overlapped_widgets: !Dashing.customGridsterLayout
+ draggable:
+ stop: Dashing.showGridsterInstructions
+ start: -> Dashing.currentWidgetPositions = Dashing.getWidgetPositions()

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,37 @@
+#= require_directory ./gridster
+
+# This file enables gridster integration (http://gridster.net/)
+# Delete it if you'd rather handle the layout yourself.
+# You'll miss out on a lot if you do, but we won't hold it against you.
+
+Dashing.gridsterLayout = (positions) ->
+ Dashing.customGridsterLayout = true
+ positions = positions.replace(/^"|"$/g, '')
+ positions = $.parseJSON(positions)
+ widgets = $("[data-row^=]")
+ for widget, index in widgets
+ $(widget).attr('data-row', positions[index].row)
+ $(widget).attr('data-col', positions[index].col)
+
+Dashing.getWidgetPositions = ->
+ $(".gridster ul:first").gridster().data('gridster').serialize()
+
+Dashing.showGridsterInstructions = ->
+ newWidgetPositions = Dashing.getWidgetPositions()
+
+ unless JSON.stringify(newWidgetPositions) == JSON.stringify(Dashing.currentWidgetPositions)
+ Dashing.currentWidgetPositions = newWidgetPositions
+ $('#save-gridster').slideDown()
+ $('#gridster-code').text("
+ <script type='text/javascript'>\n
+ $(function() {\n
+ \ \ Dashing.gridsterLayout('#{JSON.stringify(Dashing.currentWidgetPositions)}')\n
+ });\n
+ </script>
+ ")
+
+$ ->
+ $('#save-gridster').leanModal()
+
+ $('#save-gridster').click ->
+ $('#save-gridster').slideUp()
Oops, something went wrong.

0 comments on commit 5c9ce24

Please sign in to comment.