mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fix double colon if added by check
This commit is contained in:
parent
67a8908cb2
commit
eb81a12963
1 changed files with 8 additions and 1 deletions
|
|
@ -114,10 +114,17 @@ function New-IcingaCheck()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[bool]$AddColon = $TRUE;
|
||||||
|
|
||||||
|
if ([string]::IsNullOrEmpty($this.Name) -eq $FALSE -And $this.Name[$this.Name.Length - 1] -eq ':') {
|
||||||
|
$AddColon = $FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
$this.__CheckOutput = [string]::Format(
|
$this.__CheckOutput = [string]::Format(
|
||||||
'{0} {1}: {2}{3}',
|
'{0} {1}{2} {3}{4}',
|
||||||
$IcingaEnums.IcingaExitCodeText[$this.__CheckState],
|
$IcingaEnums.IcingaExitCodeText[$this.__CheckState],
|
||||||
$this.Name,
|
$this.Name,
|
||||||
|
(&{ if ($AddColon) { return ':'; } else { return ''; } }),
|
||||||
$PluginThresholds,
|
$PluginThresholds,
|
||||||
$TimeSpan
|
$TimeSpan
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue