mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes an issue with input value decimal conversion
This commit is contained in:
parent
d78a7a77b8
commit
050461d802
1 changed files with 5 additions and 0 deletions
|
|
@ -113,6 +113,11 @@ function Compare-IcingaPluginThresholds()
|
||||||
$TempValue = (Convert-IcingaPluginThresholds -Threshold ([string]::Format('{0}{1}', $InputValue, $Unit)));
|
$TempValue = (Convert-IcingaPluginThresholds -Threshold ([string]::Format('{0}{1}', $InputValue, $Unit)));
|
||||||
$InputValue = $TempValue.Value;
|
$InputValue = $TempValue.Value;
|
||||||
$TmpUnit = $TempValue.Unit;
|
$TmpUnit = $TempValue.Unit;
|
||||||
|
|
||||||
|
if (Test-Numeric $InputValue) {
|
||||||
|
[decimal]$InputValue = [decimal]$InputValue;
|
||||||
|
}
|
||||||
|
|
||||||
$IcingaThresholds.RawValue = $InputValue;
|
$IcingaThresholds.RawValue = $InputValue;
|
||||||
$TempValue = (Convert-IcingaPluginThresholds -Threshold ([string]::Format('{0}{1}', $BaseValue, $Unit)));
|
$TempValue = (Convert-IcingaPluginThresholds -Threshold ([string]::Format('{0}{1}', $BaseValue, $Unit)));
|
||||||
$BaseValue = $TempValue.Value;
|
$BaseValue = $TempValue.Value;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue