3 <!--[if IE]><script type="text/javascript" src="<%=resource%>/livestats/ExCanvas.js"></script><![endif]-->
4 <script type="text/javascript" src="<%=resource%>/livestats/MochiKit.js"></script>
5 <script type="text/javascript" src="<%=resource%>/livestats/JsonRpc.js"></script>
6 <script type="text/javascript" src="<%=resource%>/livestats/PlotKit.js"></script>
7 <script type="text/javascript" src="<%=resource%>/livestats/GraphRPC.js"></script>
8 <script type="text/javascript" src="<%=resource%>/livestats/Legend.js"></script>
10 <script type="text/javascript">
11 function initGraphs() {
12 var rpc = new GraphRPC(
13 document.getElementById('live_graphs'),
14 '<%=luci.dispatcher.build_url('rpc', 'sys')%>', 'loadavg',
18 [ 0, "1 <%:min%>", 1, "5 <%:min%>", 2, "15 <%:min%>" ],
20 // Graph layout options
21 { title: '<%:Load average%>', strokeWidth: 2.5, shouldFill: false, strokeColor: null,
22 padding: { left: 70, right: 10, top: 10, bottom: 20 },
23 instances: [ false ], yAxis: [ 0, 2 ], drawBackground: false },
29 MochiKit.DOM.addLoadEvent(initGraphs);
32 <div id="live_graphs"></div>