Sha256: 3ddb5e587f551da4987d5607bba608a3396ce45f71fd9788a5e4c109888d4fa6

Contents?: true

Size: 717 Bytes

Versions: 17

Compression:

Stored size: 717 Bytes

Contents

require "#{File.dirname(__FILE__)}/abstract_note"

if defined?(NewRelic)
module Footnotes
  module Notes
    class RpmNote < AbstractNote
      def initialize(controller)
        @rpm_id=NewRelic::Agent.instance.transaction_sampler.current_sample_id
      end

      def row
        :edit
      end

      def link
         #{:controller => 'newrelic', :action => 'show_sample_detail', :id => @rpm_id}
         "/newrelic/show_sample_detail/#{@rpm_id}" if @rpm_id
      end
      
      def valid?
        if defined?(NewRelic::Control)
          !NewRelic::Control.instance['skip_developer_route']
        else
          !NewRelic::Config.instance['skip_developer_route']
        end
      end
    end
  end
end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rails-footnotes-3.7.2 lib/rails-footnotes/notes/rpm_note.rb
rails-footnotes-3.7.1 lib/rails-footnotes/notes/rpm_note.rb
rails-footnotes-3.7.1.pre lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.10 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.9 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.8 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.7 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.6 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.5 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.4 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.3 lib/rails-footnotes/notes/rpm_note.rb
rails-footnotes-3.7.0 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.2 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre.1 lib/rails-footnotes/notes/rpm_note.rb
rails3-footnotes-4.0.0.pre lib/rails-footnotes/notes/rpm_note.rb
rails-footnotes-3.6.7 lib/rails-footnotes/notes/rpm_note.rb
rails-footnotes-3.6.6 lib/rails-footnotes/notes/rpm_note.rb