Skip to content

Commit e15e940

Browse files
committed
Fixes AddSummaryHeader not adding any check information to check package
1 parent 4c62866 commit e15e940

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/100-General/10-Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
2323
* [#787](https://github.com/Icinga/icinga-powershell-framework/pull/787) Fixes the return value in case the `Agent` component could not be installed from `$FALSE` to `null`
2424
* [#796](https://github.com/Icinga/icinga-powershell-framework/issues/796) [#798](https://github.com/Icinga/icinga-powershell-framework/issues/798) Fixes an issue with the new check handling, which did not properly convert values from checks to the correct performance data values and base values in some cases
2525
* [#797](https://github.com/Icinga/icinga-powershell-framework/issues/797) Fixes plugins throwing `UNKNOWN` in case `-TresholdInterval` is used for Metrics over Time, when checks are newly registered and checked, before the first MoT is executed and collected
26+
* [#809](https://github.com/Icinga/icinga-powershell-framework/issues/809) Fixes plugin compiler not handling `AddSummaryHeader` properly for nested check packages, not adding any check information
2627

2728
### Enhancements
2829

lib/icinga/plugin/New-IcingaCheckPackage.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ function New-IcingaCheckPackage()
101101
$CheckSummary = New-Object -TypeName 'System.Text.StringBuilder';
102102
[bool]$HasContent = $FALSE;
103103

104-
# Only apply this to the top parent package
105-
if ($this.__GetIndention() -eq 0) {
104+
# Always apply this to the first package or if we specify AddSummaryHeader
105+
if ($this.__GetIndention() -eq 0 -Or $this.AddSummaryHeader) {
106106
if ($this.__UnknownChecks.Count -ne 0) {
107107
$UnknownChecks = [string]::Format(' [UNKNOWN] {0}', ([string]::Join(', ', $this.__UnknownChecks)));
108108
$CheckSummary.Append(

0 commit comments

Comments
 (0)