Adding a link with Action similar to console output

4 messages Options
Embed this post
Permalink
Rinat Ailon (rgoren)

Adding a link with Action similar to console output

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
 
Hi, 
 
I'm a newbie to Hudson plugin development. I hope I can find some help here...
I would like to write a plugin for parsing the console output.
I added an Action in my plugin and I'm able to see the link on the left hand side with the icon and correct link name.
The parsed file I created  is in HTML format  and  resides in the same directory alongside the "log" file which is referenced by the "Console Output" link.
How should I implement the getUrlName() method so that it displays the parsed file  in the way console output is displayed ?
 
Any code examples will be greatly appreciated.
 
Thanks,
Rinat
Benjamin Shine-2

Re: Adding a link with Action similar to console output

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
I doubt this is the *best* way to do it, but I think that you *can* do it with DirectoryBrowserSupport. 

Probably a better way involves getting the stapler request with a getDynamic() and serving up the contents of that file yourself; that's probably like 12 lines of code, whereas the DirectoryBrowserSupport is more like 3. 

To get a sense of what's going on here, read the stapler documentation. It's simple but not easy. 

-ben 


On Oct 12, 2009, at 1:02 AM, Rinat Ailon (rgoren) wrote:

 
Hi, 
 
I'm a newbie to Hudson plugin development. I hope I can find some help here...
I would like to write a plugin for parsing the console output.
I added an Action in my plugin and I'm able to see the link on the left hand side with the icon and correct link name.
The parsed file I created  is in HTML format  and  resides in the same directory alongside the "log" file which is referenced by the "Console Output" link.
How should I implement the getUrlName() method so that it displays the parsed file  in the way console output is displayed ?
 
Any code examples will be greatly appreciated.
 
Thanks,
Rinat

Kohsuke Kawaguchi

Re: Adding a link with Action similar to console output

Reply Threaded More More options
Print post
Permalink
In reply to this post by Rinat Ailon (rgoren)
Rinat Ailon (rgoren) wrote:

>  
> Hi,
>  
> I'm a newbie to Hudson plugin development. I hope I can find some help
> here...
> I would like to write a plugin for parsing the console output.
> I added an Action in my plugin and I'm able to see the link on the left
> hand side with the icon and correct link name.
> The parsed file I created  is in HTML format  and  resides in the same
> directory alongside the "log" file which is referenced by the "Console
> Output" link.
> How should I implement the getUrlName() method so that it displays the
> parsed file  in the way console output is displayed ?
So if I understand you correctly, you'd like to do incremental update
like the console output does, except it's in HTML and not in plain text?

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/


smime.p7s (4K) Download Attachment
Rinat Ailon (rgoren)

RE: Re: Adding a link with Action similar to console output

Reply Threaded More More options
Print post
Permalink
Thanks, but I managed, I needed to figure out the "doDynamic" mechanism
, and then I used iframes to include my pre-generated HTML files.
I was not looking for incremental update. My problem was that I wanted
to display a large pre-generated html and I was having memory issues .
When I tried using a stream Reader it displayed as text , not html.


 

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:[hidden email]]
Sent: Wednesday, October 28, 2009 10:53 PM
To: [hidden email]
Subject: Re: Adding a link with Action similar to console output

Rinat Ailon (rgoren) wrote:
>  
> Hi,
>  
> I'm a newbie to Hudson plugin development. I hope I can find some help

> here...
> I would like to write a plugin for parsing the console output.
> I added an Action in my plugin and I'm able to see the link on the
> left hand side with the icon and correct link name.
> The parsed file I created  is in HTML format  and  resides in the same

> directory alongside the "log" file which is referenced by the "Console

> Output" link.
> How should I implement the getUrlName() method so that it displays the

> parsed file  in the way console output is displayed ?

So if I understand you correctly, you'd like to do incremental update
like the console output does, except it's in HTML and not in plain text?

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]