mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes config generating with datalists
This commit is contained in:
parent
06beba7d12
commit
bdf0b7146e
1 changed files with 3 additions and 1 deletions
|
|
@ -145,7 +145,6 @@ function Get-IcingaCheckCommandConfig()
|
||||||
$Data = (Get-Help $check);
|
$Data = (Get-Help $check);
|
||||||
$ParameterList = (Get-Command -Name $check).Parameters;
|
$ParameterList = (Get-Command -Name $check).Parameters;
|
||||||
$PluginNameSpace = $Data.Name.Replace('Invoke-', '');
|
$PluginNameSpace = $Data.Name.Replace('Invoke-', '');
|
||||||
$IsDataList = $FALSE;
|
|
||||||
|
|
||||||
# Add command Structure
|
# Add command Structure
|
||||||
$Basket.Command.Add(
|
$Basket.Command.Add(
|
||||||
|
|
@ -168,6 +167,8 @@ function Get-IcingaCheckCommandConfig()
|
||||||
# Loop through parameters of a given command
|
# Loop through parameters of a given command
|
||||||
foreach ($parameter in $Data.parameters.parameter) {
|
foreach ($parameter in $Data.parameters.parameter) {
|
||||||
|
|
||||||
|
$IsDataList = $FALSE;
|
||||||
|
|
||||||
# IsNumeric-Check on position to determine the order-value
|
# IsNumeric-Check on position to determine the order-value
|
||||||
If (Test-Numeric($parameter.position) -eq $TRUE) {
|
If (Test-Numeric($parameter.position) -eq $TRUE) {
|
||||||
[string]$Order = [int]$parameter.position + 1;
|
[string]$Order = [int]$parameter.position + 1;
|
||||||
|
|
@ -270,6 +271,7 @@ function Get-IcingaCheckCommandConfig()
|
||||||
|
|
||||||
$IcingaDataType = [string]::Format('Icinga\Module\Director\DataType\DataType{0}', $IcingaDataType)
|
$IcingaDataType = [string]::Format('Icinga\Module\Director\DataType\DataType{0}', $IcingaDataType)
|
||||||
|
|
||||||
|
#Write-Host $Basket.Datafield.Values.varname
|
||||||
if ($Basket.Datafield.Values.varname -ne $IcingaCustomVariable) {
|
if ($Basket.Datafield.Values.varname -ne $IcingaCustomVariable) {
|
||||||
$Basket.Datafield.Add(
|
$Basket.Datafield.Add(
|
||||||
[string]$FieldID, @{
|
[string]$FieldID, @{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue