X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FBackgroundJob.pm;h=3e89ecc02ec395130e618108666215d4993932fb;hb=e73ff77bd82ac037e7189d0d30397dc08d8c9584;hp=b688297971b088d392a8f0fb332c09bb545d4c5f;hpb=4624b92aaf7520ff7f2d1ca6aa9abb295d1e01ca;p=kivitendo-erp.git 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) = @_;