mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Improved organising for Pending Updates provider
This commit is contained in:
parent
79606b70e5
commit
2aff650c6d
1 changed files with 2 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ function Get-IcingaUpdatesPending ()
|
|||
# Get a list of current pending updates which are not yet installed on the system
|
||||
$Pending = $SearchIndex.Search("IsInstalled=0");
|
||||
$PendingUpdates.Add('count', $Pending.Updates.Count);
|
||||
$PendingUpdates.Add('updates', @{ });
|
||||
|
||||
foreach ($update in $Pending.Updates) {
|
||||
[hashtable]$PendingUpdateDetails = @{};
|
||||
|
|
@ -60,7 +61,7 @@ function Get-IcingaUpdatesPending ()
|
|||
$name = [string]::Format('{0} ({1})', $name, $PendingUpdateNameCache[$name]);
|
||||
}
|
||||
|
||||
$PendingUpdates.Add($name, $PendingUpdateDetails);
|
||||
$PendingUpdates.updates.Add($name, $PendingUpdateDetails);
|
||||
}
|
||||
} catch {
|
||||
if ($PendingUpdates.ContainsKey('Count') -eq $FALSE) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue