summaryrefslogtreecommitdiff
path: root/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'javascripts')
-rw-r--r--javascripts/dashing.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/javascripts/dashing.coffee b/javascripts/dashing.coffee
index 964cf2c..528ae2c 100644
--- a/javascripts/dashing.coffee
+++ b/javascripts/dashing.coffee
@@ -81,6 +81,7 @@ Dashing.AnimatedValue =
Dashing.widgets = widgets = {}
Dashing.lastEvents = lastEvents = {}
+Dashing.debugMode = false
source = new EventSource('/events')
source.addEventListener 'open', (e) ->
@@ -93,6 +94,8 @@ source.addEventListener 'error', (e)->
source.addEventListener 'message', (e) =>
data = JSON.parse(e.data)
+ if Dashing.debugMode
+ console.log("Received data for #{data.id}", data)
lastEvents[data.id] = data
if widgets[data.id]?.length > 0
for widget in widgets[data.id]