Bug 34587: Add report type and provider name to failed background job report
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
cd2a642c31
commit
7ac6b1b72c
2 changed files with 22 additions and 5 deletions
|
@ -104,10 +104,11 @@ sub enqueue_sushi_harvest_jobs {
|
||||||
|
|
||||||
my $job_id = Koha::BackgroundJob::ErmSushiHarvester->new->enqueue(
|
my $job_id = Koha::BackgroundJob::ErmSushiHarvester->new->enqueue(
|
||||||
{
|
{
|
||||||
ud_provider_id => $self->erm_usage_data_provider_id,
|
ud_provider_id => $self->erm_usage_data_provider_id,
|
||||||
report_type => $report_type,
|
report_type => $report_type,
|
||||||
begin_date => $args->{begin_date},
|
begin_date => $args->{begin_date},
|
||||||
end_date => $args->{end_date},
|
end_date => $args->{end_date},
|
||||||
|
ud_provider_name => $self->name,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -172,7 +173,6 @@ sub harvest_sushi {
|
||||||
$self->{report_type} = $args->{report_type};
|
$self->{report_type} = $args->{report_type};
|
||||||
$self->{begin_date} = $args->{begin_date};
|
$self->{begin_date} = $args->{begin_date};
|
||||||
$self->{end_date} = $args->{end_date};
|
$self->{end_date} = $args->{end_date};
|
||||||
|
|
||||||
my $url = $self->_build_url_query;
|
my $url = $self->_build_url_query;
|
||||||
my $request = HTTP::Request->new( 'GET' => $url );
|
my $request = HTTP::Request->new( 'GET' => $url );
|
||||||
my $ua = LWP::UserAgent->new;
|
my $ua = LWP::UserAgent->new;
|
||||||
|
|
|
@ -51,6 +51,17 @@
|
||||||
</table>
|
</table>
|
||||||
[% ELSIF job.status == 'started' %]
|
[% ELSIF job.status == 'started' %]
|
||||||
<p id="jobactionlabel"></p>
|
<p id="jobactionlabel"></p>
|
||||||
|
[% ELSIF job.status == 'failed' %]
|
||||||
|
<table id="finishedtable">
|
||||||
|
<tr>
|
||||||
|
<td>Usage data provider</td>
|
||||||
|
<td><a id="failed_provider_name" href="/cgi-bin/koha/erm/eusage/usage_data_providers/[% report.ud_provider_id %]" title="Visit usage data provider"></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Report type</td>
|
||||||
|
<td id="failed_report_type"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF job.status != 'finished' %]
|
[% IF job.status != 'finished' %]
|
||||||
[% INCLUDE "job_progress.inc" job_id=job.id %]
|
[% INCLUDE "job_progress.inc" job_id=job.id %]
|
||||||
|
@ -111,6 +122,12 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let job_data = [% job.data %];
|
||||||
|
let report_type = job_data.report_type;
|
||||||
|
let ud_provider_name = job_data.ud_provider_name;
|
||||||
|
$('#failed_report_type').text(report_type);
|
||||||
|
$('#failed_provider_name').text(ud_provider_name);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue