Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
4842f319
Commit
4842f319
authored
8 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
ci webgui - detect missing placeholder in templates
parent
0400057a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/lang/de.json
+1
-0
1 addition, 0 deletions
config/lang/de.json
config/lang/en.json
+1
-0
1 addition, 0 deletions
config/lang/en.json
public_html/deployment/pages/act_phase.php
+19
-11
19 additions, 11 deletions
public_html/deployment/pages/act_phase.php
with
21 additions
and
11 deletions
config/lang/de.json
+
1
−
0
View file @
4842f319
...
...
@@ -255,6 +255,7 @@
"foreman-error-missing-template"
:
"In Foreman wurde das Templatefile [%s] definiert, aber dieses existiert nicht im Build."
,
"foreman-error-no-replacement-for-id"
:
"In Foreman wurde keine noch Ersetzung für [%s] definiert."
,
"foreman-error-no-target"
:
"In Foreman wurde keine Ziel-Datei definiert"
,
"foreman-error-no-replacement-in-templatefile"
:
"Es wurde kein Platzhalter zum Ersetzen in diesem Template gefunden."
,
"foreman-error-template-unknown"
:
"Das Template wurde in Foreman nicht aufgenommen"
,
"foreman-error-replacement-unknown"
:
"Das Replacement [%s] in Foreman existiert im Template nicht."
,
"foreman-hostgroup"
:
"Foreman Hostgruppe"
,
...
...
This diff is collapsed.
Click to expand it.
config/lang/en.json
+
1
−
0
View file @
4842f319
...
...
@@ -257,6 +257,7 @@
"foreman-error-missing-template"
:
"In Foreman the templatefile [%s] was defined but it does not exist in the build."
,
"foreman-error-no-replacement-for-id"
:
"There is no replacement for [%s] in Foreman."
,
"foreman-error-no-target"
:
"No target file was set in Foreman"
,
"foreman-error-no-replacement-in-templatefile"
:
"No placeholder for a replacement was found in this template."
,
"foreman-error-template-unknown"
:
"The template was not added in Foreman."
,
"foreman-error-replacement-unknown"
:
"The replacement [%s] from Foreman has no plceholder in the template file."
,
"foreman-hostgroup"
:
"Foreman hostgroup"
,
...
...
This diff is collapsed.
Click to expand it.
public_html/deployment/pages/act_phase.php
+
19
−
11
View file @
4842f319
...
...
@@ -119,22 +119,30 @@ if ($sPhase) {
// --- loop over all replacement items of template file
// and check if they exist in foreman
foreach
(
$aFields
as
$sField
){
if
(
$aReplacementsForeman
&&
array_key_exists
(
$sField
,
$aReplacementsForeman
[
$tTplFile
][
'replace'
])){
$sTd
=
$aReplacementsForeman
[
$tTplFile
][
'replace'
][
$sField
];
}
else
{
if
(
$bFileInForeman
){
$sTd
=
$oHtml
->
getBox
(
'error'
,
sprintf
(
t
(
'foreman-error-no-replacement-for-id'
),
$sField
));
$aWarnings
[]
=
$tTplFile
.
': '
.
sprintf
(
t
(
'foreman-error-no-replacement-for-id'
),
$sField
);
if
(
count
(
$aFields
))
{
foreach
(
$aFields
as
$sField
){
if
(
$aReplacementsForeman
&&
array_key_exists
(
$sField
,
$aReplacementsForeman
[
$tTplFile
][
'replace'
])){
$sTd
=
$aReplacementsForeman
[
$tTplFile
][
'replace'
][
$sField
];
}
else
{
$sTd
=
'-'
;
}
if
(
$bFileInForeman
){
$sTd
=
$oHtml
->
getBox
(
'error'
,
sprintf
(
t
(
'foreman-error-no-replacement-for-id'
),
$sField
));
$aWarnings
[]
=
$tTplFile
.
': '
.
sprintf
(
t
(
'foreman-error-no-replacement-for-id'
),
$sField
);
}
else
{
$sTd
=
'-'
;
}
}
$aTable
[
'body'
][]
=
array
(
$oHtml
->
getIcon
(
'replace'
)
.
$sField
,
$sTd
);
}
}
else
{
$aTable
[
'body'
][]
=
array
(
$oHtml
->
get
Icon
(
'replace'
)
.
$sField
,
$sTd
$oHtml
->
get
Box
(
'error'
,
t
(
'foreman-error-no-replacement-in-templatefile'
)),
'-'
);
$aWarnings
[]
=
$tTplFile
.
': '
.
t
(
'foreman-error-no-replacement-in-templatefile'
);
}
// --- reverse check ... loop over all replacement items of foreman
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment