Skip to content

Commit

Permalink
[JENKINS-8996] Include OS type and version of slave in the system inf…
Browse files Browse the repository at this point in the history
…ormation page.
  • Loading branch information
PaulSandoz committed Mar 13, 2011
1 parent 779e113 commit 51beb72
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -91,6 +91,9 @@
Added an option to aggregated test results to include failed builds as well as passing and unstable builds.
<li class=rfe>
Added autocompletion to "Build after other projects" textbox, with support for "autoCompleteField" on textboxes without a true field.
<li class=rfe>
Include OS type and version of slave in the system information page.
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-8996">issue 8996</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
14 changes: 14 additions & 0 deletions core/src/main/java/hudson/slaves/SlaveComputer.java
Expand Up @@ -514,6 +514,20 @@ protected ComputerLauncher grabLauncher(Node node) {
return ((Slave)node).getLauncher();
}

/**
* Get the slave version
*/
public String getSlaveVersion() throws IOException, InterruptedException {
return channel.call(new SlaveVersion());
}

/**
* Get the OS description.
*/
public String getOSDescription() throws IOException, InterruptedException {
return channel.call(new DetectOS()) ? "Unix" : "Windows";
}

private static final Logger logger = Logger.getLogger(SlaveComputer.class.getName());

private static final class SlaveVersion implements Callable<String,IOException> {
Expand Down
Expand Up @@ -33,6 +33,7 @@ THE SOFTWARE.

<l:main-panel>
<l:isAdmin>
<h1>${it.oSDescription} slave, version ${it.slaveVersion}</h1>
<h1>${%System Properties}</h1>
<t:propertyTable items="${it.systemProperties}" />
<h1>${%Environment Variables}</h1>
Expand Down

0 comments on commit 51beb72

Please sign in to comment.