Make memory usage graph discoverable
@@ -59,6 +59,53 @@ THE SOFTWARE.
</j:otherwise>
</j:choose>
</table>
+ <h1>${%Memory Usage}</h1>
+ <j:set var="type" value="${request.getParameter('type')}" />
+ <j:choose>
+ <j:when test="${type == 'sec10'}" />
+ <j:when test="${type == 'min'}" />
+ <j:when test="${type == 'hour'}" />
+ <j:otherwise>
+ <j:set var="type" value="min" />
+ </j:otherwise>
+ </j:choose>
+
+ <div>
+ ${%Timespan}:
+ <j:choose>
+ <j:when test="${type != 'sec10'}">
+ <a href="?type=sec10">${%Short}</a>
+ </j:when>
+ <j:otherwise>
+ ${%Short}
+ </j:otherwise>
+ </j:choose>
+ <st:nbsp />
+ <j:choose>
+ <j:when test="${type != 'min'}">
+ <a href="?type=min">${%Medium}</a>
+ </j:when>
+ <j:otherwise>
+ ${%Medium}
+ </j:otherwise>
+ </j:choose>
+ <st:nbsp />
+ <j:choose>
+ <j:when test="${type != 'hour'}">
+ <a href="?type=hour">${%Long}</a>
+ </j:when>
+ <j:otherwise>
+ ${%Long}
+ </j:otherwise>
+ </j:choose>
+ </div>
+ <script type="text/javascript">
+ var w = document.getElementById('main-panel').offsetWidth - 30;
+ document.write('<img src="${rootURL}/extensionList/hudson.diagnosis.MemoryUsageMonitor/0/heap/graph?type=${type}&amp;width=' + w + '&amp;height=500" alt="[${%Memory usage graph}]" />');
+ </script>
+ <noscript>
+ <img src="${rootURL}/extensionList/hudson.diagnosis.MemoryUsageMonitor/0/heap/graph?type=${type}&amp;width=500&amp;height=300" alt="[${%Memory usage graph}]" />
+ </noscript>
<h1>${%Thread Dumps}</h1>
<p>${%threadDump_blurb('threadDump')}</p>
</l:main-panel>
