webbuild: redesign of operation panel in maintainance mode
This commit is contained in:
parent
8f2eb49563
commit
6e6d92d5a2
@ -2130,10 +2130,43 @@ fi
|
||||
if [ "$MAINTAINERMODE" = "true" ]; then
|
||||
echo -n "<packages> </packages>"
|
||||
echo -n "<operationpanel><![CDATA["
|
||||
echo -n "<div style=\"margin-top:140px;background-color:#E0F2D0;border:1px;\">"
|
||||
echo "Repository: <b>$REPOSITORY</b><br>"
|
||||
showEnvironmentPanel
|
||||
echo -n "<hr>"
|
||||
echo -n "</div><br>"
|
||||
if [ "$REPOSITORY" ]; then
|
||||
echo -n "<b>Repository maintenance:</b><br>"
|
||||
# send options
|
||||
echo -n "<b>Send options:</b>"
|
||||
# destination repository
|
||||
echo -n "<br>Destination: "
|
||||
echo -n "<select id=repositoryimportto>"
|
||||
if [ "${REPOSITORY:0:10}" = "milestone2" ]; then
|
||||
IMPORT_REPOSITORIES=$AUTOPORT_MILESTONE2_IMPORT_REPOSITORIES
|
||||
elif [ "${REPOSITORY:0:10}" = "milestone3" ]; then
|
||||
IMPORT_REPOSITORIES=$AUTOPORT_MILESTONE3_IMPORT_REPOSITORIES
|
||||
else
|
||||
IMPORT_REPOSITORIES="$AUTOPORT_DEVEL_IMPORT_REPOSITORIES devel-$USER $AUTOPORT_DEVEL_RELEASE_REPOSITORIES"
|
||||
fi
|
||||
for f in $IMPORT_REPOSITORIES; do
|
||||
# [ "$f" = "$REPOSITORY" ] && continue
|
||||
if [ ! "$USER_ALLREPOSITORIES" ]; then
|
||||
for u in $USER_CANMAINTAIN_REPOSITORIES devel-$USER; do
|
||||
[ "$u" = "$f" ] && echo -n "<option value=\"$f\">$f</option>"
|
||||
# -a "$f" != "$REPOSITORY"
|
||||
done
|
||||
else
|
||||
#[ "$f" != "$REPOSITORY" ] &&
|
||||
echo -n "<option value=\"$f\">$f</option>"
|
||||
fi
|
||||
done
|
||||
echo -n "</select><br>"
|
||||
# force checkbox
|
||||
echo -n "<label style=\"background-color:red;padding:1px;\"><input type=checkbox id=\"repositoryforce\" value=\"force\">force</label>"
|
||||
# simulate checkbox
|
||||
echo -n "<label><input type=checkbox id=\"repositorysimulate\" value=\"simulate\">simulate</label>"
|
||||
# operations box
|
||||
echo -n "<br><br><div style=\"background-color:#FFFFDE\">"
|
||||
echo -n "<b>Operations on selected packages:</b><br>"
|
||||
# echo -n "<select multiple size=8 id=package onchange="
|
||||
# echo -n "i=getElementById('repository').selectedIndex;ajax_getvalues(\"REQUEST=edit&"
|
||||
# echo -n "ENVIRONMENT=$ENVIRONMENT&MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||
@ -2165,37 +2198,14 @@ if [ "$MAINTAINERMODE" = "true" ]; then
|
||||
echo -n "<label><input type=checkbox name=packagescheckbox value=\"$pkgname\" $SELECTED>${pkgname} ${pkgver}-${pkgrel}</label>"
|
||||
done < $WEBBUILD_STATEDIR/cache/repository-src-$REPOSITORY
|
||||
echo -n "</div>"
|
||||
echo -n "Origin: <b>$REPOSITORY</b>"
|
||||
# repository sync
|
||||
echo -n " <input type=button value=\"sync\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
||||
echo -n "PACKAGES=\"+encodeURIComponent(getCheckedValuesByName('packagescheckbox'))+\"&"
|
||||
echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||
echo -n "REQUEST=repositorysync\""
|
||||
echo -n ",\"`cgi_encodevar "Make <b>$REPOSITORY</b> updates immediately available from public server?"`\""
|
||||
echo -n "); class=redbutton>"
|
||||
echo -n "<br>Destination: "
|
||||
echo -n "<select id=repositoryimportto>"
|
||||
if [ "${REPOSITORY:0:10}" = "milestone2" ]; then
|
||||
IMPORT_REPOSITORIES=$AUTOPORT_MILESTONE2_IMPORT_REPOSITORIES
|
||||
elif [ "${REPOSITORY:0:10}" = "milestone3" ]; then
|
||||
IMPORT_REPOSITORIES=$AUTOPORT_MILESTONE3_IMPORT_REPOSITORIES
|
||||
else
|
||||
IMPORT_REPOSITORIES="$AUTOPORT_DEVEL_IMPORT_REPOSITORIES devel-$USER $AUTOPORT_DEVEL_RELEASE_REPOSITORIES"
|
||||
fi
|
||||
for f in $IMPORT_REPOSITORIES; do
|
||||
# [ "$f" = "$REPOSITORY" ] && continue
|
||||
if [ ! "$USER_ALLREPOSITORIES" ]; then
|
||||
for u in $USER_CANMAINTAIN_REPOSITORIES devel-$USER; do
|
||||
[ "$u" = "$f" ] && echo -n "<option value=\"$f\">$f</option>"
|
||||
# -a "$f" != "$REPOSITORY"
|
||||
done
|
||||
else
|
||||
#[ "$f" != "$REPOSITORY" ] &&
|
||||
echo -n "<option value=\"$f\">$f</option>"
|
||||
fi
|
||||
done
|
||||
echo -n "</select><br>"
|
||||
## repository sync
|
||||
#echo -n " <input type=button value=\"sync\" onclick="
|
||||
#echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
||||
#echo -n "PACKAGES=\"+encodeURIComponent(getCheckedValuesByName('packagescheckbox'))+\"&"
|
||||
#echo -n "MAINTAINERMODE=\"+getElementById('maintain').checked+\"&"
|
||||
#echo -n "REQUEST=repositorysync\""
|
||||
#echo -n ",\"`cgi_encodevar "Make <b>$REPOSITORY</b> updates immediately available from public server?"`\""
|
||||
#echo -n "); class=redbutton>"
|
||||
# repository compare
|
||||
echo -n "<input type=button value=\"compare\" onclick="
|
||||
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
|
||||
@ -2243,16 +2253,6 @@ 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 of selected packages:</b><br>Changelog:"
|
||||
echo -n "<input type=text id=massrebuildchangelog style=\"width:100%\">"
|
||||
# autodist update buildrequirements
|
||||
echo -n "Add build requirement(s):<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=\"rebuild\" onclick="
|
||||
echo -n "p=getCheckedValuesByName('packagescheckbox');"
|
||||
@ -2283,6 +2283,13 @@ if [ "$MAINTAINERMODE" = "true" ]; then
|
||||
echo -n ",\"`cgi_encodevar "Rebuild package which depend on <b>"`\"+p+\"`cgi_encodevar "</b> in <b>$REPOSITORY</b> and send to <b>"`\"+getSelectedValueById('repositoryimportto')+"
|
||||
echo -n "\"`cgi_encodevar "</b>?"`\""
|
||||
echo -n "); class=redbutton>"
|
||||
# changelog for mass rebuild
|
||||
echo -n "<br>Rebuild changelog:"
|
||||
echo -n "<input type=text id=massrebuildchangelog style=\"width:100%\">"
|
||||
# autodist update buildrequirements
|
||||
echo -n "Add build requirement(s):<br>"
|
||||
echo -n "<textarea id=massrebuildbuildreq style=\"width:98%;font-size:8pt;resize:none;\" rows=2></textarea>"
|
||||
echo -n "<br><br></div>"
|
||||
fi
|
||||
echo -n "]]></operationpanel>"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user