summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Hagedorn <hagedorn@mcs.anl.gov>2006-05-31 18:56:09 +0000
committerJoey Hagedorn <hagedorn@mcs.anl.gov>2006-05-31 18:56:09 +0000
commitfdbc37924fcbd5a2ea3eeadf098e99fc652c805a (patch)
tree5e0171f3f35eb34c2e69cd543664e6af1d53d7ab
parent0792c96cd53bb310d1d3da18bc8d7ef5015280d0 (diff)
downloadbcfg2-fdbc37924fcbd5a2ea3eeadf098e99fc652c805a.tar.gz
bcfg2-fdbc37924fcbd5a2ea3eeadf098e99fc652c805a.tar.bz2
bcfg2-fdbc37924fcbd5a2ea3eeadf098e99fc652c805a.zip
Added auto-refreshing feature to reports; specifiable by config file.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1867 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--reports/xsl-transforms/nodes-digest-www.xsl4
-rw-r--r--reports/xsl-transforms/overview-matrix-www.xsl3
-rw-r--r--reports/xsl-transforms/overview-stats-www.xsl3
-rw-r--r--reports/xsl-transforms/timing-summary-www.xsl3
-rwxr-xr-xsrc/sbin/StatReports5
5 files changed, 16 insertions, 2 deletions
diff --git a/reports/xsl-transforms/nodes-digest-www.xsl b/reports/xsl-transforms/nodes-digest-www.xsl
index 40de7490c..d96f05e98 100644
--- a/reports/xsl-transforms/nodes-digest-www.xsl
+++ b/reports/xsl-transforms/nodes-digest-www.xsl
@@ -21,7 +21,9 @@
<xsl:otherwise>BCFG Nightly Errors (<xsl:value-of select="@name" />)</xsl:otherwise>
</xsl:choose>
</title>
-
+ <xsl:if test="count(/Report/@refresh-time) > 0">
+ <META HTTP-EQUIV="Refresh" CONTENT="{@refresh-time}"/>
+ </xsl:if>
<xsl:copy-of select="$boxypastel-css" />
<xsl:copy-of select="$main-js" />
</head>
diff --git a/reports/xsl-transforms/overview-matrix-www.xsl b/reports/xsl-transforms/overview-matrix-www.xsl
index d51ca2a85..a3dc91197 100644
--- a/reports/xsl-transforms/overview-matrix-www.xsl
+++ b/reports/xsl-transforms/overview-matrix-www.xsl
@@ -12,6 +12,9 @@
<title>
BCFG Overview Matrix
</title>
+ <xsl:if test="count(/Report/@refresh-time) > 0">
+ <META HTTP-EQUIV="Refresh" CONTENT="{@refresh-time}"/>
+ </xsl:if>
<xsl:copy-of select="$boxypastel-css" />
<xsl:copy-of select="$main-js" />
diff --git a/reports/xsl-transforms/overview-stats-www.xsl b/reports/xsl-transforms/overview-stats-www.xsl
index 9522cd713..407007f87 100644
--- a/reports/xsl-transforms/overview-stats-www.xsl
+++ b/reports/xsl-transforms/overview-stats-www.xsl
@@ -14,6 +14,9 @@
<html>
<head>
<title><xsl:value-of select="@name" /></title>
+ <xsl:if test="count(/Report/@refresh-time) > 0">
+ <META HTTP-EQUIV="Refresh" CONTENT="{@refresh-time}"/>
+ </xsl:if>
<xsl:copy-of select="$boxypastel-css" />
<xsl:copy-of select="$main-js" />
diff --git a/reports/xsl-transforms/timing-summary-www.xsl b/reports/xsl-transforms/timing-summary-www.xsl
index 2b8b94699..78069ba02 100644
--- a/reports/xsl-transforms/timing-summary-www.xsl
+++ b/reports/xsl-transforms/timing-summary-www.xsl
@@ -11,6 +11,9 @@
<title>
BCFG Performance Timings
</title>
+ <xsl:if test="count(/Report/@refresh-time) > 0">
+ <META HTTP-EQUIV="Refresh" CONTENT="{@refresh-time}"/>
+ </xsl:if>
<xsl:copy-of select="$boxypastel-css" />
<xsl:copy-of select="$main-js" />
diff --git a/src/sbin/StatReports b/src/sbin/StatReports
index 82a588470..341d3f310 100755
--- a/src/sbin/StatReports
+++ b/src/sbin/StatReports
@@ -198,7 +198,6 @@ if __name__ == '__main__':
#Merge data from three sources
nodereport = Element("Report", attrib={"time" : asctime()})
-
#should all of the other info in Metadata be appended?
#What about all of the package stuff for other types of reports?
@@ -216,6 +215,10 @@ if __name__ == '__main__':
for reprt in configdata.findall('Report'):
nodereport.set("name", reprt.get("name", default="BCFG Report"))
+ if reprt.get('refresh-time') != None:
+ nodereport.set("refresh-time",reprt.get("refresh-time", default="600"))
+
+
procnodereport = generatereport(reprt, nodereport)
for deliv in reprt.findall('Delivery'):