summaryrefslogtreecommitdiffstats
path: root/logfiles-tail-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-03-10 01:36:52 +0000
committerTed Trask <ttrask01@yahoo.com>2014-03-10 01:36:52 +0000
commitbadb1b3f5477611441c2c3e91ae9eb9263120bae (patch)
treeffe9aab704d6c429055a6d93e51cc16bf5e902d7 /logfiles-tail-html.lsp
parent4c0e9b17d5bbcfb7e7a704c6a57af2cfe327c308 (diff)
downloadacf-alpine-baselayout-badb1b3f5477611441c2c3e91ae9eb9263120bae.tar.bz2
acf-alpine-baselayout-badb1b3f5477611441c2c3e91ae9eb9263120bae.tar.xz
Fix bugs with starting/stopping logfile tail
Diffstat (limited to 'logfiles-tail-html.lsp')
-rw-r--r--logfiles-tail-html.lsp10
1 files changed, 7 insertions, 3 deletions
diff --git a/logfiles-tail-html.lsp b/logfiles-tail-html.lsp
index b14a02e..c8e663b 100644
--- a/logfiles-tail-html.lsp
+++ b/logfiles-tail-html.lsp
@@ -11,6 +11,7 @@
<script type="text/javascript">
var currentoffset = -1024
var ID
+ var started = false
function Update(){
$.ajaxSetup({cache:false});
$.getJSON(
@@ -43,9 +44,11 @@
currentoffset = data.value.filesize.value;
$(".left:contains('File size')").next().text(currentoffset);
};
+ if (started) {
+ ID=window.setTimeout("Update();", 1000);
+ }
}
);
- ID=window.setTimeout("Update();", 1000);
}
function handleerror(event, request, settings){
$(this).append("Error requesting page " + settings.url + "<br/>Perhaps the session has timed out.");
@@ -55,6 +58,7 @@
$("#errtxt").ajaxError(handleerror);
$("#Start").attr("disabled","disabled");
<% if not form.value.filename.errtxt then %>
+ started = true
Update();
<% else %>
$("#Stop").attr("disabled","disabled");
@@ -76,6 +80,6 @@ end
<% htmlviewfunctions.displayitemstart() %>
Start / Stop tailing file
<% htmlviewfunctions.displayitemmiddle() %>
-<input type="button" id="Start" value="Start" onClick='$("#errtxt").empty(); Update(); $("#Start").attr("disabled","disabled");$("#Stop").removeAttr("disabled");'>
-<input type="button" id="Stop" value="Stop" onClick='window.clearTimeout(ID); $("#Stop").attr("disabled","disabled");$("#Start").removeAttr("disabled");'>
+<input type="button" id="Start" value="Start" onClick='$("#errtxt").empty(); started=true; Update(); $("#Start").attr("disabled","disabled");$("#Stop").removeAttr("disabled");'>
+<input type="button" id="Stop" value="Stop" onClick='started=false; window.clearTimeout(ID); $("#Stop").attr("disabled","disabled");$("#Start").removeAttr("disabled");'>
<% htmlviewfunctions.displayitemend() %>