Skip to content

Commit

Permalink
Don't try to compress d3
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuxton committed Feb 4, 2014
1 parent e51f106 commit b4430de
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions app/templates/cabotapp/service_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ <h3>Recovery instructions</h3>
<script type="text/javascript">
window.SERVICE_HISTORY = {{ service.recent_snapshots|jsonify }}
</script>
{% compress js %}
<script type="text/javascript" src="{{ STATIC_URL }}arachnys/js/raphael.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}arachnys/js/d3.js"></script>
{% compress js %}
<script type="text/javascript" src="{{ STATIC_URL }}arachnys/js/rickshaw.js"></script>
<script type="text/coffeescript">

Expand All @@ -106,27 +105,9 @@ <h3>Recovery instructions</h3>
num_checks_active: 'blue'
num_checks_failing: '#f00'
}
# processedData = formatDataForMorris data, labels
# drawMorris processedData.series, labels, processedData.events
processedData = formatDataForRickshaw data, labels
drawRickshaw processedData.series, labels, processedData.events

formatDataForMorris = (data, labels) ->
series = []
events = []
for slice in data
if slice.did_send_alert
events.push slice.time*1000
tmp = {}
tmp.time = slice.time*1000
for label in labels
tmp[label] = slice[label]
series.push tmp
return {
series: series
events: events
}

formatDataForRickshaw = (data, labels) ->
series = {}
events = []
Expand All @@ -152,20 +133,6 @@ <h3>Recovery instructions</h3>
events: events
}


drawMorris = (data, labels, events) ->
window.morrisLine = Morris.Line
element: 'graph'
data: data
xkey: 'time'
ykeys: labels
labels: labels
hideHover: 'auto'
pointSize: '3px'
events: events
eventLineColors: ['#ff0000']
eventStrokeWidth: '2px'

drawRickshaw = (data, labels, events = []) ->
rickshawLine = new Rickshaw.Graph
renderer: 'line'
Expand Down

0 comments on commit b4430de

Please sign in to comment.