X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/efb9a24f2252104ab4af5c25334119d7c5c70a8c..7038ccd5ea5b42f1c02c46dfa1dd23355d503ee7:/SL/Controller/BackgroundJob.pm diff --git a/SL/Controller/BackgroundJob.pm b/SL/Controller/BackgroundJob.pm index b68829797..3e89ecc02 100644 --- a/SL/Controller/BackgroundJob.pm +++ b/SL/Controller/BackgroundJob.pm @@ -19,7 +19,7 @@ use Rose::Object::MakeMethods::Generic __PACKAGE__->run_before('check_auth'); __PACKAGE__->run_before('check_task_server'); -__PACKAGE__->run_before('load_background_job', only => [ qw(edit update destroy execute) ]); +__PACKAGE__->run_before('load_background_job', only => [ qw(edit update destroy execute show) ]); # # actions @@ -51,6 +51,16 @@ sub action_edit { JOB_CLASSES => [ SL::BackgroundJob::Base->get_known_job_classes ]); } +sub action_show { + my ($self) = @_; + + if ($::request->type eq 'json') { + $self->render(\ SL::JSON::to_json($self->background_job->as_tree), { type => 'json' }); + } else { + $self->action_edit; + } +} + sub action_create { my ($self) = @_;