From 4707deeca1dded8e20e92a21a4d16a5c56c97401 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 30 Aug 2006 21:52:23 +0000 Subject: Don't allow negative dates --- www/ajax/rrdui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'www') diff --git a/www/ajax/rrdui.js b/www/ajax/rrdui.js index 5ed315a..d4ea8b6 100644 --- a/www/ajax/rrdui.js +++ b/www/ajax/rrdui.js @@ -6,7 +6,7 @@ // Fix up the ENDPOINT config setting if(ENDPOINT.charAt(0) != '/') - ENDPOINT = '/' + ENDPOINT; + ENDPOINT = '/' + ENDPOINT; /* TODO: Check setup variables */ /* TODO: Loading indicator */ @@ -166,6 +166,13 @@ function reloadGraph(img, force) { img._last = nowTime(); + /* Fix up the dates so they're in range */ + if(img._tbeg < 0) + { + img._tend = (img._tend - img._tbeg) + 1; + img._tbeg = 1; + } + if(!img._visible) return; -- cgit v1.2.3