forked from I2P_Developers/i2p.i2p
Sidebar:
- Fix erratic display of sidebar graph - Add id to memory bar so we can target it for Chrome/blink display issue
This commit is contained in:
@ -802,7 +802,7 @@ class SummaryBarRenderer {
|
|||||||
.append("\"><td><span id=\"sb_graphstats\">")
|
.append("\"><td><span id=\"sb_graphstats\">")
|
||||||
.append(_helper.getSecondKBps())
|
.append(_helper.getSecondKBps())
|
||||||
.append("Bps</span></td></tr></table></a></div>\n");
|
.append("Bps</span></td></tr></table></a></div>\n");
|
||||||
// .append("<script src=\"/js/refreshGraph.js\" type=\"text/javascript\"></script>");
|
buf.append("<script src=\"/js/refreshGraph.js\" type=\"text/javascript\" id=\"refreshGraph\" async></script>");
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ public class SummaryHelper extends HelperBase {
|
|||||||
// long free = Runtime.getRuntime().freeMemory()/1024/1024;
|
// long free = Runtime.getRuntime().freeMemory()/1024/1024;
|
||||||
// return integerFormatter.format(used) + "MB (" + usedPc + "%)";
|
// return integerFormatter.format(used) + "MB (" + usedPc + "%)";
|
||||||
// return integerFormatter.format(used) + "MB / " + free + " MB";
|
// return integerFormatter.format(used) + "MB / " + free + " MB";
|
||||||
return "<div class=\"percentBarOuter\"><div class=\"percentBarText\">RAM: " + integerFormatter.format(used) + " / " + total + "MB" +
|
return "<div class=\"percentBarOuter\" id=\"sb_memoryBar\"><div class=\"percentBarText\">RAM: " + integerFormatter.format(used) + " / " + total + "MB" +
|
||||||
"</div><div class=\"percentBarInner\" style=\"width: " + integerFormatter.format(usedPc) +
|
"</div><div class=\"percentBarInner\" style=\"width: " + integerFormatter.format(usedPc) +
|
||||||
"%;\"></div></div>";
|
"%;\"></div></div>";
|
||||||
}
|
}
|
||||||
|
@ -35,14 +35,10 @@ function ajaxDone(url, target, refresh) {
|
|||||||
//document.getElementByClassName("hideifdown").style.display="none";
|
//document.getElementByClassName("hideifdown").style.display="none";
|
||||||
}
|
}
|
||||||
|
|
||||||
// conditionally load sidebar refreshGraph script
|
// conditionally display graph so ajax call doesn't interfere with refreshGraph.js
|
||||||
var graph = document.getElementById('sb_graphcontainer');
|
var graph = document.getElementById("sb_graphcontainer");
|
||||||
if (graph) {
|
if (graph) {
|
||||||
var js_refreshGraph = document.createElement('script');
|
graph.style.backgroundImage = "url(/viewstat.jsp?stat=bw.combined&periodCount=20&width=220&height=50&hideLegend=true&hideGrid=true&time=" + new Date().getTime();
|
||||||
js_refreshGraph.type = "text/javascript";
|
|
||||||
js_refreshGraph.src = "/js/refreshGraph.js";
|
|
||||||
js_refreshGraph.async = true;
|
|
||||||
document.getElementsByTagName('head')[0].appendChild(js_refreshGraph);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(function() {ajax(url, target, refresh);}, refresh);
|
setTimeout(function() {ajax(url, target, refresh);}, refresh);
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2017-11-02 str4d
|
||||||
|
* Console:
|
||||||
|
- Sidebar:
|
||||||
|
- Fix erratic display of sidebar graph
|
||||||
|
- Add id to memory bar so we can target it for Chrome/blink display issue
|
||||||
|
|
||||||
2017-10-25 str4d
|
2017-10-25 str4d
|
||||||
* Console:
|
* Console:
|
||||||
- /graphs:
|
- /graphs:
|
||||||
|
Reference in New Issue
Block a user