mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixed Plugin Output for multiple check packages
This commit is contained in:
parent
73ce2aa8e5
commit
79b4518189
1 changed files with 4 additions and 4 deletions
|
|
@ -72,6 +72,8 @@ function New-IcingaCheckPackage()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this.compiled = $TRUE;
|
||||||
|
|
||||||
if ($this.checks.Count -ne 0) {
|
if ($this.checks.Count -ne 0) {
|
||||||
if ($this.opand) {
|
if ($this.opand) {
|
||||||
if ($this.CheckAllOk() -eq $FALSE) {
|
if ($this.CheckAllOk() -eq $FALSE) {
|
||||||
|
|
@ -109,12 +111,10 @@ function New-IcingaCheckPackage()
|
||||||
$this.exitcode = $IcingaEnums.IcingaExitCode.Ok;
|
$this.exitcode = $IcingaEnums.IcingaExitCode.Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Verbose -eq $TRUE -Or [int]$this.exitcode -ne $IcingaEnums.IcingaExitCode.Unknown) {
|
if ($Verbose -eq $TRUE) {
|
||||||
$this.PrintOutputMessages();
|
$this.PrintOutputMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this.compiled = $TRUE;
|
|
||||||
|
|
||||||
return $this.exitcode;
|
return $this.exitcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,6 +259,7 @@ function New-IcingaCheckPackage()
|
||||||
$Check | Add-Member -membertype ScriptMethod -name 'PrintOutputMessages' -value {
|
$Check | Add-Member -membertype ScriptMethod -name 'PrintOutputMessages' -value {
|
||||||
[bool]$printDetails = $FALSE;
|
[bool]$printDetails = $FALSE;
|
||||||
[bool]$printAll = $FALSE;
|
[bool]$printAll = $FALSE;
|
||||||
|
|
||||||
switch ($this.verbose) {
|
switch ($this.verbose) {
|
||||||
0 { break; };
|
0 { break; };
|
||||||
1 { break; };
|
1 { break; };
|
||||||
|
|
@ -270,7 +271,6 @@ function New-IcingaCheckPackage()
|
||||||
$printAll = $TRUE;
|
$printAll = $TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this.WritePackageOutputStatus();
|
$this.WritePackageOutputStatus();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue