mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-14 08:13:12 -05:00
Merge pull request #557 from Icinga:fix/unit_byte_thresholds_formatting_error
Fix: Byte unit Icinga threshold exception Fixes byte unit Icinga threshold exception
This commit is contained in:
commit
4c246d1dc5
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ function Convert-Bytes()
|
||||||
$Value = [string]::Format('{0}B', $Value);
|
$Value = [string]::Format('{0}B', $Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
If (($Value -Match "(^-?[0-9].*)+((\.|\,)+[0-9])?(B|KB|MB|GB|TB|PT|KiB|MiB|GiB|TiB|PiB)")) {
|
If (($Value -Match "(^[\d\.]*) ?(B|KB|MB|GB|TB|PT|KiB|MiB|GiB|TiB|PiB)")) {
|
||||||
[single]$CurrentValue = $Matches[1];
|
[single]$CurrentValue = $Matches[1];
|
||||||
[string]$CurrentUnit = $Matches[2];
|
[string]$CurrentUnit = $Matches[2];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue