Revision 35f3e56a
Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt
SL/Controller/BackgroundJobHistory.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use parent qw(SL::Controller::Base); |
6 | 6 |
|
7 |
use SL::Controller::Helper::GetModels; |
|
8 |
use SL::Controller::Helper::Sorted; |
|
7 | 9 |
use SL::DB::BackgroundJobHistory; |
8 | 10 |
use SL::Helper::Flash; |
9 | 11 |
use SL::System::TaskServer; |
... | ... | |
18 | 20 |
__PACKAGE__->run_before('add_stylesheet'); |
19 | 21 |
__PACKAGE__->run_before('check_task_server'); |
20 | 22 |
|
23 |
__PACKAGE__->make_sorted( |
|
24 |
DEFAULT_BY => 'run_at', |
|
25 |
DEFAULT_DIR => 1, |
|
26 |
MODEL => 'BackgroundJobHistory', |
|
27 |
FORM_PARAMS => [ qw(sort_by sort_dir) ], |
|
28 |
ONLY => [ qw(list) ], |
|
29 |
|
|
30 |
package_name => $::locale->text('Package name'), |
|
31 |
run_at => $::locale->text('Run at'), |
|
32 |
status => $::locale->text('Execution status'), |
|
33 |
result => $::locale->text('Result'), |
|
34 |
error => $::locale->text('Error'), |
|
35 |
); |
|
36 |
|
|
21 | 37 |
# |
22 | 38 |
# actions |
23 | 39 |
# |
... | ... | |
27 | 43 |
|
28 | 44 |
$self->render('background_job_history/list', |
29 | 45 |
title => $::locale->text('Background job history'), |
30 |
ENTRIES => SL::DB::Manager::BackgroundJobHistory->get_all_sorted);
|
|
46 |
ENTRIES => $self->get_models);
|
|
31 | 47 |
} |
32 | 48 |
|
33 | 49 |
sub action_show { |
templates/webpages/background_job_history/list.html | ||
---|---|---|
15 | 15 |
<table id="background_job_history_list" class="background_job_list" width="100%"> |
16 | 16 |
<thead> |
17 | 17 |
<tr class="listheading"> |
18 |
<th>[%- LxERP.t8('Package name') %]</th>
|
|
19 |
<th>[%- LxERP.t8('Run at') %]</th>
|
|
20 |
<th>[%- LxERP.t8('Execution status') %]</th>
|
|
21 |
<th>[%- LxERP.t8('Result') %]</th>
|
|
22 |
<th>[%- LxERP.t8('Error') %]</th>
|
|
18 |
<th>[% L.sortable_table_header('package_name') %]</th>
|
|
19 |
<th>[% L.sortable_table_header('run_at') %]</th>
|
|
20 |
<th>[% L.sortable_table_header('status') %]</th>
|
|
21 |
<th>[% L.sortable_table_header('result') %]</th>
|
|
22 |
<th>[% L.sortable_table_header('error') %]</th>
|
|
23 | 23 |
</tr> |
24 | 24 |
</thead> |
25 | 25 |
|
... | ... | |
27 | 27 |
[%- FOREACH entry = ENTRIES %] |
28 | 28 |
<tr class="listrow[% loop.count % 2 %]" id="background_job_history_id_[% entry.id %]"> |
29 | 29 |
<td> |
30 |
<a href="[% SELF.url_for(action => 'show', id => entry.id) %]"> |
|
30 |
<a href="[% SELF.url_for(action => 'show', id => entry.id, back_to => SELF.get_callback) %]">
|
|
31 | 31 |
[%- HTML.escape(entry.package_name) %] |
32 | 32 |
</a> |
33 | 33 |
</td> |
Auch abrufbar als: Unified diff
Listenansicht in BackgroundJobHistory-Controller sortierbar gemacht