| 1 | use MooseX::Declare; | ||
| 2 | |||
| 3 | class ETLp::Audit::Browser::Controller::FileProcess extends ETLp::Audit::Browser::Controller::Base { | ||
| 4 | |||
| 5 | method list { | ||
| 6 | my $q = $self->query; | ||
| 7 | my $item_id = $q->param('item_id') || undef; | ||
| 8 | my $file_id = $q->param('file_id') || undef; | ||
| 9 | my $page = $q->param('page') || 1; | ||
| 10 | my $canonical_file; | ||
| 11 | |||
| 12 | if ($file_id) { | ||
| 13 | $canonical_file = $self->model->get_canonical_file($file_id); | ||
| 14 | } | ||
| 15 | |||
| 16 | my $file_processes = $self->model->get_file_processes( | ||
| 17 | file_id => $file_id, item_id => $item_id, page => $page); | ||
| 18 | return $self->tt_process( | ||
| 19 | {canonical_file => $canonical_file, file_processes => $file_processes}); | ||
| 20 | } | ||
| 21 | |||
| 22 | method setup { | ||
| 23 | $self->start_mode('list'); | ||
| 24 | $self->run_modes([qw/list error/]); | ||
| 25 | } | ||
| 26 | |||
| 27 | method module { | ||
| 28 | return 'File Process'; | ||
| 29 | } | ||
| 30 | |||
| 31 | } |