projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: CTI-Test gefixt
[kivitendo-erp.git]
/
SL
/
Controller
/
BackgroundJob.pm
diff --git
a/SL/Controller/BackgroundJob.pm
b/SL/Controller/BackgroundJob.pm
index
b688297
..
3e89ecc
100644
(file)
--- 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('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
#
# actions
@@
-51,6
+51,16
@@
sub action_edit {
JOB_CLASSES => [ SL::BackgroundJob::Base->get_known_job_classes ]);
}
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) = @_;
sub action_create {
my ($self) = @_;