Fixes AddSummaryHeader not adding any check information to check package

This commit is contained in:
Lord Hepipud 2025-04-24 08:16:33 +02:00
parent 647cedbdf4
commit d68be2674c
2 changed files with 3 additions and 2 deletions

View file

@ -25,6 +25,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#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`
* [#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
* [#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
* [#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
### Enhancements

View file

@ -101,8 +101,8 @@ function New-IcingaCheckPackage()
$CheckSummary = New-Object -TypeName 'System.Text.StringBuilder';
[bool]$HasContent = $FALSE;
# Only apply this to the top parent package
if ($this.__GetIndention() -eq 0) {
# Always apply this to the first package or if we specify AddSummaryHeader
if ($this.__GetIndention() -eq 0 -Or $this.AddSummaryHeader) {
if ($this.__UnknownChecks.Count -ne 0) {
$UnknownChecks = [string]::Format(' [UNKNOWN] {0}', ([string]::Join(', ', $this.__UnknownChecks)));
$CheckSummary.Append(