4 use CrashTest::Model::Storage; |
4 use CrashTest::Model::Storage; |
5 use CrashTest::Model::StackFilter; |
5 use CrashTest::Model::StackFilter; |
6 use CrashTest::Model::CrashReport; |
6 use CrashTest::Model::CrashReport; |
7 use CrashTest::Model::CrashGroup; |
7 use CrashTest::Model::CrashGroup; |
8 use CrashTest::Model::CrashProcessor; |
8 use CrashTest::Model::CrashProcessor; |
|
9 use CrashTest::Model::BugLink; |
9 |
10 |
10 # This method will run once at server start |
11 # This method will run once at server start |
11 sub startup { |
12 sub startup { |
12 my $self = shift; |
13 my $self = shift; |
13 |
14 |
35 |
36 |
36 $self->helper(crash_reports => sub { state $crash_reports = CrashTest::Model::CrashReport->new (app => $self); }); |
37 $self->helper(crash_reports => sub { state $crash_reports = CrashTest::Model::CrashReport->new (app => $self); }); |
37 $self->helper(crash_groups => sub { state $crash_groups = CrashTest::Model::CrashGroup->new (app => $self); }); |
38 $self->helper(crash_groups => sub { state $crash_groups = CrashTest::Model::CrashGroup->new (app => $self); }); |
38 |
39 |
39 $self->helper(crash_processor => sub { state $crash_processor = CrashTest::Model::CrashProcessor->new (app => $self, config => $self->config); }); |
40 $self->helper(crash_processor => sub { state $crash_processor = CrashTest::Model::CrashProcessor->new (app => $self, config => $self->config); }); |
40 $self->helper(stackfilter => sub { state $crash_reports = CrashTest::Model::StackFilter->new (app => $self, config => $self->config); }); |
41 $self->helper(stackfilter => sub { state $stackfilter = CrashTest::Model::StackFilter->new (app => $self, config => $self->config); }); |
41 $self->helper(storage => sub { state $storage = CrashTest::Model::Storage->new (app => $self, config => $self->config); }); |
42 $self->helper(storage => sub { state $storage = CrashTest::Model::Storage->new (app => $self, config => $self->config); }); |
|
43 $self->helper(bug_link => sub { state $bug_link = CrashTest::Model::BugLink->new (app => $self, config => $self->config->{WebInterface}->{BugTrackerLinks}); }); |
42 |
44 |
43 $self->plugin('Minion', $self->config->{Processor}->{JobQueue}->{Backend}->{Minion}); |
45 $self->plugin('Minion', $self->config->{Processor}->{JobQueue}->{Backend}->{Minion}); |
44 |
46 |
45 $self->storage->load_plugins(); |
47 $self->storage->load_plugins(); |
46 $self->crash_processor->load_plugins(); |
48 $self->crash_processor->load_plugins(); |
|
49 $self->bug_link->load_plugins(); |
47 |
50 |
48 # Router |
51 # Router |
49 my $r = $self->routes; |
52 my $r = $self->routes; |
50 |
53 |
51 # Normal route to controller |
54 # Normal route to controller |