提交 0971dee5 编写于 作者: K kohsuke

fixed #401.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2811 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b0e3c3de
......@@ -140,6 +140,10 @@ public abstract class Computer implements ModelObject {
return nodeName;
}
public String getCaption() {
return "Slave "+nodeName;
}
public String getUrl() {
return "computer/"+getDisplayName()+"/";
}
......
......@@ -528,6 +528,9 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
}
public Computer getComputer(String name) {
if(name.equals("(master)"))
name = "";
for (Computer c : computers.values()) {
if(c.getNode().getNodeName().equals(name))
return c;
......@@ -1444,6 +1447,16 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
super(Hudson.getInstance());
}
@Override
public String getDisplayName() {
return "master";
}
@Override
public String getCaption() {
return "Master";
}
@Override
public VirtualChannel getChannel() {
return localChannel;
......
......@@ -16,7 +16,7 @@
<h1>
<img src="${rootURL}/images/48x48/${it.icon}" width="48" height="48" />
Slave ${it.displayName}
${it.caption}
</h1>
<j:choose>
......
......@@ -8,8 +8,18 @@
<j:when test="${c.node==app}">
<tr>
<th class="pane">No.</th>
<th class="pane">Status</th>
<th class="pane"><st:nbsp/></th>
<th class="pane">
<j:choose>
<j:when test="${empty(app.slaves)}">
Status
</j:when>
<j:otherwise>
<a href="${rootURL}/computer/(master)/">Master</a>
<j:if test="${c.offline}">(offline)</j:if>
</j:otherwise>
</j:choose>
</th>
<th class="pane"><st:nbsp/></th>
</tr>
</j:when>
<j:otherwise>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册