2013-05-21 00:30:35 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2013-05-20 18:22:38 +02:00
< html > < head >
2013-05-21 00:30:35 +02:00
< meta content = "text/html; charset=utf-8" http-equiv = "content-type" >
2015-08-23 15:59:13 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1, maximum-scale=1" >
2013-06-04 02:46:14 +02:00
2014-05-29 14:35:20 +02:00
< link rel = "shortcut icon" type = "image/x-icon" href = "/images/webbuild.ico" / >
2013-05-20 18:22:38 +02:00
<!-- styles needed by jScrollPane -->
< link type = "text/css" href = "/scripts/jquery.jscrollpane.css" rel = "stylesheet" media = "all" >
<!-- latest jQuery direct from google's CDN -->
< script type = "text/javascript" src = "/scripts/jquery.js" > < / script >
<!-- the mousewheel plugin - optional to provide mousewheel support -->
< script type = "text/javascript" src = "/scripts/jquery.mousewheel.js" > < / script >
<!-- the jScrollPane script -->
< script type = "text/javascript" src = "/scripts/jquery.jscrollpane.min.js" > < / script >
2015-08-22 18:44:38 +02:00
< link rel = "stylesheet" type = "text/css" href = "/styles/webbuild-standalone.css" >
2013-05-20 18:22:38 +02:00
< link rel = "stylesheet" type = "text/css" href = "/styles/webbuild.css" >
< script type = "text/javascript" src = "/scripts/socialbox.js" > < / script >
< script >
window.onbeforeunload = function (e) {
e = e || window.event;
// For IE and Firefox prior to version 4
if (e) {
e.returnValue = 'La sessione di Webbuild verrà chiusa.';
}
// For Safari
return 'La sessione di Webbuild verrà chiusa.';
};
< / script >
<!-- styles and scripts needed by CodeMirror editor -->
< script src = "/scripts/codemirror/lib/codemirror.js" > < / script >
< link rel = "stylesheet" href = "/scripts/codemirror/lib/codemirror.css" >
< script src = "/scripts/codemirror/mode/rpm/spec/spec.js" > < / script >
< link rel = "stylesheet" href = "/scripts/codemirror/mode/rpm/spec/spec.css" >
2024-04-18 13:18:25 +02:00
< script src = "/scripts/codemirror/addon/search/search.js" > < / script >
< script src = "/scripts/codemirror/addon/search/searchcursor.js" > < / script >
< script src = "/scripts/codemirror/addon/dialog/dialog.js" > < / script >
< link rel = "stylesheet" href = "/scripts/codemirror/addon/dialog/dialog.css" >
2013-05-20 18:22:38 +02:00
< script src = "/scripts/webbuild.js" > < / script >
< script type = "text/javascript" >
<!--
2013-05-21 01:18:05 +02:00
var user = "";
var user_email = "";
2013-05-20 18:22:38 +02:00
var secret = "";
var lastupdate = 0;
var reloadtime = 15000;
var editor;
2013-05-21 00:30:35 +02:00
function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function getCookie(c_name)
{
var c_value = document.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1)
{
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1)
{
c_value = null;
}
else
{
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1)
{
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start,c_end));
}
return c_value;
}
2013-05-20 18:22:38 +02:00
function clearid(id) {
document.getElementById(id).innerHTML = '';
}
function editorChanged() {
if (document.getElementById('savebutton') != undefined)
document.getElementById('savebutton').disabled=false;
if (document.getElementById('sendrecreatesrpm') != undefined)
document.getElementById('sendrecreatesrpm').checked=true;
}
function ajax_getvalues(request,confirm) {
var url = "/cgi-bin/webbuild"
2014-10-12 23:18:14 +02:00
var xmlhttp;
2013-05-20 18:22:38 +02:00
2013-05-21 01:18:05 +02:00
if (!user) {
user=getCookie("webbuild-user");
2013-05-21 01:25:35 +02:00
if (!user) user="";
2013-05-21 01:18:05 +02:00
}
2013-05-21 00:30:35 +02:00
if (!secret) {
2013-05-21 01:18:05 +02:00
secret=getCookie("webbuild-secret");
2013-05-21 11:57:52 +02:00
if (!secret) secret="";
2013-05-21 00:30:35 +02:00
}
2014-05-24 17:26:59 +02:00
2013-05-20 18:22:38 +02:00
if (confirm) {
document.getElementById("status").innerHTML =
'< div class = screencontainer > < div class = opaquebackground > < / div > '+
'< div class = questionbox > < div style = "overflow:auto;max-height:200px;" > '+decodeURIComponent(confirm)+'< / div > '+
'< br > < a href = # onclick = ajax_getvalues("'+request+'") > YES< / a > < a href = # onclick = clearid("status") > NO< / a > < / div > < / div > ';
return;
}
document.getElementById("webbuildform").disabled = true;
if (request != "")
request=request+"&USER="+user+"&USER_EMAIL="+user_email+"&SECRET="+encodeURIComponent(secret);
else
request="USER="+user+"&USER_EMAIL="+user_email+"&SECRET="+encodeURIComponent(secret);
if (window.location.href.indexOf('?') > 0)
url = 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 = "";
2014-05-22 19:10:42 +02:00
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 > ';
2013-05-20 18:22:38 +02:00
xmlhttp.onreadystatechange = function() {
2014-05-22 19:10:42 +02:00
if (xmlhttp.readyState < 4 )
2013-05-20 18:22:38 +02:00
return;
2014-05-22 19:10:42 +02:00
if (xmlhttp.responseXML == undefined & & xmlhttp.responseText == undefined) {
2013-05-20 18:22:38 +02:00
document.getElementById("status").innerHTML = "";
2014-05-22 19:10:42 +02:00
document.getElementById("output").innerHTML = "ERROR: there was a network connection problem." + xmlhttp.readyState + " " + xmlhttp.status;
xmlhttp.abort();
2013-05-20 18:22:38 +02:00
return;
}
var xmldoc = xmlhttp.responseXML.documentElement;
2014-05-22 19:10:42 +02:00
if (xmldoc == undefined) {
return;
}
2013-05-20 18:22:38 +02:00
var nodes = xmldoc.childNodes;
for (var i = 0; i < nodes.length ; i + + ) {
if (nodes[i].nodeName == "title") {
document.title = nodes[i].childNodes[0].nodeValue;
2014-05-24 17:26:59 +02:00
} else if (nodes[i].nodeName == "cookie-user") {
2014-05-31 15:30:20 +02:00
setCookie("webbuild-user", nodes[i].childNodes[0].nodeValue);
2014-05-24 17:26:59 +02:00
} else if (nodes[i].nodeName == "cookie-secret") {
2014-05-31 15:30:20 +02:00
setCookie("webbuild-secret", nodes[i].childNodes[0].nodeValue);
2013-05-20 18:22:38 +02:00
} else if (document.getElementById(nodes[i].nodeName) != undefined) {
$("#"+nodes[i].nodeName).html(nodes[i].childNodes[0].nodeValue);
spectext = document.getElementById("spectext");
if ((nodes[i].nodeName == "editor") & & (spectext != undefined) & & (spectext.parentNode != undefined))
{
editor = CodeMirror.fromTextArea(spectext,
{ lineNumbers: true,
tabSize: 4,
indentUnit: 4,
indentWithTabs: true,
onChange: function() { editorChanged(); }
});
} else if ((nodes[i].nodeName == "output") & & (document.getElementById("outputbottom") != undefined)) {
document.getElementById("outputbottom").scrollTop = document.getElementById("outputbottom").scrollHeight;
2014-05-22 19:10:42 +02:00
} else if ((nodes[i].nodeName == "processes")) {
$(function() { $('.scroll-pane3').jScrollPane({scrollbarWidth:10}); });
2013-05-20 18:22:38 +02:00
}
}
}
2014-05-22 19:10:42 +02:00
//alert("nodes done");
2013-05-20 18:22:38 +02:00
document.getElementById("webbuildform").disabled = false;
document.getElementById("status").innerHTML = "";
}
xmlhttp.onprogress = function() {
2014-05-22 19:10:42 +02:00
var end = 0,to;
// save responseText length when entering the function
2013-05-20 18:22:38 +02:00
to = this.responseText.length - 1;
if (start < 0 ) {
start = this.responseText.substring(0,to).indexOf("<!-- SCROLL --> ");
if (start >= 0) start+=15;
}
if (start >= 0) {
end = this.responseText.substring(start+currpos-15,to).indexOf("<!-- ENDSCROLL --> ");
if (end >= 0) to = end;
if (to > start) {
2014-05-22 19:10:42 +02:00
var customscroll = document.getElementById("matrix").scrollTop <
(document.getElementById("matrix").scrollHeight - document.getElementById("matrix").clientHeight);
2013-05-20 18:22:38 +02:00
document.getElementById("matrix").innerHTML =
"< div id = matrixoutput > < pre > " + this.responseText.substring(start,to).replace("< / pre > ","< /pre> ") + "< / pre > < / div > ";
currpos = document.getElementById("matrixoutput").innerHTML.length;
2014-05-22 19:10:42 +02:00
if (!customscroll)
document.getElementById("matrix").scrollTop = document.getElementById("matrix").scrollHeight;
2013-05-20 18:22:38 +02:00
}
}
}
2014-05-22 19:10:42 +02:00
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;
2013-05-20 18:22:38 +02:00
}
2013-06-04 02:46:14 +02:00
// ajaxFileUpload
function ajaxFileUpload(request)
{
/* $("#loading")
.ajaxStart(function(){
$(this).show();
})
.ajaxComplete(function(){
$(this).hide();
});*/
$.ajaxFileUpload
(
{
url:'/cgi-bin/webbuild',
secureuri:false,
fileElementId:'fileToUpload',
dataType: 'xml',
beforeSend:function()
{
$("#loading").show();
},
complete:function()
{
$("#loading").hide();
},
success: function (data, status)
{
ajax_getvalues(request);
if(typeof(data.error) != 'undefined')
{
if(data.error != '')
{
alert(data.error);
}else
{
alert(data.msg);
}
}
},
error: function (data, status, e)
{
alert(e);
}
}
)
return false;
}
2013-05-20 18:22:38 +02:00
< / script >
2015-08-22 18:44:38 +02:00
< link rel = "stylesheet" type = "text/css" href = "/styles/webbuild-post.css" >
2013-05-20 18:22:38 +02:00
< / head > < body >
< span class = webbuild >
2024-04-18 01:33:48 +02:00
< form id = webbuildform name = webbuild method = post onkeypress = "return event.keyCode != 13;" >
2015-08-23 15:59:13 +02:00
< div class = "webbuildcontainer" >
2013-06-03 14:09:15 +02:00
< img src = "/images/webbuild.png" alt = "build automatici" >
< b > - Webbuild - Interfaccia Web per lo sviluppo di openmamba< / b >
2024-04-18 01:33:48 +02:00
< div class = "webbuildtopright" >
< div style = "text-align:center;margin-top:-15px;" >
Telegram BOT: < a href = "https://telegram.me/openmamba_bot" target = "_blank" > @openmamba_bot< / a >
- < a href = "https://youtu.be/Y7omi3sQKvA" target = "_blank" > Youtube tutorial< / a >
< / div >
< div id = "searchbox" > < / div >
< span id = "chatpanel" > < / span >
< / div >
< div class = "webbuildtopleft" >
< 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 >
< span id = "topcontrols" > < / span > < span id = "environments" > < / span > < span id = "specedit" > < / span >
< br > < span id = "repositories" > < / span >
< span id = "packages" > < / span >
< span id = "operations" > < / span >
< br > < span id = "speccreate" > < / span >
< / div >
< div class = "webbuildwrapleft" >
< div class = "webbuildleft" >
< div class = "webbuildprocesses" > < div class = "scroll-pane3" > < span id = "processes" > < / span > < / div > < / div >
< div > < span id = "editor" > < / span > < / div >
< span id = "editcontrols" > < / span >
< span id = "showlogcontrols" > < / span >
< span id = "output" > < / span >
< / div >
2013-05-20 18:22:38 +02:00
< / div >
2015-08-23 15:59:13 +02:00
< div class = "webbuildright" >
2013-05-20 18:22:38 +02:00
< div class = "socialbox" > < div class = "scroll-pane" > < span id = "socialbox" > < / span > < / div > < / div >
2015-08-23 15:59:13 +02:00
< span id = "operationpanel" > < / span >
2013-05-20 18:22:38 +02:00
< / div >
< div style = "clear:both" > < / div >
2024-04-18 01:33:48 +02:00
< / div >
2013-06-05 18:51:00 +02:00
< span id = "window" > < / span >
< / div >
2024-04-18 01:33:48 +02:00
< / form >
2014-05-22 19:10:42 +02:00
< / span >
2013-05-20 18:22:38 +02:00
< script >
ajax_getvalues("");
ajax_getvalues_refresh("",user,user_email,encodeURIComponent(secret));
//setInterval("ajax_getvalues_refresh(\"\",user,user_email,encodeURIComponent(secret))",0);
< / script >
< br > < br > < br > < br > < br > < br >
< / body > < / html >