summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--configure.in2
-rw-r--r--doc/httpd-sample.conf18
-rw-r--r--html/ajax/action-date.gif (renamed from html/action-date.gif)bin1024 -> 1024 bytes
-rw-r--r--html/ajax/action-next.gif (renamed from html/action-next.gif)bin877 -> 877 bytes
-rw-r--r--html/ajax/action-prev.gif (renamed from html/action-prev.gif)bin874 -> 874 bytes
-rw-r--r--html/ajax/action-zoom.gif (renamed from html/action-zoom.gif)bin965 -> 965 bytes
-rw-r--r--html/ajax/frame.html (renamed from html/frame.html)0
-rw-r--r--html/ajax/index.html (renamed from html/index.html)24
-rw-r--r--html/ajax/rrdui.js (renamed from html/rrdui.js)13
-rw-r--r--html/ajax/style.css (renamed from html/style.css)0
-rw-r--r--tools/Makefile.am2
12 files changed, 40 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am
index 4ce2055..eb31b88 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
-SUBDIRS = tools
+SUBDIRS = tools html
-EXTRA_DIST = graphics html tools
+EXTRA_DIST = graphics tools
dist-hook:
rm -rf `find $(distdir)/ -name .svn`
diff --git a/configure.in b/configure.in
index 391e676..10fa922 100644
--- a/configure.in
+++ b/configure.in
@@ -38,5 +38,5 @@ AC_HEADER_STDC
AC_MSG_RESULT()
-AC_CONFIG_FILES([Makefile tools/Makefile])
+AC_CONFIG_FILES([Makefile tools/Makefile html/Makefile])
AC_OUTPUT
diff --git a/doc/httpd-sample.conf b/doc/httpd-sample.conf
index 05b0dba..4e1df94 100644
--- a/doc/httpd-sample.conf
+++ b/doc/httpd-sample.conf
@@ -1,7 +1,15 @@
-Alias /rrdui/ /home/joe/rrdui/html/
-ScriptAlias /rrduiback /home/joe/rrdui/tools/rrdui-cgi.py
-<Location "/rrduiback">
- SetEnv CONFDIR "/home/joe/rd-test/conf"
- SetEnv WORKDIR "/home/joe/rd-test/work"
+# The front end to use
+Alias /rrdui/ /usr/local/share/rrdui/ajax/
+
+# The CGI backend which manages the graphs
+ScriptAlias /rrdui-back /usr/local/bin/rrdui-cgi
+<Location "/rrdui-back">
+
+ # The location of the configuration files
+ SetEnv CONFDIR "/usr/local/etc/rrdbot"
+
+ # The location of the RRD files
+ SetEnv WORKDIR "/var/db/rrdbot"
+
</Location>
diff --git a/html/action-date.gif b/html/ajax/action-date.gif
index a249e30..a249e30 100644
--- a/html/action-date.gif
+++ b/html/ajax/action-date.gif
Binary files differ
diff --git a/html/action-next.gif b/html/ajax/action-next.gif
index c01940a..c01940a 100644
--- a/html/action-next.gif
+++ b/html/ajax/action-next.gif
Binary files differ
diff --git a/html/action-prev.gif b/html/ajax/action-prev.gif
index f7eba32..f7eba32 100644
--- a/html/action-prev.gif
+++ b/html/ajax/action-prev.gif
Binary files differ
diff --git a/html/action-zoom.gif b/html/ajax/action-zoom.gif
index c1e9800..c1e9800 100644
--- a/html/action-zoom.gif
+++ b/html/ajax/action-zoom.gif
Binary files differ
diff --git a/html/frame.html b/html/ajax/frame.html
index 3c9aae8..3c9aae8 100644
--- a/html/frame.html
+++ b/html/ajax/frame.html
diff --git a/html/index.html b/html/ajax/index.html
index f60e1b1..3ed3264 100644
--- a/html/index.html
+++ b/html/ajax/index.html
@@ -1,8 +1,24 @@
<html>
<head>
+
+ <!-- CUSTOMIZE: Configure these settings -->
<script language="javascript">
- // Settings
- var ENDPOINT = "/rrduiback/";
+
+ // Specify settings here
+ var ENDPOINT = "/rrdui-back/";
+
+ // The background and foregrond colors of the graph
+ var GRAPH_COLOR_BACK = ":252424";
+ var GRAPH_COLOR_FONT = ":E7E1CC";
+
+ // The graph size
+ var GRAPH_WIDTH = 450;
+ var GRAPH_HEIGHT = 120
+
+ // Amount of space on the right and left of a graph
+ var GRAPH_MARGIN_LEFT = 67;
+ var GRAPH_MARGIN_RIGHT = 27;
+
</script>
<title>Statistics Monitoring</title>
<link href="style.css" type="text/css" rel="stylesheet"/>
@@ -13,13 +29,11 @@
<table border="0" width="100%">
<tr><td id="headers" width="60%">
-
- <!-- The category area: A template of our header -->
<span class="header" id="header-template">Text</span>
-
</td>
<td align="right" id="logo">
+ <!-- CUSTOMIZE: Add your logo or title here -->
Network Statistics
</td></tr>
diff --git a/html/rrdui.js b/html/ajax/rrdui.js
index b868728..5ed315a 100644
--- a/html/rrdui.js
+++ b/html/ajax/rrdui.js
@@ -4,6 +4,10 @@
* STARTUP
*/
+// Fix up the ENDPOINT config setting
+if(ENDPOINT.charAt(0) != '/')
+ ENDPOINT = '/' + ENDPOINT;
+
/* TODO: Check setup variables */
/* TODO: Loading indicator */
@@ -165,12 +169,7 @@ function reloadGraph(img, force)
if(!img._visible)
return;
- /* TODO: Move these into settings */
/* TODO: We should encode colons properly */
- var GRAPH_COLOR_BACK = ":252424";
- var GRAPH_COLOR_FONT = ":E7E1CC";
- var GRAPH_WIDTH = 450;
- var GRAPH_HEIGHT = 120
var uri = makeEndpointURI() + "/graph?category=" + img._category + "&name=" + img._name;
@@ -330,10 +329,6 @@ function zoomGraphDone(evt)
function zoomGraphSelect(zoom)
{
- // Arbitrary values (TODO: Move these to CONFIG)
- var GRAPH_MARGIN_LEFT = 67;
- var GRAPH_MARGIN_RIGHT = 27;
-
var left = GRAPH_MARGIN_LEFT;
var right = zoom._img.width - GRAPH_MARGIN_RIGHT;
diff --git a/html/style.css b/html/ajax/style.css
index b72e4ca..b72e4ca 100644
--- a/html/style.css
+++ b/html/ajax/style.css
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 8863b29..ed8519b 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,5 +1,5 @@
-bin_PROGRAMS = rrdui-cgi
+libexec_PROGRAMS = rrdui-cgi
rrdui_cgi_SOURCES = rrdui-cgi.c \