Wiki source code of WikiStreamJob

Last modified by Stefan Taferner on 2014/04/21 22:47

Show last authors
1 {{velocity}}
2 #if ($xcontext.action == 'view')
3 ## Include
4 #set ($discard = $xwiki.jsx.use('WikiStream.WikiStreamJob'))
5 (%id="wikistream_job_status"%)((()))
6 #end
7 {{/velocity}}
8
9 {{velocity wiki="false"}}
10 #if ($xcontext.action == 'get')
11 ## Ajax
12
13 <div id="wikistream_job_status">
14 #set($job = $services.wikistream.currentJob)
15 #if ($job)
16 ## NOTE: We don't use #template because it currently registers the Velocity macros in a different namespace which makes
17 ## them unavailable in the current wiki page or the current template. We also tried #parse but it "randomly" fails to
18 ## register the Velocity macros from the parsed template. The only solution we found is to use #evaluate with #include
19 ## but unfortunately this doesn't allow the template to be overridden from the skin.
20 #evaluate("#include('extension.vm')")
21
22 <div class="extension-body">
23 Progress
24 <div>
25 #set($jobStatus = $job.status)
26 #if ($jobStatus.state.name() == 'RUNNING')
27 #displayJobProgressBar($jobStatus)
28 #end
29 #printStatusLog($jobStatus)
30 </div>
31 </div>
32 #end
33 </div>
34 #end
35 {{/velocity}}