diff options
author | Stef Walter <stef@memberwebs.com> | 2006-08-30 21:52:23 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-08-30 21:52:23 +0000 |
commit | 4707deeca1dded8e20e92a21a4d16a5c56c97401 (patch) | |
tree | dbe563b1d1c82bf87952545604b6faca69b0420a /www/ajax | |
parent | ddd22b0e7f227ee61ca030b0050ecbcb339403b7 (diff) |
Don't allow negative dates
Diffstat (limited to 'www/ajax')
-rw-r--r-- | www/ajax/rrdui.js | 9 |
1 files changed, 8 insertions, 1 deletions
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; |