|
|
1 |
{{template name="job_macros.vm"/}} |
|
|
2 |
|
|
|
3 |
{{velocity output="false"}} |
|
|
4 |
#macro(filterStreamJobMessage $jobStatus) |
|
|
5 |
#set($finished = $jobStatus.state.name() == 'FINISHED') |
|
|
6 |
#if ($finished) |
|
|
7 |
#if (!$jobStatus.logTail.hasLogLevel('ERROR')) |
|
|
8 |
## Remove when the following issue is resolved: |
|
|
9 |
## TODO XWIKI-22710: Add translations for FilterStreamJobJSON |
|
|
10 |
#success('Done.') |
|
|
11 |
#else |
|
|
12 |
#error('Error has been found during the conversion !') |
|
|
13 |
#end |
|
|
14 |
#end |
|
|
15 |
#end |
|
|
16 |
{{/velocity}} |
|
|
17 |
|
|
|
18 |
{{velocity wiki="false"}} |
|
|
19 |
#if ($xcontext.action == 'get') |
|
|
20 |
#set($job = $services.filter.currentJob) |
|
|
21 |
#getJobStatusJSON($job.status $json) |
|
|
22 |
#set($jobStatus = $job.status) |
|
|
23 |
#set ($json.message = "#filterStreamJobMessage($jobStatus)") |
|
|
24 |
$response.setContentType('application/json') |
|
|
25 |
$jsontool.serialize($json) |
|
|
26 |
#end |
|
|
27 |
{{/velocity}} |