Latest fix to make webbuild work on new installation

This commit is contained in:
Silvan Calarco 2014-05-22 19:10:42 +02:00
parent 5df925c70b
commit 25b48ad735
4 changed files with 48 additions and 29 deletions

View File

@ -9,6 +9,14 @@ SEND_SERVER=devel-autodist
#WEBBUILD_SECRET=
WEBBUILD_STATEDIR=/var/webbuild
WEBBUILD_DISTROQUERY_URL="http://www.openmamba.org/cgi-bin/distroquery"
WEBBUILD_REPOSITORIES=(devel devel-games devel-kernel devel-kde4 devel-xorg devel-gnome devel-makedist \
devel-java devel-misc devel-autodist devel-future devel-past \
milestone1 milestone1-updates milestone1-games milestone1-1.1 milestone1-makedist \
milestone2 milestone2-games milestone2-updates milestone2-kernel milestone2-kde4 \
milestone2-xorg milestone2-makedist milestone2-java \
devel-contrib devel-silvan devel-stefano devel-aleph0 devel-skiver devel-fabiog devel-gil \
devel-distservers devel-the_packagizers devel-ercolinux \
devel-contrib-java devel-michiamophil milestone1-java milestone1-contrib)
AUTOBUILD_MAXNUM=200
AUTOBUILD_DATEFROM=20060601
AUTOBUILD_SKIP_DAYS=28

View File

@ -1,4 +1,4 @@
var url = "/cgi-bin/webbuild.cgi"
var url = "/cgi-bin/webbuild"
/*function socialbox_refresh_times() {
socialbox_refresh_times(false);

View File

@ -144,7 +144,7 @@ function replaceHTML(el, html) {
};
function getDownload(request) {
var url = "/cgi-bin/webbuild.cgi"
var url = "/cgi-bin/webbuild"
if (request != "")
request=request+"&USER="+user+"&USER_EMAIL="+user_email+"&SECRET="+encodeURIComponent(secret);

View File

@ -109,12 +109,6 @@ function ajax_getvalues(request,confirm) {
return;
}
document.getElementById("webbuildform").disabled = true;
document.getElementById("status").innerHTML =
'<div class=opaquebackground>'+
'<div style="text-align:left;color:white;position:absolute;left:0;top:0;" id=matrix class=matrix></div>'+
'<div style="position:absolute;left:50%;top:50%;"><img src="/images/wait.gif" title="Attendi..."</div>'+
'<div style="position:fixed;left:95%;top:95%;color:red;"><a href="javascript:clearid(\'status\');">[x] Close</a></div>'+
'</div>';
if (request != "")
request=request+"&USER="+user+"&USER_EMAIL="+user_email+"&SECRET="+encodeURIComponent(secret);
@ -130,24 +124,34 @@ function ajax_getvalues(request,confirm) {
return;
document.getElementById("noajax_msg").innerHTML = "";
document.getElementById("status").innerHTML =
'<div class=opaquebackground>'+
'<div style="text-align:left;color:white;position:absolute;left:0;top:0;" id=matrix class=matrix></div>'+
'<div style="position:absolute;left:50%;top:50%;"><img src="/images/wait.gif" title="Attendi..."</div>'+
'<div style="position:fixed;left:95%;top:95%;color:red;"><a href="javascript:clearid(\'status\');">[x] Close</a></div>'+
'</div>';
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState != 4)
if (xmlhttp.readyState < 4)
return;
if (xmlhttp.responseXML == undefined) {
if (xmlhttp.responseXML == undefined && xmlhttp.responseText == undefined) {
document.getElementById("status").innerHTML = "";
document.getElementById("output").innerHTML = "ERROR: there was a network connection problem.";
document.getElementById("output").innerHTML = "ERROR: there was a network connection problem." + xmlhttp.readyState + " " + xmlhttp.status;
xmlhttp.abort();
return;
}
var xmldoc = xmlhttp.responseXML.documentElement;
if (xmldoc == undefined) {
return;
}
var nodes = xmldoc.childNodes;
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName == "title") {
document.title = nodes[i].childNodes[0].nodeValue;
} else if (nodes[i].nodeName == "cookie-user") {
setCookie("webbuild-user", nodes[i].childNodes[0].nodeValue, 1);
} else if (nodes[i].nodeName == "cookie-secret") {
setCookie("webbuild-secret", nodes[i].childNodes[0].nodeValue, 1);
} else if (document.getElementById(nodes[i].nodeName) != undefined) {
// var node = document.getElementById(nodes[i].nodeName)
//alert("replace " + node.nodeValue + "with " + nodes[i].childNodes[0].nodeValue);
// node = replaceHTML(node, nodes[i].childNodes[0].nodeValue);
$("#"+nodes[i].nodeName).html(nodes[i].childNodes[0].nodeValue);
spectext = document.getElementById("spectext");
if ((nodes[i].nodeName == "editor") && (spectext != undefined) && (spectext.parentNode != undefined))
@ -161,22 +165,19 @@ function ajax_getvalues(request,confirm) {
});
} else if ((nodes[i].nodeName == "output") && (document.getElementById("outputbottom") != undefined)) {
document.getElementById("outputbottom").scrollTop = document.getElementById("outputbottom").scrollHeight;
} else if ((nodes[i].nodeName == "processes")) {
$(function() { $('.scroll-pane3').jScrollPane({scrollbarWidth:10}); });
}
}
}
//alert("nodes done");
document.getElementById("webbuildform").disabled = false;
document.getElementById("status").innerHTML = "";
}
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(request);
// setTimeout(function() { alert ("Timeout expired"); xmlhttp.abort(); }, 600000);
var currpos = 0, start = -1;
xmlhttp.onprogress = function() {
var end,to;
// save resposneText length when entering the function
var end = 0,to;
// save responseText length when entering the function
to = this.responseText.length - 1;
if (start < 0) {
start = this.responseText.substring(0,to).indexOf("<!-- SCROLL -->");
@ -186,16 +187,24 @@ function ajax_getvalues(request,confirm) {
end = this.responseText.substring(start+currpos-15,to).indexOf("<!-- ENDSCROLL -->");
if (end >= 0) to = end;
if (to > start) {
var customscroll = document.getElementById("matrix").scrollTop <
(document.getElementById("matrix").scrollHeight - document.getElementById("matrix").clientHeight);
document.getElementById("matrix").innerHTML =
"<div id=matrixoutput><pre>" + this.responseText.substring(start,to).replace("</pre>","&lt;/pre&gt;") + "</pre></div>";
currpos = document.getElementById("matrixoutput").innerHTML.length;
// document.getElementById("outputbottom").scrollTop = document.getElementById("outputbottom").scrollHeight;
document.getElementById("matrix").scrollTop = document.getElementById("matrix").scrollHeight;
document.getElementById("matrix").scrollLeft = document.getElementById("matrix").scrollWidth;
if (!customscroll)
document.getElementById("matrix").scrollTop = document.getElementById("matrix").scrollHeight;
}
}
}
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(request);
// setTimeout(function() { alert ("Timeout expired"); xmlhttp.abort(); }, 600000);
var currpos = 0, start = -1;
}
// ajaxFileUpload
@ -257,6 +266,8 @@ function ajaxFileUpload(request)
<span id="searchbox"></span>
<div style="position:relative;top:-30px;left:0;width:100%;height:100%;">
<div id="noajax_msg"><p>Il supporto per AJAX non è abilitato nel tuo browser. L'aggiornamento live non sarà disponibile, premi Ricarica per aggiornare la pagina.</p></div>
<span id="status">Caricamento in corso, attendere...</span>
@ -267,7 +278,7 @@ function ajaxFileUpload(request)
<br><span id="speccreate"></span>
<hr>
<div style="position:relative;float:left;width:686px;padding:0;margin:1px;">
<span id="processes"></span>
<div class="processes"><div class="scroll-pane3"><span id="processes"></span></div></div><br>
<div><span id="editor"></span></div>
<span id="editcontrols"></span>
<span id="showlogcontrols"></span>
@ -282,7 +293,7 @@ function ajaxFileUpload(request)
<span id="window"></span>
</form>
</div>
</span>
</span>
<script>
ajax_getvalues("");