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; |
locale/de/all | ||
---|---|---|
1616 | 1616 |
'Jahresverkehrszahlen neu' => 'Jahresverkehrszahlen neu', |
1617 | 1617 |
'Jan' => 'Jan', |
1618 | 1618 |
'January' => 'Januar', |
1619 |
'Job history' => 'Jobverlauf', |
|
1619 | 1620 |
'Journal' => 'Buchungsjournal', |
1620 | 1621 |
'Journal of Last 10 Transfers' => 'Letzte 10 Lagertransaktionen', |
1621 | 1622 |
'Jul' => 'Jul', |
... | ... | |
1694 | 1695 |
'List of bank transfers' => 'Überweisungsliste', |
1695 | 1696 |
'List of custom variables' => 'Liste der benutzerdefinierten Variablen', |
1696 | 1697 |
'List of database upgrades to be applied:' => 'Liste der noch einzuspielenden Datenbankupgrades:', |
1698 |
'List of jobs' => 'Jobliste', |
|
1697 | 1699 |
'List of tax zones' => 'Liste der Steuerzonen', |
1698 | 1700 |
'List open SEPA exports' => 'Noch nicht ausgeführte SEPA-Exporte anzeigen', |
1699 | 1701 |
'Load' => 'Laden', |
... | ... | |
2718 | 2720 |
'Start date' => 'Startdatum', |
2719 | 2721 |
'Start of year' => 'Jahresanfang', |
2720 | 2722 |
'Start process' => 'Prozess starten', |
2721 |
'Start task server' => 'Task-Server starten',
|
|
2723 |
'Start server' => 'Server starten',
|
|
2722 | 2724 |
'Start the correction assistant' => 'Korrekturassistenten starten', |
2723 | 2725 |
'Startdate_coa' => 'Gültig ab', |
2724 | 2726 |
'Starting Balance' => 'Eröffnungsbilanzwerte', |
... | ... | |
2740 | 2742 |
'Stock for part #1' => 'Bestand für Artikel #1', |
2741 | 2743 |
'Stock value' => 'Bestandswert', |
2742 | 2744 |
'Stocked Qty' => 'Lagermenge', |
2743 |
'Stop task server' => 'Task-Server beenden',
|
|
2745 |
'Stop server' => 'Server stoppen',
|
|
2744 | 2746 |
'Stopping the task server failed. Output:' => 'Das Beenden des Task-Servers schlug fehl.', |
2745 | 2747 |
'Storage Backends' => 'Datei-Speicher', |
2746 | 2748 |
'Storage Type for Attachments' => 'Speichertyp für Anhänge', |
templates/webpages/task_server/show.html | ||
---|---|---|
1 |
[% USE HTML %][% USE L %][% USE LxERP %] |
|
1 |
[% USE HTML %][% USE L %][% USE LxERP %][%- USE P -%]
|
|
2 | 2 |
<h1>[% FORM.title %]</h1> |
3 | 3 |
|
4 | 4 |
[%- INCLUDE 'common/flash.html' %] |
... | ... | |
20 | 20 |
</tbody> |
21 | 21 |
</table> |
22 | 22 |
|
23 |
<p> |
|
24 |
[% IF SELF.task_server.is_running %] |
|
25 |
<a href="[% SELF.url_for(action => 'stop') %]">[%- LxERP.t8('Stop task server') %]</a> |
|
26 |
[%- ELSE %] |
|
27 |
<a href="[% SELF.url_for(action => 'start') %]">[%- LxERP.t8('Start task server') %]</a> |
|
28 |
[%- END %] |
|
29 |
| |
|
30 |
<a href="[% SELF.url_for(controller => 'BackgroundJob', action => 'list') %]">[%- LxERP.t8('View background jobs') %]</a> |
|
31 |
| |
|
32 |
<a href="[% SELF.url_for(controller => 'BackgroundJobHistory', action => 'list') %]">[%- LxERP.t8('View background job history') %]</a> |
|
33 |
</p> |
|
23 |
<form id="form" method="post" action="controller.pl"> |
|
24 |
[% P.hidden_tag("action", "TaskServer/" _ (SELF.task_server.is_running ? "stop" : "start")) %] |
|
25 |
</form> |
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei »Task-Server-Steuerung«