webbuild: add mass rebuilt build requirement update box; redesign and move chat box

This commit is contained in:
Silvan Calarco 2014-07-05 23:54:48 +02:00
parent 5927784c85
commit 45b347da76

View File

@ -1383,7 +1383,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then
echo -n ",\"`cgi_encodevar "Send selected packages for <b>"`\"+getSelectedValueById('autodistjobs')+\"`cgi_encodevar "</b> job to <b>"`\"+"
echo -n "getSelectedValueById('sendrepository')+\"`cgi_encodevar "</b>?"`\"); class=redbutton $DISABLED>"
# autodist update changelog
echo -n "Rebuild changelog:"
echo -n "Rebuild changelog:<br>"
echo -n "<input type=text id=autodistupdatechangelog style=\"width:95%\">"
# autodist schedule
echo -n "<br><input type=button value=\"schedule job\" onclick="
@ -1598,16 +1598,16 @@ fi
echo -n "<chatpanel><![CDATA["
# broadcast message
echo -n "<hr><b>Write a message to all developers:</b><br>"
echo -n "<textarea id=broadcastmessage style=\"width:98%;font-size:8pt;resize:none;\" rows=4 "
echo -n "onkeypress=if(checkEnter()){ajax_getvalues(\""
echo -n "<div style=\"position:absolute;width:220px;\">"
echo -n "<textarea id=broadcastmessage style=\"font-family:sans;height:36px;width:80%;float:left;font-size:8pt;resize:none;\" "
echo -n "onfocus=\"if(this.value==this.defaultValue)this.value='';\">Chat with online developers...</textarea>"
echo -n "<input type=button style=\"float:right\" onclick=ajax_getvalues(\""
echo -n "ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
echo -n "REQUEST=broadcastmessage&BROADCASTMESSAGE=\"+encodeURIComponent(getElementById('broadcastmessage').value));"
echo -n "getElementById('broadcastmessage').value=\"\";}>"
echo -n "</textarea>"
echo -n "getElementById('broadcastmessage').value=\"\"; value=\"Send\" />"
#echo -n "<input type=button value=\"send\" onClick="
echo -n "]]></chatpanel>"
echo -n "</div>]]></chatpanel>"
if [ "$REQUEST" != "" ]; then
echo -n "<output><![CDATA[<hr>"
@ -1947,7 +1947,8 @@ $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOS
echo "ERROR: changelog was not specified."
RET=1
else
$SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autoport -r $SENDREPOSITORY -d $REPOSITORYIMPORTTO $PACKAGES -u \"$MASSREBUILDCHANGELOG\" --user $USER" &>/dev/null
SCRIPTARGS=`echo -e $MASSREBUILDBUILDREQ | awk 'BEGIN {FS="\\\\n"} {for(i=1;i<=NF;i++) printf "--buildreq %s ", $i }'`
$SUDO_WRAPPER background $ENVIRONMENT "$USER" "$PACKAGE" "autoport -r $SENDREPOSITORY -d $REPOSITORYIMPORTTO $PACKAGES -u \"$MASSREBUILDCHANGELOG\" -s \"$SCRIPTARGS\" --user $USER" &>/dev/null
[ $? -ne 0 ] && RET=$? || {
RET=-1
echo -n "Mass rebuild started. You may see the output in the <b>Webbuild jobs</b> box above."
@ -2213,6 +2214,16 @@ if [ "$MAINTAINERMODE" = "true" ]; then
echo -n "REQUEST=repositoryarchive\""
echo -n ",\"`cgi_encodevar "Archive <b>"`\"+p+\"`cgi_encodevar "</b> in <b>$REPOSITORY</b>?"`\""
echo -n "); class=redbutton>"
# force checkbox
echo -n "<label><input type=checkbox id=\"repositoryforce\" value=\"force\">force</label>"
# simulate checkbox
echo -n "<label><input type=checkbox id=\"repositorysimulate\" value=\"simulate\">simulate</label>"
# changelog for mass rebuild
echo -n "<hr><b>Mass rebuild:</b><br>Changelog:"
echo -n "<input type=text id=massrebuildchangelog style=\"width:100%\">"
# autodist update buildrequirements
echo -n "Add build requirement:<br>"
echo -n "<textarea id=massrebuildbuildreq style=\"width:98%;font-size:8pt;resize:none;\" rows=2></textarea>"
# mass rebuild
echo -n "<input type=button value=\"mass rebuild\" onclick="
echo -n "p=getCheckedValuesByName('packagescheckbox');"
@ -2223,16 +2234,11 @@ if [ "$MAINTAINERMODE" = "true" ]; then
echo -n "REPOSITORYSIMULATE=\"+getElementById('repositorysimulate').checked+\"&"
echo -n "REPOSITORYFORCE=\"+getElementById('repositoryforce').checked+\"&"
echo -n "MASSREBUILDCHANGELOG=\"+encodeURIComponent(getElementById('massrebuildchangelog').value)+\"&"
echo -n "MASSREBUILDBUILDREQ=\"+encodeURIComponent(getElementById('massrebuildbuildreq').value)+\"&"
echo -n "SENDREPOSITORY=$REPOSITORY&REQUEST=repositorymassrebuild\""
echo -n ",\"`cgi_encodevar "Rebuild <b>"`\"+p+\"`cgi_encodevar "</b> from <b>$REPOSITORY</b> and send to <b>"`\"+getSelectedValueById('repositoryimportto')+"
echo -n "\"`cgi_encodevar "</b>?"`\""
echo -n "); class=redbutton>"
echo -n " Changelog:"
echo -n "<input type=text id=massrebuildchangelog style=\"width:100%\">"
# force checkbox
echo -n "<label><input type=checkbox id=\"repositoryforce\" value=\"force\">force</label>"
# simulate checkbox
echo -n "<label><input type=checkbox id=\"repositorysimulate\" value=\"simulate\">simulate</label>"
fi
echo -n "]]></operationpanel>"
fi