Permalink
Browse files

move js function to monitor.js

  • Loading branch information...
1 parent c393cae commit 7221a7c5724cb686ce973e58c6a7678d68078d97 Richard committed Oct 19, 2009
View
@@ -17,6 +17,10 @@ class MonitorApp < Sinatra::Base
get '/javascripts/jquery-1.3.2.min.js' do
send_file File.dirname(__FILE__) + '/static/javascripts/jquery-1.3.2.min.js'
end
+
+ get '/javascripts/monitor.js' do
+ send_file File.dirname(__FILE__) + '/static/javascripts/monitor.js'
+ end
get '/stylesheets/call_stack.css' do
send_file File.dirname(__FILE__) + '/static/stylesheets/call_stack.css'
@@ -0,0 +1,7 @@
+function connect() {
+ jQuery.get('/monitor/request?' + new Date().getTime(), function(data) {
+ $('#target').append(data);
+ connect();
+ });
+}
+connect();
@@ -1,20 +1,11 @@
<html>
<head>
<link type='text/css' rel='stylesheet' href='/stylesheets/call_stack.css'>
+ <script type='text/javascript' src='/javascripts/monitor.js'></script>
<script type='text/javascript' src='/javascripts/jquery-1.3.2.min.js'></script>
</head>
<body>
<p><strong>Ruby Monitor:</strong></p>
<div id='target'></div>
-
- <script>
- function connect() {
- jQuery.get('/monitor/request?' + new Date().getTime(), function(data) {
- $('#target').append(data);
- connect();
- });
- }
- connect();
- </script>
</body>
</html>

0 comments on commit 7221a7c

Please sign in to comment.