I'm trying to add an Action, accessible via a link in the left side menu, to
a new page to show information per Computer/Node. I have trouble finding
necessary information on the wiki and in the javadoc.

I started with NodeProperty, listed on the  Jenkins Extension Points
<https://wiki.jenkins-ci.org/display/JENKINS/Extension+points#Extensionpoints-hudson.slaves.NodeProperty>
  
page. The javadoc of  NodeProperty
<http://javadoc.jenkins-ci.org/?hudson/slaves/NodeProperty.html>   is
encouraging: "contribute this extension point to add additional data or UI
actions". However I don't see any mechanism from this class to actually add
an Action to a Node. There is no function to implement/override to return a
new Action. Could someone point me to an example of an action added via the
NodeProperty extension?

After more reading, I noticed that the javadoc of  Computer
<http://javadoc.jenkins-ci.org/index.html?hudson/model/Computer.html>  
states that "this object also serves UI (since Node is an interface and
can't have related side pages).". However  Node
<http://javadoc.jenkins-ci.org/index.html?hudson/model/Node.html>   is not
an interface, it's an abstract class, just like Computer.

In the end it seems that the way to go is to use 
TransientComputerActionFactory
<http://javadoc.jenkins-ci.org/index.html?hudson/model/TransientComputerActionFactory.html>
 
, is that correct?

Based on feedback, a little bit of clean-up in the javadoc of Computer
and/or NodeProperty could be done. I volunteer :-)

Thanks,

Dominique



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/Add-an-action-to-a-Node-Computer-tp4720123.html
Sent from the Jenkins dev mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to