33 |
$.plot( placeholder, data, options); |
$.plot( placeholder, data, options); |
34 |
|
|
35 |
placeholder.bind("plotselected", function (event,ranges) { |
placeholder.bind("plotselected", function (event,ranges) { |
|
var from = ranges.xaxis.from.toFixed(1); |
|
|
var to = ranges.xaxis.to.toFixed(1); |
|
36 |
|
|
37 |
function DateTimeStr(t) { |
function DateTimeStr(t) { |
38 |
var d = new Date( parseInt(t) ); |
var d = new Date( parseInt(t) ); |
57 |
return str; |
return str; |
58 |
} |
} |
59 |
|
|
60 |
$('#selection').text( DateTimeStr( from ) + ' to ' + DateTimeStr( to ) ); |
var from = DateTimeStr( ranges.xaxis.from.toFixed(1) ); |
61 |
|
var to = DateTimeStr( ranges.xaxis.to.toFixed(1) ); |
62 |
|
|
63 |
|
$('#selection').html( |
64 |
|
from + ' → ' + to + ' ' + |
65 |
|
'<a target="Frey::Shell::Log" href="/Frey::Shell::Log/as_sponge?from_datetime='+from+'&to_datetime='+to+'">see log</a>' |
66 |
|
); |
67 |
}); |
}); |
68 |
|
|
69 |
} |
} |