Hi - I am looking for help with an Action Jenkins plugin for the Manage 
Nodes page. I have done quite a bit of googling and reading of 
tutorials/forum questions etc.

I am also quite new to the Jelly file way of programming too, but have 
written some other jenkins plugins, but not an actions one before.

I have figured out how to get the Action link to show up for a given Node's 
page.. but not for the "Nodes" main page that lists all the Nodes. 

Any tips/pointers would be greatly appreciated!

This is what I was using to get the Action to show up on the Node page 
public final class NodeCycleTransientComputerActionFactory extends
TransientComputerActionFactory {
    @Override
    public Collection<? extends Action> createFor(final Computer target) {
        return Collections.singleton(new NodeCycleAction(target));
    }
}


1. What would I use to get an action link on the main root manage nodes 
page? Is this even possible?

2. I am not quite fully understanding how to deliver content to this link 
when you click on it? I think it has to do with the index.jelly file for 
the plugin? The Action class specifies the URL to go to when you click, but 
I am not fully getting how to contribute content to this page,would this go 
in the index.jelly file? How does that tie in to the getURLName function 
that the Action class returns? I know naming matters when using these 
classes with jelly files

This is my index.jelly file now, there is not much there
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" 
xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" 
xmlns:f="/lib/form">
  <l:layout>
    <st:include it="${it.owner}" page="sidepanel.jelly" />
    <l:main-panel>
           
    </l:main-panel>
  </l:layout>
</j:jelly>

This is my Action class
public final class NodeCycleAction implements Action {
    private final Computer target;

    public NodeCycleAction(final Computer target) {
        this.target = target;
    }
      
    public String getIconFileName() {
        return "search.png";
    }

    public String getUrlName() {
        return "index";
    }
    
    public String getDisplayName() {
        return "Test Cycle";
    }
    
 
  
}

-- 
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