提交 1f069817 编写于 作者: D Daniel Beck

Merge pull request #1196 from daniel-beck/JENKINS-22672

[FIXED JENKINS-22672] Make /threadDump easier to use.
......@@ -279,6 +279,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutionException;
......@@ -2959,7 +2960,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
r.put(e.getKey(), Collections.singletonMap("Failed to retrieve thread dump",sw.toString()));
}
}
return r;
return Collections.unmodifiableSortedMap(new TreeMap<String, Map<String, String>>(r));
}
@RequirePOST
......
......@@ -32,11 +32,23 @@ THE SOFTWARE.
<l:main-panel>
<h1>${%Thread Dump}</h1>
<j:forEach var="e" items="${it.getAllThreadDumps().entrySet()}" varStatus="loop">
<j:set var="tdumps" value="${it.getAllThreadDumps()}"/>
<j:forEach var="e" items="${tdumps.entrySet()}">
<j:if test="${e.key != null and e.key.length() > 0}">
<a href="#id${e.key.hashCode()}"><img src="${imagesURL}/16x16/computer.png" style="margin-left:10px;" /> ${e.key}</a>
</j:if>
</j:forEach>
<j:forEach var="e" items="${tdumps.entrySet()}" varStatus="loop">
<j:if test="${!loop.first}">
<hr style="margin-bottom:6em"/>
</j:if>
<h1>${e.key}</h1>
<j:if test="${e.key != null and e.key.length() > 0}">
<h1 id="id${e.key.hashCode()}">
<img src="${imagesURL}/32x32/computer.png"/> <a href="/computer/${e.key}" class="model-link inside">${e.key}</a>
</h1>
</j:if>
<j:forEach var="t" items="${e.value.entrySet()}">
<h2>${t.key}</h2>
<pre>${t.value}</pre>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册