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 @@
"page-build-reload-branches": "Branches neu laden",
"page-build-branch-on-target": "Auf der Ziel-Phase ist Branch [%s] installiert.",
"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-left": "Folgende Versionen sind derzeit vorhanden - mit Angabe, wo sie verwendet werden",
......
......@@ -178,6 +178,8 @@
"page-build-branch-on-target": "On target phase the branch [%s] was installed.",
"page-build-switch-to-target": "Set [%s]",
"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-left": "This versions currently exist - with information of their usage",
......
......@@ -27,7 +27,7 @@ if (array_key_exists("branchname", $aParams)) {
$sBranchname = $aParams["branchname"];
$oPrj->setBranchname($aParams["branchname"]);
} else {
$sBranchname = $oPrj->getBranchname(true);
$sBranchname = $oPrj->getBranchname();
}
if (!array_key_exists("confirm", $aParams)) {
......@@ -36,60 +36,60 @@ if (!array_key_exists("confirm", $aParams)) {
// ------------------------------------------------------------
$sNext = $oPrj->getNextPhase();
$aPhaseData2 = $oPrj->getPhaseInfos($sNext);
$sBranchontarget=isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"]: '';
$sBranchontarget = isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"] : '';
print_r($sBranchname);
$bIgnoreCache = isset($aParams['reloadBranches']) ? $aParams['reloadBranches'] : false;
// $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;
$aRepodata = $oPrj->getRepoRevision(true);
if (isset($aRepodata["revision"])) {
$sRevison = $aRepodata["revision"];
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 (
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>
<thead>
<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 class="' . $sNext . '" colspan="2">' . $oHtml->getIcon('phase').$sNext . '</th>
<th class="' . $sNext . '" colspan="2">' . $oHtml->getIcon('phase') . $sNext . '</th>
</tr>
</thead>
<tbody>
<tr>
<td class="">
' . $oPrj->renderSelectRemoteBranches(false, $bIgnoreCache) . '
'.(
$sBranchontarget && $sBranchontarget != $sBranchname
? '
' . (
$sBranchontarget && $sBranchontarget != $sBranchname
? '
<form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="reloadBranches" value="1">
<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>
</form>
<br><hr>
'
: ''
).'
: ''
) . '
<form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="reloadBranches" value="1">
<input type="hidden" name="branchname" value="' . $sBranchname . '">
<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>
</form>
......@@ -117,7 +117,7 @@ if (!array_key_exists("confirm", $aParams)) {
// Eingabe Kommentare zum Deployment
if ($sRevison) {
$sOut.='
$sOut .= '
<form action="?" method="post" enctype="multipart/form-data">
<input type="hidden" name="confirm" value="1">
<input type="hidden" name="branchname" value="' . $sBranchname . '">
......@@ -125,20 +125,21 @@ if (!array_key_exists("confirm", $aParams)) {
<hr>
-->
<fieldset>
'.aGoback().'
<button type="submit" class="btn btn-large '.$sNext.'" >' . $oHtml->getIcon('build').sprintf(t("page-build-buttonlabel"), $sNext) . '</button>
' . aGoback() . '
<button type="submit" class="btn btn-large ' . $sNext . '" >' . $oHtml->getIcon('build') . sprintf(t("page-build-buttonlabel"), $sNext) . '</button>
</fieldset>
</form>
';
}
$BODY=
$BODY =
$renderAdminLTE->addRow(
$renderAdminLTE->addCol(
$renderAdminLTE->getCard([
'type'=>'success',
'variant'=>'outline',
'text'=>$sOut,
]), 12
'type' => 'success',
'variant' => 'outline',
'text' => $sOut,
]),
12
)
);
......@@ -186,17 +187,17 @@ if (!array_key_exists("confirm", $aParams)) {
$sAjaxFile = $aParams["prj"] . "_" . $aParams["action"];
$sDivname = "outAjax";
$sUrlStartAction = "/deployment/?"
. "&prj=" . $aParams["prj"]
. "&action=" . $aParams["action"]
. "&confirm=" . $aParams["confirm"]
. "&branchname=" . $aParams["branchname"]
. "&ajax=" . $sAjaxFile
. "&run=1"
. "&prj=" . $aParams["prj"]
. "&action=" . $aParams["action"]
. "&confirm=" . $aParams["confirm"]
. "&branchname=" . $aParams["branchname"]
. "&ajax=" . $sAjaxFile
. "&run=1"
;
$sUrlFile = "/webservice/getfile.php?". "&ajax=" . $sAjaxFile;
$sOut.= '<div id="' . $sDivname . '"></div>'
. '<script>
$sUrlFile = "/webservice/getfile.php?" . "&ajax=" . $sAjaxFile;
$sOut .= '<div id="' . $sDivname . '"></div>'
. '<script>
var iRepeat=2000;
// start build process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment