mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-19 15:03:06 +00:00
[FIXED JENKINS-22674] Use JS to resize graph.
This will make the load statistics graphs fit the window width.
This commit is contained in:
1 parent
dcfeaf3c2a
commit
33e8a8ff00
1 file changed
+8
-2
@@ -58,8 +58,14 @@ THE SOFTWARE.
|
||||
${%Long}
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</div>
|
||||
<img src="${prefix?:'loadStatistics'}/graph?type=${type}&width=500&height=300" alt="[${%Load statistics graph}]" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var w = document.getElementById('main-panel').offsetWidth - 30;
|
||||
document.write('<img src="${prefix?:'loadStatistics'}/graph?type=${type}&width=' + w + '&height=500" alt="[${%Load statistics graph}]" />');
|
||||
</script>
|
||||
<noscript>
|
||||
<img src="${prefix?:'loadStatistics'}/graph?type=${type}&width=500&height=300" alt="[${%Load statistics graph}]" />
|
||||
</noscript>
|
||||
<div style="margin-top: 2em;">
|
||||
${%blurb}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user