CrashTest.pl
changeset 67 9e95be0b1b8c
parent 57 cebbfcd7deff
child 68 c810480b2c37
equal deleted inserted replaced
66:ca4fa5dc09da 67:9e95be0b1b8c
    30     my $storage_class = $self->app->config->{Storage}->{Type};
    30     my $storage_class = $self->app->config->{Storage}->{Type};
    31     if (my $e = $loader->load($storage_class)) {
    31     if (my $e = $loader->load($storage_class)) {
    32         die ref $e ? "Exception: $e" : 'Not found!';
    32         die ref $e ? "Exception: $e" : 'Not found!';
    33     }
    33     }
    34 
    34 
    35     return $storage_class->new(config => $self->app->config->{Storage});
    35     return $storage_class->new(
       
    36         config => $self->app->config->{Storage},
       
    37         extra_columns => $self->app->config->{WebInterface}->{ExtraColumns},
       
    38     );
    36 });
    39 });
    37 
    40 
    38 app->attr(decode_queue => sub {
    41 app->attr(decode_queue => sub {
    39     my $self = shift;
    42     my $self = shift;
    40     my $loader = Mojo::Loader->new;
    43     my $loader = Mojo::Loader->new;
    65 
    68 
    66     my $result = $self->app->storage->index($page, $crashs_per_page, $self->req->param('search'));
    69     my $result = $self->app->storage->index($page, $crashs_per_page, $self->req->param('search'));
    67 
    70 
    68     $self->stash(files => $result->{crashs});
    71     $self->stash(files => $result->{crashs});
    69     $self->stash(pager => $result->{pager});
    72     $self->stash(pager => $result->{pager});
       
    73     $self->stash(extra_columns => $self->app->config->{WebInterface}->{ExtraColumns}->{Index});
    70     $self->render('index');
    74     $self->render('index');
    71 } => 'index';
    75 } => 'index';
    72 
    76 
    73 get '/report/:uuid' => [ uuid => qr/[0-9a-fA-F-]+/ ] => sub {
    77 get '/report/:uuid' => [ uuid => qr/[0-9a-fA-F-]+/ ] => sub {
    74     my $self = shift;
    78     my $self = shift;