mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes error argument does not support percent unit
This commit is contained in:
parent
11deff3403
commit
4100e05e84
2 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
|||
* [#473](https://github.com/Icinga/icinga-powershell-framework/pull/473) Fixes an issue with current string rendering config implementation, as string values containing whitespaces or `$` are rendered wrong by default, if not set in single quotes `''`
|
||||
* [#476](https://github.com/Icinga/icinga-powershell-framework/pull/476) Fixes exception `You cannot call a method on va null-valued expression` during installation in case no background daemon is configured
|
||||
* [#482](https://github.com/Icinga/icinga-powershell-framework/pull/482) Fixes encoding problems with special chars or German umlauts during plugin execution and unescaped whitespace in plugin argument strings like `Icinga for Windows`, which was previously wrongly rended as `Icinga` for example
|
||||
* [#489](https://github.com/Icinga/icinga-powershell-framework/issues/489) Fixes error message `This argument does not support the % unit` in case a `BaseValue` is set, but the actual value is `0`
|
||||
* [#529](https://github.com/Icinga/icinga-powershell-framework/pull/529) Fixes package manifest reader for Icinga for Windows components on Windows 2012 R2 and older
|
||||
* [#523](https://github.com/Icinga/icinga-powershell-framework/pull/523) Fixes errors on encapsulated PowerShell calls for missing Cmdlets `Write-IcingaConsoleError` and `Optimize-IcingaForWindowsMemory`
|
||||
* [#524](https://github.com/Icinga/icinga-powershell-framework/issues/524) Fixes uninstallation process by improving the location handling of PowerShell instances with Icinga IMC or Shell
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ function Compare-IcingaPluginThresholds()
|
|||
if ([string]::IsNullOrEmpty($BaseValue) -eq $FALSE -And $BaseValue -ne 0 -And $IcingaThresholds.Unit -eq '%') {
|
||||
$InputValue = $InputValue / $BaseValue * 100;
|
||||
$UseDynamicPercentage = $TRUE;
|
||||
} elseif (([string]::IsNullOrEmpty($BaseValue) -eq $TRUE -Or $BaseValue -eq 0) -And $IcingaThresholds.Unit -eq '%') {
|
||||
} elseif ([string]::IsNullOrEmpty($BaseValue) -eq $TRUE -And $IcingaThresholds.Unit -eq '%') {
|
||||
$IcingaThresholds.HasError = $TRUE;
|
||||
$IcingaThresholds.ErrorMessage = 'This argument does not support the % unit';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue