year=${year:-$(date +%Y)}
month=${month:-$(date +%m)}
-day=${day-$(date +%d)}
-host=${host:-air-collect}
+day=${day-}
+host=${host:-cubie}
user=${user:-root}
ssh "$host" ${user:+-l "$user"} \
rrdtool dump \~user/work/tool/air/rrd/"$year"/"$month".rrd |
rrdtool restore -f - rrd/"$year"/"$month".rrd
-make NO_INO=set view/"$year"/"$month"/html5
+make NO_INO=set view/"$year"/"$month"/${day:+$day/}png
+make NO_INO=set view/"$year"/"$month"/${day:+$day/}html5
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"
encoding="UTF-8" indent="yes" method="html"/>
+ <xsl:param name="refresh-interval" select="'60'"/>
<xsl:template match="report">
<html>
<head>
text-decoration:none;
}
</style>
+ <script type="application/javascript">
+ var PageRefresh = {};
+ PageRefresh.interval = <xsl:value-of select="$refresh-interval"/>;
+ PageRefresh.refresh = function() {
+ window.setTimeout(function(){
+ window.location.reload(true);
+ setTimeout(arguments.callee, PageRefresh.interval * 1000);
+ }, PageRefresh.interval * 1000);
+ }
+ </script>
</head>
- <body>
+ <body onload="PageRefresh.refresh()">
<table class="graphs">
<tbody>
<xsl:apply-templates/>