File tree Expand file tree Collapse file tree 3 files changed +28
-5
lines changed
Expand file tree Collapse file tree 3 files changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -52,4 +52,4 @@ habitat.tracker =
5252 out = $ (' body' )
5353
5454 for flight in list
55- out .append " #{ flight .start } #{ flight .name } <br />"
55+ out .append " #{ flight .start } #{ flight .name } [ #{ flight . _id } ] <br />"
Original file line number Diff line number Diff line change 11habitat .tracker .db =
22
33 # pulls latest flights from habitat
4- get_flights : (callback , selector ) ->
5- ts = Math .floor (new Date ()).getTime () / 1000
4+ get_flights : (callback , time ) ->
5+ ts = if time ? then time else Math .floor (new Date ()).getTime () / 1000
66
77 habitat .db .view " flight/end_start_including_payloads" , {
88 startkey : [ts]
@@ -36,3 +36,20 @@ habitat.tracker.db =
3636 list .concat (doc .payloads );
3737
3838 null
39+
40+ get_telemetry_by_flight_id : (callback , id ) ->
41+ habitat .db .view " payload_telemetry/flight_payload_time" , {
42+ startkey : [id]
43+ endkey : [id,{}]
44+ include_docs : true
45+ success : (data ) -> callback data .rows
46+ }
47+
48+ get_telemetry_by_id : (callback , id , time = 0 ) ->
49+ habitat .db .view " payload_telemetry/payload_time" , {
50+ startkey : [id,time]
51+ endkey : [id,{}]
52+ include_docs : true
53+ success : (data ) -> callback data .rows
54+ }
55+
Original file line number Diff line number Diff line change 11from fabric .api import *
22
3+ def dothis (cmd ):
4+ if len (env .hosts ) == 0 :
5+ local (cmd )
6+ else :
7+ run (cmd )
8+
39def compile_coffee ():
4- local ("/usr/lib/node_modules/coffee-script/bin/coffee -b -c -o js/ coffee/*.coffee" )
10+ dothis ("/usr/lib/node_modules/coffee-script/bin/coffee -b -c -o js/ coffee/*.coffee" )
511
612def build ():
713 compile_coffee ()
814
915def clean ():
10- local ("rm -f js/*js" )
16+ dothis ("rm -f js/*js" )
You can’t perform that action at this time.
0 commit comments