Revision 461b3caf
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
SL/Controller/TaskServer.pm | ||
---|---|---|
5 | 5 |
use parent qw(SL::Controller::Base); |
6 | 6 |
|
7 | 7 |
use SL::Helper::Flash; |
8 |
use SL::Locale::String qw(t8); |
|
8 | 9 |
use SL::System::TaskServer; |
9 | 10 |
|
10 | 11 |
use Rose::Object::MakeMethods::Generic |
... | ... | |
25 | 26 |
|
26 | 27 |
flash('warning', $::locale->text('The task server does not appear to be running.')) if !$self->task_server->is_running; |
27 | 28 |
|
29 |
$self->setup_show_action_bar; |
|
28 | 30 |
$self->render('task_server/show', |
29 | 31 |
title => $::locale->text('Task server status'), |
30 | 32 |
last_command_output => $::auth->get_session_value('TaskServer::last_command_output')); |
... | ... | |
84 | 86 |
return SL::System::TaskServer->new; |
85 | 87 |
} |
86 | 88 |
|
89 |
sub setup_show_action_bar { |
|
90 |
my ($self) = @_; |
|
91 |
|
|
92 |
for my $bar ($::request->layout->get('actionbar')) { |
|
93 |
$bar->add( |
|
94 |
action => [ |
|
95 |
$self->task_server->is_running ? t8('Stop server') : t8('Start server'), |
|
96 |
submit => [ '#form' ], |
|
97 |
accesskey => 'enter', |
|
98 |
], |
|
99 |
link => [ |
|
100 |
t8('List of jobs'), |
|
101 |
link => $self->url_for(controller => 'BackgroundJob', action => 'list'), |
|
102 |
], |
|
103 |
link => [ |
|
104 |
t8('Job history'), |
|
105 |
link => $self->url_for(controller => 'BackgroundJobHistory', action => 'list'), |
|
106 |
], |
|
107 |
); |
|
108 |
} |
|
109 |
} |
|
110 |
|
|
87 | 111 |
1; |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei »Task-Server-Steuerung«