# HG changeset patch # User Vincent Tondellier # Date 1455490044 -3600 # Node ID 95f4e3c47dd410c4953c2d2bee905fb129bec520 # Parent 396528bdb9ad03f25246d4323db2f7b36affb1d7 Add product, version and group at the top of the crash report page diff -r 396528bdb9ad -r 95f4e3c47dd4 lib/CrashTest/Controller/CrashReports.pm --- a/lib/CrashTest/Controller/CrashReports.pm Sun Feb 14 23:20:44 2016 +0100 +++ b/lib/CrashTest/Controller/CrashReports.pm Sun Feb 14 23:47:24 2016 +0100 @@ -42,9 +42,11 @@ } sub show { - my ($self, $uuid) = @_; + my $self = shift; - my $data = $self->app->crash_reports->get_processed_data($self->param('uuid')); + my $uuid = $self->param('uuid'); + + my $data = $self->app->crash_reports->get_processed_data($uuid); $self->stash(processed_data => $data); my $crashing_thread = CrashTest::Model::Thread->new($data->{crashing_thread}); @@ -59,8 +61,10 @@ } $self->stash(threads => \@threads); - #my $similar = $self->app->storage->get_similar_crashs($self->param('uuid')); - #$self->stash(similar => $similar->{crashs}); + my $group = $self->app->crash_groups->get($uuid); + if($group) { + $self->stash(crash_group => $group); + } $self->stash(extra_columns => $self->app->config->{WebInterface}->{ExtraColumns}->{Index}); $self->render("report/crash"); diff -r 396528bdb9ad -r 95f4e3c47dd4 templates/report/crash.html.ep --- a/templates/report/crash.html.ep Sun Feb 14 23:20:44 2016 +0100 +++ b/templates/report/crash.html.ep Sun Feb 14 23:47:24 2016 +0100 @@ -1,6 +1,15 @@ % title 'crash report'; % layout 'main'; +%= t div => (class => 'panel panel-default') => begin + %= t div => (class => 'panel-heading') => begin + %= t h3 => (class => 'panel-title') => "Crash for $processed_data->{client_info}->{ProductName} $processed_data->{client_info}->{Version}" + % end + %= t div => (class => 'panel-body') => begin + %= link_to "In crash group \"" . $crash_group->{title} . "\"" => url_for('group', uuid => $crash_group->{uuid}) + % end +% end + %= t div => (class => 'tabbable') => begin %= t ul => (class => 'nav nav-tabs', id => 'report-tabs') => begin %= t li => (class => 'active') => begin