diff --git a/app/helpers/notices_helper.rb b/app/helpers/notices_helper.rb index ac4e150..cb29ff4 100644 --- a/app/helpers/notices_helper.rb +++ b/app/helpers/notices_helper.rb @@ -4,15 +4,15 @@ module NoticesHelper render :partial => "notices/atom_entry.html.haml", :locals => {:notice => notice} end - def line_number_with_link(app, line) + def link_to_source_file(app, line, text) if Notice.in_app_backtrace_line?(line) - return link_to_github(app, line, line['number']) if app.github_url? + return link_to_github(app, line, text) if app.github_url? if app.issue_tracker && app.issue_tracker.respond_to?(:url_to_file) # Return link to file on tracker if issue tracker supports this - return link_to_issue_tracker_file(app, line, line['number']) + return link_to_issue_tracker_file(app, line, text) end end - line['number'] + text end def filepath_parts(file) diff --git a/app/views/notices/_backtrace.html.haml b/app/views/notices/_backtrace.html.haml index 2f44a13..4babe9f 100644 --- a/app/views/notices/_backtrace.html.haml +++ b/app/views/notices/_backtrace.html.haml @@ -4,10 +4,11 @@ - path = File.dirname(line['file']) - path = path == "." ? "" : path + '/' - file = File.basename(line['file']) + - file = "#{file}:#{line['number']}" unless line['number'].blank? %tr %td.line{:class => (Notice.in_app_backtrace_line?(line) ? 'in-app' : nil)} %span.path>= path - %span.file= line['number'].blank? ? file : ("#{file}:" + line_number_with_link(@app, line).to_s).html_safe + %span.file= link_to_source_file(@app, line, file).html_safe → %span.method= line['method'] diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 952c8ba..4c660f5 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -733,8 +733,9 @@ table.backtrace td.line.in-app { color: #2adb2e; background-color: #2f2f2f; } -table.backtrace td.line.in-app span.file { color:#2AEB2E; } -table.backtrace td.line.in-app span.method { color:#2ACB2E; } +table.backtrace td.line.in-app .file { color:#2AEB2E; } +table.backtrace td.line.in_app .file a { color:#21A4FF; } +table.backtrace td.line.in-app .method { color:#2ACB2E; } /* Extra empty rows at top and bottom of table */ @@ -745,7 +746,6 @@ table.backtrace tr.padding th, table.backtrace tr.padding td { } - span.click_span { font-size: 0.7em; } -- libgit2 0.21.2