diff -ru gl_tail_orig/element.rb gl_tail/element.rb --- gl_tail_orig/element.rb 2007-11-14 21:08:04.000000000 +0000 +++ gl_tail/element.rb 2007-11-14 21:17:06.000000000 +0000 @@ -95,6 +95,10 @@ @size = 0.01 end + if not defined? @name || @name.nil? + return + end + @wx = @block.is_right ? (@block.alignment - (@block.width+8)*8.0 / (engine.screen.window_width / 2.0)) : @block.alignment if(@y == -@block.top) @@ -144,14 +148,16 @@ raise "unknown block type #{self.inspect}" end - if @x < 0 - str = sprintf("%#{@block.width}s %s", @name.length > @block.width ? @name[-@block.width..-1] : @name, txt) - else - str = sprintf("%s %s", txt, @name[0..@block.width-1]) + unless @name.nil? + if @x < 0 + str = sprintf("%#{@block.width}s %s", @name.length > @block.width ? @name[-@block.width..-1] : @name, txt) + else + str = sprintf("%s %s", txt, @name[0..@block.width-1]) + end + + engine.render_string(str) end - engine.render_string(str) - glPopMatrix() t = glutGet(GLUT_ELAPSED_TIME) diff -ru gl_tail_orig/parsers/apache.rb gl_tail/parsers/apache.rb --- gl_tail_orig/parsers/apache.rb 2007-11-14 21:08:04.000000000 +0000 +++ gl_tail/parsers/apache.rb 2007-11-14 21:17:17.000000000 +0000 @@ -20,7 +20,7 @@ url, parameters = url.split('?') referrer.gsub!(/http:\/\//,'') if referrer - + add_activity(:block => 'sites', :name => server.name, :size => size.to_i) # Size of activity based on size of request add_activity(:block => 'urls', :name => url) add_activity(:block => 'users', :name => host, :size => size.to_i) diff -ru gl_tail_orig/parsers/rails.rb gl_tail/parsers/rails.rb --- gl_tail_orig/parsers/rails.rb 2007-11-14 21:08:04.000000000 +0000 +++ gl_tail/parsers/rails.rb 2007-11-14 21:17:13.000000000 +0000 @@ -13,15 +13,15 @@ if url _, host, url = /^http[s]?:\/\/([^\/]+)(.*)/.match(url).to_a - add_activity(:block => 'sites', :name => host, :size => ms.to_f) # Size of activity based on request time. + add_activity(:block => 'sites', :name => server.name, :size => ms.to_f) # Size of activity based on request time. add_activity(:block => 'urls', :name => HttpHelper.generalize_url(url), :size => ms.to_f) add_activity(:block => 'slow requests', :name => url, :size => ms.to_f) add_activity(:block => 'content', :name => 'page') # Events to pop up - add_event(:block => 'info', :name => "Logins", :message => "Login...", :update_stats => true, :color => [0.5, 1.0, 0.5, 1.0]) if url.include?('/login') - add_event(:block => 'info', :name => "Sales", :message => "$", :update_stats => true, :color => [1.5, 0.0, 0.0, 1.0]) if url.include?('/checkout') - add_event(:block => 'info', :name => "Signups", :message => "New User...", :update_stats => true, :color => [1.0, 1.0, 1.0, 1.0]) if(url.include?('/signup') || url.include?('/users/create')) + add_event(:block => 'info', :name => "Logins", :message => "Login...", :update_stats => true, :color => [0.5, 1.0, 0.5, 1.0]) if url && url.include?('/login') + add_event(:block => 'info', :name => "Sales", :message => "$", :update_stats => true, :color => [1.5, 0.0, 0.0, 1.0]) if url && url.include?('/checkout') + add_event(:block => 'info', :name => "Signups", :message => "New User...", :update_stats => true, :color => [1.0, 1.0, 1.0, 1.0]) if url && (url.include?('/signup') || url.include?('/users/create')) elsif line.include?('Processing ') #Processing TasksController#update_sheet_info (for 123.123.123.123 at 2007-10-05 22:34:33) [POST] _, host = /^Processing .* \(for (\d+.\d+.\d+.\d+) at .*\).*$/.match(line).to_a