diff --git a/cgi-bin/autodist b/cgi-bin/autodist new file mode 100755 index 0000000..e361c5f --- /dev/null +++ b/cgi-bin/autodist @@ -0,0 +1,9 @@ +#!/bin/bash +echo "\ +Content-Type: text/xml +Pragma: no-cache + +" + +#curl "http://www2.openmamba.org/cgi-bin/autodist-internal.cgi?$QUERY_STRING" --stderr /dev/null +curl "http://buildvm01.openmamba.org/cgi-bin/autodist?$QUERY_STRING&FORMAT=xml" --stderr /dev/null diff --git a/functions.php b/functions.php index 9ef75d8..8d10012 100644 --- a/functions.php +++ b/functions.php @@ -103,7 +103,7 @@ add_shortcode('openmamba_download', 'openmamba_download_func'); function openmamba_webbuild_func( $atts ) { $a = shortcode_atts( array( - 'host' => 'buildvm02' + 'host' => 'buildvm01' ), $atts ); print ''; @@ -114,6 +114,19 @@ function openmamba_webbuild_func( $atts ) { } add_shortcode('openmamba_webbuild', 'openmamba_webbuild_func'); +function openmamba_webbuild_status_func() { + + $urlargspos = strpos($_SERVER[REQUEST_URI], '?'); + if ($urlargspos > 0) { + $urlargs = substr($_SERVER[REQUEST_URI], $urlargspos); + } +// print "
"; + print "

Il supporto per AJAX non è abilitato nel tuo browser. L'aggiornamento live non sarà disponibile, premi Ricarica per aggiornare la pagina.

"; + print "Caricamento in corso, attendere..."; + print "";//
"; +} +add_shortcode('openmamba_webbuild_status', 'openmamba_webbuild_status_func'); + // bbpress tag cloud add_filter('widget_tag_cloud_args','set_number_tags'); function set_number_tags($args) { diff --git a/header-webbuild.php b/header-webbuild.php index 18b73c5..9b0f205 100644 --- a/header-webbuild.php +++ b/header-webbuild.php @@ -72,7 +72,7 @@ fclose($file); wp_head(); # webbuild css -print ''; +print ''; ?> @@ -81,7 +81,6 @@ print ' -Caricamento in corso, attendere...
diff --git a/styles/webbuild-post.css b/styles/webbuild-post.css index fd0e2b7..3450fb5 100644 --- a/styles/webbuild-post.css +++ b/styles/webbuild-post.css @@ -6,10 +6,7 @@ a.webbuild:visited { color:#0b0600; text-decoration: none; } a.webbuild:active { color:#0b0600; text-decoration: none; } a.webbuild:hover { text-decoration: underline; } hr { margin:0; color:black; background: #aaaaaa; } - -label { - white-space:nowrap; -} +label { white-space:nowrap; text-decoration:none; font-weight:initial; } .webbuild input { font-size: 8pt; @@ -24,6 +21,7 @@ select { padding: 0; margin: 1px; height: 1.5em; + max-width: 98%; background-color: buttonface; } diff --git a/styles/webbuild.css b/styles/webbuild.css index c6d66a7..0f7859f 100644 --- a/styles/webbuild.css +++ b/styles/webbuild.css @@ -1,18 +1,18 @@ .boldbutton { - font-weight: bold; + font-weight: bold !important; } .redbutton { - color: red; + color: red !important; } .redbutton[disabled] { - color: lightgray; + color: lightgray !important; } .redboldbutton { - color: red; - font-weight: bold; + color: red !important; + font-weight: bold !important; } .redboldbutton[disabled] { - color: lightgray; + color: lightgray !important; } .screencontainer { text-align:center; @@ -135,8 +135,7 @@ color: #000000; margin:0px; } -.webbuild td { - font-size: 8pt; +.webbuild td { font-size: 8pt; border:0; } } .webbuild table { font-size: 9pt; font-family: liberationsans, freesans, arial, verdana, sans-serif; background-color: rgb(255, 255, 255); } .webbuild img { border: 0; margin: 0px; vertical-align:middle; } @@ -306,11 +305,6 @@ margin: 0px; border:1px solid #2b6600; } - -.socialbox div { - margin-bottom:1px; -} - -.socialbox hr { - margin: 0; -} +.socialbox div { margin-bottom:1px; } +.socialbox hr { margin: 0; } +.downloadbox table { font-size: 9pt; border:1px solid #2b6600; margin: 4px; padding:4; background-color: #e0f2d0; } diff --git a/webbuild-page.php b/webbuild-page.php index 2c21060..563f1cc 100644 --- a/webbuild-page.php +++ b/webbuild-page.php @@ -21,6 +21,19 @@ Template Name: Webbuild Page (no sidebar, no title) * @since available since Release 1.0 */ + +print " +"; + get_header("webbuild"); ?>
diff --git a/webbuild-status-page.php b/webbuild-status-page.php new file mode 100644 index 0000000..00ee122 --- /dev/null +++ b/webbuild-status-page.php @@ -0,0 +1,70 @@ + + +
+ + + + + + + + +
> + + + + +
+ + '' ) ); ?> +
+ + + + + +
+ + + + + + + + +
+ + diff --git a/webbuild.html.inc b/webbuild.html.inc index 6d01b5a..61a28a1 100644 --- a/webbuild.html.inc +++ b/webbuild.html.inc @@ -1,3 +1,4 @@ +Caricamento in corso, attendere...
diff --git a/webbuild.js.inc b/webbuild.js.inc index cb57a5c..ea3aba8 100644 --- a/webbuild.js.inc +++ b/webbuild.js.inc @@ -1,16 +1,3 @@ - @@ -98,7 +85,7 @@ function ajax_getvalues(request,confirm) { 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.abort(); return; } @@ -132,7 +119,6 @@ function ajax_getvalues(request,confirm) { } } } -//alert("nodes done"); document.getElementById("webbuildform").disabled = false; document.getElementById("status").innerHTML = ""; } @@ -217,4 +203,34 @@ function ajaxFileUpload(request) ) return false; } + +var webbuild_status_lastupdate = 0; +var webbuild_status_reloadtime = 60000; + +function webbuild_status_getvalues() { + var url = "/cgi-bin/autodist"; + var xmlhttp; + if (window.location.href.indexOf("?") > 0) url += "?"+window.location.href.replace(/.*\?/,""); + if (window.XMLHttpRequest) + xmlhttp = new XMLHttpRequest(); + else if (window.ActiveXObject) + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + else + return; + document.getElementById("noajax_msg").innerHTML = ""; + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState != 4) + return; + var xmldoc = xmlhttp.responseXML.documentElement; + if (xmldoc == undefined) { + return; + } + document.getElementById("output").innerHTML = xmldoc.getElementsByTagName("output")[0].childNodes[0].nodeValue; + webbuild_status_reloadtime = xmldoc.getElementsByTagName("reloadtime")[0].childNodes[0].nodeValue; + webbuild_status_lastupdate = (+new Date()); + } + xmlhttp.open("GET", url, true); + xmlhttp.send(null); + setTimeout("webbuild_status_getvalues()", webbuild_status_reloadtime); +}