Unified web and standalone versions done.
This commit is contained in:
+1
-1
@@ -1122,7 +1122,7 @@ function startSequence(All) {
|
||||
}
|
||||
}
|
||||
// Update GUI progress bar
|
||||
Progress=Progress+90/SValues.length;
|
||||
Progress=Math.round(Progress+90/SValues.length);
|
||||
document.getElementById("pBar").style.width = Progress + "%";
|
||||
document.getElementById("pBar").innerHTML = Progress + "%";
|
||||
|
||||
|
||||
+13
-1
@@ -20,6 +20,7 @@ function writeAsciiFile(filename,content) {
|
||||
// Prepare CGI args
|
||||
let cgiargs = "?fn="+filename;
|
||||
let lines = content.split(/\n/);
|
||||
let prefix = filename.split(/\//);
|
||||
for (let i=0; i<lines.length; i++) {
|
||||
cgiargs += "&line" + i + "=" + lines[i];
|
||||
}
|
||||
@@ -33,9 +34,20 @@ function writeAsciiFile(filename,content) {
|
||||
console.log(xhttp.status, xhttp.statusText);
|
||||
}
|
||||
}
|
||||
let request = "/cgi-bin/try.cgi"+cgiargs;
|
||||
let request = "/cgi-bin/singleTrimSP.cgi"+cgiargs;
|
||||
xhttp.open("GET", request, false);
|
||||
xhttp.send();
|
||||
// Now you can add a link to the files
|
||||
let d = document.getElementById("linkDiv");
|
||||
if (!d) {
|
||||
d = document.createElement("div");
|
||||
d.id = "linkDiv";
|
||||
let htmlLink = "Download files: <a href='";
|
||||
htmlLink += "/tmp/" + prefix[2] + ".tgz'>";
|
||||
htmlLink += prefix[2] + ".tgz</a>";
|
||||
d.innerHTML = htmlLink;
|
||||
document.body.appendChild(d);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user