<% # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% provide :page_title, t("#titles.error_reports", "Error Reports") add_crumb t("#crumbs.error_reports", "Error Reports") %> <%= form_for @current_user, :url => '/error_reports', :html => { :method => :get } do |f| %> <% if error_search_enabled? %> <%= t :message_contains, "Message contains" %> <% end %> <% end %> <% content_for :pagination do %> <% if params[:action] == 'index' %> <%= will_paginate(@reports, :page_links => false) %> <% end %> <% end %> <%= yield :pagination %> <% @reports.each do |report| %>

<%= link_to "##{report.id}", error_url(report) %> <% if @reports.length > 1 %> <%= truncate(report.message, :length => 80) %> <% else %> <%= report.message %> <% end %>

<% if report.account_id %> <%= before_label :account, "account" %> <%= link_to report.account.try(:name), account_url(report.account_id) %>
<% end %> <% if report.category %> <%= before_label :category, "category" %> <%= report.category %>
<% end %> <% if report.subject %> <%= before_label :subject, "subject" %> <%= report.subject %>
<% end %> <%= before_label :created_at, "created at" %> <%= report.created_at %>
<% if report.user_id %> <%= before_label :user, "user" %> <%= link_to report.user.try(:name), user_url(report.user_id) %>
<% end %> <% if report.url.present? %> <%= before_label :url, "url" %> <%= if report.safe_url? link_to report.url, report.url else report.url end %>
<% end %> <% if report.request_context_id %> <%= before_label :request_context_id, "request context id" %> <%= report.request_context_id %>
<% end %> <% if report.comments %> <%= before_label :comments, "comments" %> <%= report.comments %>
<% end %> <% (report.data || {}).to_a.sort.each do |k,v| %> <% next if k.to_s == "exception_message" %>
<%= before_label k.to_s %> <%= v %> <% end %>
 1 %> overflow: auto;"><%= report.data.try(:[], "exception_message") %>

<%= report.backtrace %>
<% end %> <%= yield :pagination %>