+sub init_models {
+ my ($self) = @_;
+
+ SL::Controller::Helper::GetModels->new(
+ controller => $self,
+ sorted => {
+ package_name => t8('Package name'),
+ run_at => t8('Run at'),
+ status => t8('Execution status'),
+ result => t8('Result'),
+ error => t8('Error'),
+ },
+ );
+}
+
+sub setup_list_action_bar {
+ my ($self) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ link => [
+ t8('Server control'),
+ link => $self->url_for(controller => 'TaskServer', action => 'show'),
+ ],
+ link => [
+ t8('List of jobs'),
+ link => $self->url_for(controller => 'BackgroundJob', action => 'list'),
+ ],
+ );
+ }
+}
+
+sub setup_show_action_bar {
+ my ($self) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ link => [
+ t8('Back'),
+ link => $self->url_for(action => 'list'),
+ ],
+ );
+ }
+}
+