How to implement progressiveHtml kind of an approach

845 views
Skip to first unread message

Ravi Teja Lokineni

unread,
Dec 27, 2012, 4:46:56 AM12/27/12
to jenkin...@googlegroups.com
Hi,

I wasn't able to figure out what Jenkins is doing(for achieving the progressive html of the console logs) by looking at the code. Could someone please give me an overview of how it's implemented. I would like to use a similar approach in one of my projects I'm involved in.

Ravi Teja Lokineni

unread,
Dec 28, 2012, 3:44:33 AM12/28/12
to jenkin...@googlegroups.com
Anyone? Just an overview?


On Thu, Dec 27, 2012 at 3:16 PM, Ravi Teja Lokineni <raviteja...@gmail.com> wrote:
Hi,

I wasn't able to figure out what Jenkins is doing(for achieving the progressive html of the console logs) by looking at the code. Could someone please give me an overview of how it's implemented. I would like to use a similar approach in one of my projects I'm involved in.



--
Ravi Teja Lokineni | Software Engineer
SemanticBits India Pvt. Ltd.


Frederik Fromm

unread,
Dec 28, 2012, 4:13:12 AM12/28/12
to jenkinsci-dev
Hi Ravi,
 
if you use the network tab in firebug/firefox while you see a progressing log output of a running job, you will often find something like
 
http://<jenkins url>/job/<job name>/<build nr>/logText/progrssiveHtml
 
This leads to the file /core/src/main/resources/hudson/model/Run/console.jelly and /core/src/main/resources/lib/hudson/progressiveText.jelly of the jenkins-core maven module, where this link is used in the progressiveText tag. The implementation can be found in /core/src/main/java/hudson/model/LargeText.java in the method doProgressiveText.
 
In short, its an AJAX request called every x seconds adding more console output to the <pre id="out">-html element.
 
Hope this helps.
 
Regards,
 
Frederik


2012/12/28 Ravi Teja Lokineni <raviteja...@gmail.com>
Reply all
Reply to author
Forward
0 new messages