__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
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) = @_;