Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

sds #695

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

sds #695

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
90 changes: 90 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
PATH
remote: .
specs:
dashing (1.3.4)
coffee-script (~> 2.2.0)
execjs (~> 2.0.2)
rack (~> 1.5.4)
rufus-scheduler (~> 2.0.24)
sass (~> 3.2.12)
sinatra (~> 1.4.4)
sinatra-contrib (~> 1.4.2)
sprockets (~> 2.10.1)
thin (~> 1.6.1)
thor (> 0.18.1)

GEM
remote: https://rubygems.org/
specs:
backports (3.6.8)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.10.0)
daemons (1.2.3)
docile (1.1.5)
eventmachine (1.0.9.1)
execjs (2.0.2)
fakeweb (1.3.0)
haml (4.0.7)
tilt
hike (1.2.3)
metaclass (0.0.4)
minitest (5.2.3)
mocha (0.14.0)
metaclass (~> 0.0.1)
multi_json (1.11.2)
rack (1.5.5)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rake (10.1.1)
rufus-scheduler (2.0.24)
tzinfo (>= 0.3.22)
sass (3.2.19)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sinatra-contrib (1.4.6)
backports (>= 2.0)
multi_json
rack-protection
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
sprockets (2.10.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thin (1.6.4)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
dashing!
fakeweb (~> 1.3.0)
haml (~> 4.0.4)
minitest (~> 5.2.0)
mocha (~> 0.14.0)
rake (~> 10.1.0)
simplecov (~> 0.8.2)

BUNDLED WITH
1.11.2
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec thin start -p 3030
2 changes: 2 additions & 0 deletions fire_tablet_dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*DS_STORE
history.yml
3 changes: 3 additions & 0 deletions fire_tablet_dashboard/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'dashing'
103 changes: 103 additions & 0 deletions fire_tablet_dashboard/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
backports (3.6.8)
buftok (0.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.10.0)
daemons (1.2.3)
dashing (1.3.4)
coffee-script (~> 2.2.0)
execjs (~> 2.0.2)
rack (~> 1.5.2)
rufus-scheduler (~> 2.0.24)
sass (~> 3.2.12)
sinatra (~> 1.4.4)
sinatra-contrib (~> 1.4.2)
sprockets (~> 2.10.1)
thin (~> 1.6.1)
thor (~> 0.18.1)
domain_name (0.5.20160216)
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.10)
eventmachine (1.0.9.1)
execjs (2.0.2)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
hike (1.2.3)
http (1.0.2)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 1.0.1)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
http-form_data (1.0.1)
http_parser.rb (0.6.0)
json (1.8.3)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
multi_json (1.11.2)
multipart-post (2.0.0)
naught (1.1.0)
rack (1.5.5)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rufus-scheduler (2.0.24)
tzinfo (>= 0.3.22)
sass (3.2.19)
simple_oauth (0.3.1)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sinatra-contrib (1.4.6)
backports (>= 2.0)
multi_json
rack-protection
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
sprockets (2.10.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thin (1.6.4)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (~> 1.0)
thor (0.18.1)
thread_safe (0.3.5)
tilt (1.4.1)
twitter (5.16.0)
addressable (~> 2.3)
buftok (~> 0.2.0)
equalizer (= 0.0.10)
faraday (~> 0.9.0)
http (~> 1.0)
http_parser.rb (~> 0.6.0)
json (~> 1.8)
memoizable (~> 0.4.0)
naught (~> 1.0)
simple_oauth (~> 0.3.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)

PLATFORMS
ruby

DEPENDENCIES
dashing
twitter (>= 5.9.0)

BUNDLED WITH
1.11.2
1 change: 1 addition & 0 deletions fire_tablet_dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check out http://shopify.github.com/dashing for more information.
Binary file not shown.
399 changes: 399 additions & 0 deletions fire_tablet_dashboard/assets/fonts/fontawesome-webfont.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file added fire_tablet_dashboard/assets/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions fire_tablet_dashboard/assets/javascripts/application.coffee
Original file line number Diff line number Diff line change
@@ -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()
5 changes: 5 additions & 0 deletions fire_tablet_dashboard/assets/javascripts/d3-3.2.8.js

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions fire_tablet_dashboard/assets/javascripts/dashing.gridster.coffee
Original file line number Diff line number Diff line change
@@ -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()