Skip to content

Commit

Permalink
[FIXED JENKINS-22895] Added REST API support for the computer action.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfs-pure committed May 6, 2014
1 parent a18dfd1 commit 2a305a0
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -6,6 +6,7 @@

import hudson.XmlFile;
import hudson.model.Computer;
import hudson.model.Api;
import hudson.model.Hudson;
import hudson.model.Node;
import hudson.model.Slave;
Expand All @@ -23,12 +24,15 @@

import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.ExportedBean;
import org.kohsuke.stapler.export.Exported;


/**
*
* @author Lucie Votypkova
*/
@ExportedBean
public class ComputerConfigHistoryAction extends JobConfigHistoryBaseAction {

/**
Expand Down Expand Up @@ -101,6 +105,7 @@ public final String getIconFileName() {
* @throws IOException
* if {@link JobConfigHistoryConsts#HISTORY_FILE} might not be read or the path might not be urlencoded.
*/
@Exported
public final List<ConfigInfo> getSlaveConfigs() throws IOException {
checkConfigurePermission();
final ArrayList<ConfigInfo> configs = new ArrayList<ConfigInfo>();
Expand Down Expand Up @@ -314,4 +319,7 @@ public final void doForwardToRestoreQuestion(StaplerRequest req, StaplerResponse
rsp.sendRedirect("restoreQuestion?timestamp=" + timestamp);
}

public Api getApi() {
return new Api(this);
}
}

0 comments on commit 2a305a0

Please sign in to comment.