Skip to content
Snippets Groups Projects
Commit 652d9b45 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

build page: replace hartcoded output text with language specific texts

parent 8b4016fc
No related branches found
No related tags found
1 merge request!66php8 only; added variable types; short array syntax; remove glyphicons
...@@ -177,6 +177,8 @@ ...@@ -177,6 +177,8 @@
"page-build-reload-branches": "Branches neu laden", "page-build-reload-branches": "Branches neu laden",
"page-build-branch-on-target": "Auf der Ziel-Phase ist Branch [%s] installiert.", "page-build-branch-on-target": "Auf der Ziel-Phase ist Branch [%s] installiert.",
"page-build-switch-to-target": "Setze [%s]", "page-build-switch-to-target": "Setze [%s]",
"page-build-warning-version-exists": "Im der Queue für Phase [%s] ist die Version %s bereits vorhanden!",
"page-build-warning-version-is-installed": "Im der Phase [%s] ist die Version %s bereits vorhanden!",
"page-cleanup-info-archives-deleted": "Folgende Verzeichnisse wurden gelöscht", "page-cleanup-info-archives-deleted": "Folgende Verzeichnisse wurden gelöscht",
"page-cleanup-info-archives-left": "Folgende Versionen sind derzeit vorhanden - mit Angabe, wo sie verwendet werden", "page-cleanup-info-archives-left": "Folgende Versionen sind derzeit vorhanden - mit Angabe, wo sie verwendet werden",
......
...@@ -178,6 +178,8 @@ ...@@ -178,6 +178,8 @@
"page-build-branch-on-target": "On target phase the branch [%s] was installed.", "page-build-branch-on-target": "On target phase the branch [%s] was installed.",
"page-build-switch-to-target": "Set [%s]", "page-build-switch-to-target": "Set [%s]",
"page-build-reload-branches": "Reload all branches", "page-build-reload-branches": "Reload all branches",
"page-build-warning-version-exists": "In the queue of phase [%s] the version %s already exists!",
"page-build-warning-version-is-installed": "In the phase [%s] the version %s already exists!",
"page-cleanup-info-archives-deleted": "The following directories have been deleted", "page-cleanup-info-archives-deleted": "The following directories have been deleted",
"page-cleanup-info-archives-left": "This versions currently exist - with information of their usage", "page-cleanup-info-archives-left": "This versions currently exist - with information of their usage",
......
...@@ -27,7 +27,7 @@ if (array_key_exists("branchname", $aParams)) { ...@@ -27,7 +27,7 @@ if (array_key_exists("branchname", $aParams)) {
$sBranchname = $aParams["branchname"]; $sBranchname = $aParams["branchname"];
$oPrj->setBranchname($aParams["branchname"]); $oPrj->setBranchname($aParams["branchname"]);
} else { } else {
$sBranchname = $oPrj->getBranchname(true); $sBranchname = $oPrj->getBranchname();
} }
if (!array_key_exists("confirm", $aParams)) { if (!array_key_exists("confirm", $aParams)) {
...@@ -36,60 +36,60 @@ if (!array_key_exists("confirm", $aParams)) { ...@@ -36,60 +36,60 @@ if (!array_key_exists("confirm", $aParams)) {
// ------------------------------------------------------------ // ------------------------------------------------------------
$sNext = $oPrj->getNextPhase(); $sNext = $oPrj->getNextPhase();
$aPhaseData2 = $oPrj->getPhaseInfos($sNext); $aPhaseData2 = $oPrj->getPhaseInfos($sNext);
$sBranchontarget=isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"]: ''; $sBranchontarget = isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"] : '';
print_r($sBranchname); print_r($sBranchname);
$bIgnoreCache = isset($aParams['reloadBranches']) ? $aParams['reloadBranches'] : false; $bIgnoreCache = isset($aParams['reloadBranches']) ? $aParams['reloadBranches'] : false;
// $sOut.='<p>Re-Read Branches (ignore caching) - '.($bIgnoreCache ? "JA" : "mein" ).'</p>'; // $sOut.='<p>Re-Read Branches (ignore caching) - '.($bIgnoreCache ? "JA" : "mein" ).'</p>';
$sOut.='<p>' . sprintf(t("page-build-info"), $sNext, $sNext) . '</p>'; $sOut .= '<p>' . sprintf(t("page-build-info"), $sNext, $sNext) . '</p>';
$sRevison = false; $sRevison = false;
$aRepodata = $oPrj->getRepoRevision(true); $aRepodata = $oPrj->getRepoRevision(true);
if (isset($aRepodata["revision"])) { if (isset($aRepodata["revision"])) {
$sRevison = $aRepodata["revision"]; $sRevison = $aRepodata["revision"];
if ( if (
array_key_exists("revision", $aPhaseData2["onhold"]) && $aPhaseData2["onhold"]["revision"] == $sRevison array_key_exists("revision", $aPhaseData2["onhold"]) && $aPhaseData2["onhold"]["revision"] == $sRevison
) { ) {
$sOut.=$oHtml->getBox("warning", "In der Queue von [$sNext] ist die Version bereits $sRevison vorhanden!"); $sOut .= $oHtml->getBox("warning", sprintf(t("page-build-warning-version-exists"), $sNext, $sRevison));
} }
if ( if (
array_key_exists("revision", $aPhaseData2["ready2install"]) && $aPhaseData2["ready2install"]["revision"] == $sRevison array_key_exists("revision", $aPhaseData2["ready2install"]) && $aPhaseData2["ready2install"]["revision"] == $sRevison
) { ) {
$sOut.=$oHtml->getBox("warning", "Im Repo von [$sNext] ist die Version $sRevison bereits vorhanden!"); $sOut .= $oHtml->getBox("warning", sprintf(t("page-build-warning-version-is-installed"), $sNext, $sRevison));
} }
} }
$sOut.=' $sOut .= '
<table> <table>
<thead> <thead>
<tr> <tr>
<th class="versioncontrol" colspan="3">' . $oHtml->getIcon('repository').t("versioncontrol") . '<br></th> <th class="versioncontrol" colspan="3">' . $oHtml->getIcon('repository') . t("versioncontrol") . '<br></th>
<th> </th> <th> </th>
<th class="' . $sNext . '" colspan="2">' . $oHtml->getIcon('phase').$sNext . '</th> <th class="' . $sNext . '" colspan="2">' . $oHtml->getIcon('phase') . $sNext . '</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class=""> <td class="">
' . $oPrj->renderSelectRemoteBranches(false, $bIgnoreCache) . ' ' . $oPrj->renderSelectRemoteBranches(false, $bIgnoreCache) . '
'.( ' . (
$sBranchontarget && $sBranchontarget != $sBranchname $sBranchontarget && $sBranchontarget != $sBranchname
? ' ? '
<form action="?" method="post" enctype="multipart/form-data"> <form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="reloadBranches" value="1"> <input type="hidden" name="reloadBranches" value="1">
<input type="hidden" name="branchname" value="' . $sBranchontarget . '"> <input type="hidden" name="branchname" value="' . $sBranchontarget . '">
'.sprintf(t('page-build-branch-on-target'), $sBranchontarget).'<br> ' . sprintf(t('page-build-branch-on-target'), $sBranchontarget) . '<br>
<button type="submit" class="btn btn-default">' . sprintf(t('page-build-switch-to-target'), $sBranchontarget) . '</button> <button type="submit" class="btn btn-default">' . sprintf(t('page-build-switch-to-target'), $sBranchontarget) . '</button>
</form> </form>
<br><hr> <br><hr>
' '
: '' : ''
).' ) . '
<form action="?" method="post" enctype="multipart/form-data"> <form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="reloadBranches" value="1"> <input type="hidden" name="reloadBranches" value="1">
<input type="hidden" name="branchname" value="' . $sBranchname . '"> <input type="hidden" name="branchname" value="' . $sBranchname . '">
<fieldset> <fieldset>
<button type="submit" class="btn btn-default">' . $oHtml->getIcon('refresh').t("page-build-reload-branches") . '</button> <button type="submit" class="btn btn-default">' . $oHtml->getIcon('refresh') . t("page-build-reload-branches") . '</button>
</fieldset> </fieldset>
</form> </form>
...@@ -117,7 +117,7 @@ if (!array_key_exists("confirm", $aParams)) { ...@@ -117,7 +117,7 @@ if (!array_key_exists("confirm", $aParams)) {
// Eingabe Kommentare zum Deployment // Eingabe Kommentare zum Deployment
if ($sRevison) { if ($sRevison) {
$sOut.=' $sOut .= '
<form action="?" method="post" enctype="multipart/form-data"> <form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="confirm" value="1"> <input type="hidden" name="confirm" value="1">
<input type="hidden" name="branchname" value="' . $sBranchname . '"> <input type="hidden" name="branchname" value="' . $sBranchname . '">
...@@ -125,20 +125,21 @@ if (!array_key_exists("confirm", $aParams)) { ...@@ -125,20 +125,21 @@ if (!array_key_exists("confirm", $aParams)) {
<hr> <hr>
--> -->
<fieldset> <fieldset>
'.aGoback().' ' . aGoback() . '
<button type="submit" class="btn btn-large '.$sNext.'" >' . $oHtml->getIcon('build').sprintf(t("page-build-buttonlabel"), $sNext) . '</button> <button type="submit" class="btn btn-large ' . $sNext . '" >' . $oHtml->getIcon('build') . sprintf(t("page-build-buttonlabel"), $sNext) . '</button>
</fieldset> </fieldset>
</form> </form>
'; ';
} }
$BODY= $BODY =
$renderAdminLTE->addRow( $renderAdminLTE->addRow(
$renderAdminLTE->addCol( $renderAdminLTE->addCol(
$renderAdminLTE->getCard([ $renderAdminLTE->getCard([
'type'=>'success', 'type' => 'success',
'variant'=>'outline', 'variant' => 'outline',
'text'=>$sOut, 'text' => $sOut,
]), 12 ]),
12
) )
); );
...@@ -186,17 +187,17 @@ if (!array_key_exists("confirm", $aParams)) { ...@@ -186,17 +187,17 @@ if (!array_key_exists("confirm", $aParams)) {
$sAjaxFile = $aParams["prj"] . "_" . $aParams["action"]; $sAjaxFile = $aParams["prj"] . "_" . $aParams["action"];
$sDivname = "outAjax"; $sDivname = "outAjax";
$sUrlStartAction = "/deployment/?" $sUrlStartAction = "/deployment/?"
. "&prj=" . $aParams["prj"] . "&prj=" . $aParams["prj"]
. "&action=" . $aParams["action"] . "&action=" . $aParams["action"]
. "&confirm=" . $aParams["confirm"] . "&confirm=" . $aParams["confirm"]
. "&branchname=" . $aParams["branchname"] . "&branchname=" . $aParams["branchname"]
. "&ajax=" . $sAjaxFile . "&ajax=" . $sAjaxFile
. "&run=1" . "&run=1"
; ;
$sUrlFile = "/webservice/getfile.php?". "&ajax=" . $sAjaxFile; $sUrlFile = "/webservice/getfile.php?" . "&ajax=" . $sAjaxFile;
$sOut.= '<div id="' . $sDivname . '"></div>' $sOut .= '<div id="' . $sDivname . '"></div>'
. '<script> . '<script>
var iRepeat=2000; var iRepeat=2000;
// start build process // start build process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment