Commit bbd1834a authored by Leigh Stoller's avatar Leigh Stoller

Minor fixes to allow linktest page to kill another linktest already

in progress.
parent c91ded41
......@@ -62,7 +62,7 @@ function INITFORM($formfields, $projlist)
$defaults[exp_nsfile] = ""; # Multipart data.
$defaults[exp_preload] = "no";
$defaults[exp_batched] = "no";
$defaults[exp_linktest] = 1;
$defaults[exp_linktest] = 3;
#
# Allow formfields that are already set to override defaults
......
......@@ -30,7 +30,7 @@ $BUGDBCOOKIENAME= "FlysprayCookie";
$MAILMANURL = "http://${USERNODE}/mailman";
$OPSCVSURL = "http://${USERNODE}/cvsweb/cvsweb.cgi";
$OPSJETIURL = "http://${USERNODE}/jabber/jeti.php";
$EXPOSELINKTEST = 1;
$EXPOSELINKTEST = 0;
$TBMAILADDR_OPS = "@TBOPSEMAIL_NOSLASH@";
$TBMAILADDR_WWW = "@TBWWWEMAIL_NOSLASH@";
......
......@@ -240,7 +240,7 @@ GRABDBDATA();
echo "<script>\n";
sajax_show_javascript();
if ($linktest_pid) {
echo "var curstate = 'running';\n";
echo "var curstate = 'busy';\n";
}
else {
echo "var curstate = 'stopped';\n";
......@@ -268,6 +268,17 @@ function do_stop_cb(msg) {
// If we got an error; throw up something useful.
if (status != 'stopped') {
alert("Linktest could not be stopped: " + output);
return;
}
// Strictly for the benefit of stopping a linktest started from
// another window.
if (curstate == 'busy') {
curstate = 'stopped';
getObjbyName('action').value = 'Start';
// This clears the message area.
getObjbyName('message').innerHTML = "";
}
}
......@@ -327,6 +338,9 @@ function doaction(theform) {
curstate = 'stopping';
x_stop_linktest(do_stop_cb);
}
else if (curstate == 'busy') {
x_stop_linktest(do_stop_cb);
}
}
<?php
echo "</script>\n";
......@@ -377,7 +391,11 @@ else {
}
echo "</form>\n";
echo "<div id=message></div>\n";
echo "<div id=message>\n";
if ($linktest_pid) {
echo "<font size=+1 color=red>Linktest is already running</font>\n";
}
echo "</div>\n";
echo "<div id=output style='overflow:auto'>
<iframe onload=\"linktest_stopped();\"
width=80% height=400 scrolling=auto id=outputarea frameborder=1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment