summaryrefslogtreecommitdiff
path: root/docs/examples/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/index.html')
-rw-r--r--docs/examples/index.html40
1 files changed, 39 insertions, 1 deletions
diff --git a/docs/examples/index.html b/docs/examples/index.html
index 820070e..267d221 100644
--- a/docs/examples/index.html
+++ b/docs/examples/index.html
@@ -20,7 +20,17 @@
<script type="text/javascript">
$(function() {
- //return;
+ var rrdgraph = new RRDGraph("canvas");
+ rrdgraph.cmdline($('#cmdline').val());
+ var url = 'data/load/load.rrd';
+ jarmon.downloadBinary(url).always(
+ function(res){
+ var rrd = new RRDFile(res);
+ rrdgraph.rrdfiles[url] = rrd;
+ rrdgraph.graph_paint();
+ })
+
+// return;
jarmon.buildTabbedChartUi(
$('.chart-container').remove(),
jarmon.CHART_RECIPES_COLLECTD,
@@ -33,6 +43,34 @@
</head>
<body>
+<canvas id="canvas"></canvas>
+<textarea id="cmdline" rows="10" cols="120">-s end-1h -w 600 -h 120 -v "System load" -t Load -E
+DEF:s_avg=data/load/load.rrd:shortterm:AVERAGE
+DEF:s_min=data/load/load.rrd:shortterm:MIN
+DEF:s_max=data/load/load.rrd:shortterm:MAX
+DEF:m_avg=data/load/load.rrd:midterm:AVERAGE
+DEF:m_min=data/load/load.rrd:midterm:MIN
+DEF:m_max=data/load/load.rrd:midterm:MAX
+DEF:l_avg=data/load/load.rrd:longterm:AVERAGE
+DEF:l_min=data/load/load.rrd:longterm:MIN
+DEF:l_max=data/load/load.rrd:longterm:MAX
+AREA:s_max#B7EFB7
+AREA:s_min#FFFFFF
+"LINE1:s_avg#00E000: 1m average"
+"GPRINT:s_min:MIN:%4.2lf Min,"
+"GPRINT:s_avg:AVERAGE:%4.2lf Avg,"
+"GPRINT:s_max:MAX:%4.2lf Max,"
+"GPRINT:s_avg:LAST:%4.2lf Last\n"
+"LINE1:m_avg#0000FF: 5m average"
+"GPRINT:m_min:MIN:%4.2lf Min,"
+"GPRINT:m_avg:AVERAGE:%4.2lf Avg,"
+"GPRINT:m_max:MAX:%4.2lf Max,"
+"GPRINT:m_avg:LAST:%4.2lf Last\n"
+"LINE1:l_avg#FF0000:15m average"
+"GPRINT:l_min:MIN:%4.2lf Min,"
+"GPRINT:l_avg:AVERAGE:%4.2lf Avg,"
+"GPRINT:l_max:MAX:%4.2lf Max,"
+"GPRINT:l_avg:LAST:%4.2lf Last\n"</textarea>
<div class="chartRangeControl">
<form>
<div>