Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/31-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#342](https://github.com/Icinga/icinga-powershell-framework/pull/342) Adds feature to print commands being executed by the Icinga Management Console with `l` and improves summary visualisation for better readability
* [#346](https://github.com/Icinga/icinga-powershell-framework/pull/346) Adds support for version names for snapshots
* [#348](https://github.com/Icinga/icinga-powershell-framework/pull/348) Improves debug output on TCP handling by separating several network messages into multiple messages and by logging the send message to the client
* [#354](https://github.com/Icinga/icinga-powershell-framework/pull/354) Adds extended Repository management to Icinga Management Console

## 1.5.2 (2021-07-09)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function Show-IcingaForWindowsManagementConsoleDisableIcingaRepository()
{
[array]$Repositories = @();
[array]$RepoList = Get-IcingaRepositories -ExcludeDisabled;
[int]$MaxLength = Get-IcingaMaxTextLength -TextArray $RepoList.Name;

foreach ($repo in $RepoList) {

$PrintName = Add-IcingaWhiteSpaceToString -Text $repo.Name -Length $MaxLength;
$PrintName = [string]::Format('{0}=> {1}', $PrintName, $repo.Value.RemotePath);

$Repositories += @{
'Caption' = $PrintName;
'Command' = 'Show-IcingaForWindowsManagementConsoleDisableIcingaRepository';
'Help' = '';
'Action' = @{
'Command' = 'Show-IcingaWindowsManagementConsoleYesNoDialog';
'Arguments' = @{
'-Caption' = ([string]::Format('Disable Icinga Repository "{0}"', $repo.Name));
'-Command' = 'Disable-IcingaRepository';
'-CmdArguments' = @{
'-Name' = $repo.Name;
}
}
}
}
}

if ($Repositories.Count -ne 0) {
Show-IcingaForWindowsInstallerMenu `
-Header 'Select a repository to disable it from the system' `
-Entries $Repositories;
} else {
Show-IcingaForWindowsInstallerMenu `
-Header 'There are no local configured Icinga Repositories'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
function Show-IcingaForWindowsManagementConsoleEnableIcingaRepository()
{
[array]$Repositories = @();
[array]$RepoList = Get-IcingaRepositories;
[int]$MaxLength = Get-IcingaMaxTextLength -TextArray $RepoList.Name;

foreach ($repo in $RepoList) {

if ($repo.Value.Enabled) {
continue;
}

$PrintName = Add-IcingaWhiteSpaceToString -Text $repo.Name -Length $MaxLength;
$PrintName = [string]::Format('{0}=> {1}', $PrintName, $repo.Value.RemotePath);

$Repositories += @{
'Caption' = $PrintName;
'Command' = 'Show-IcingaForWindowsManagementConsoleEnableIcingaRepository';
'Help' = '';
'Action' = @{
'Command' = 'Show-IcingaWindowsManagementConsoleYesNoDialog';
'Arguments' = @{
'-Caption' = ([string]::Format('Enable Icinga Repository "{0}"', $repo.Name));
'-Command' = 'Enable-IcingaRepository';
'-CmdArguments' = @{
'-Name' = $repo.Name;
}
}
}
}
}

if ($Repositories.Count -ne 0) {
Show-IcingaForWindowsInstallerMenu `
-Header 'Select a repository to enable it from the system' `
-Entries $Repositories;
} else {
Show-IcingaForWindowsInstallerMenu `
-Header 'There are no local configured Icinga Repositories'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,36 @@ function Show-IcingaForWindowsManagementConsoleManageIcingaRepositories()
'Caption' = 'Set Icinga Repository "Icinga Snapshot"';
'Command' = 'Show-IcingaForWindowsManagementConsoleSetIcingaSnapshotRepositories';
'Help' = 'Allows to set the repository URL for the "Icinga Snapshot" repository and will override it, if it already exist';
},
@{
'Caption' = 'Show Icinga Repository list';
'Command' = 'Show-IcingaForWindowsManagementConsoleIcingaRepositoriesList';
'Help' = 'Shows a list of all defined Icinga Repositories on this machine';
},
@{
'Caption' = 'Move Icinga Repository to top';
'Command' = 'Show-IcingaForWindowsManagementConsolePushIcingaRepository';
'Help' = 'Allows you to move certain repositories on the system to the top of the list, which will then be applied first';
},
@{
'Caption' = 'Move Icinga Repository to bottom';
'Command' = 'Show-IcingaForWindowsManagementConsolePopIcingaRepository';
'Help' = 'Allows you to move certain repositories on the system to the bottom of the list, which will then be applied last';
},
@{
'Caption' = 'Enable Icinga Repository';
'Command' = 'Show-IcingaForWindowsManagementConsoleEnableIcingaRepository';
'Help' = 'Allows you to enable certain repositories on the system';
},
@{
'Caption' = 'Disable Icinga Repository';
'Command' = 'Show-IcingaForWindowsManagementConsoleDisableIcingaRepository';
'Help' = 'Allows you to disable certain repositories on the system';
},
@{
'Caption' = 'Remove Icinga Repository';
'Command' = 'Show-IcingaForWindowsManagementConsoleRemoveIcingaRepository';
'Help' = 'Allows you to remove certain repositories from the system';
}
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function Show-IcingaForWindowsManagementConsolePopIcingaRepository()
{
[array]$Repositories = @();
[array]$RepoList = Get-IcingaRepositories;
[int]$MaxLength = Get-IcingaMaxTextLength -TextArray $RepoList.Name;

foreach ($repo in $RepoList) {

$PrintName = Add-IcingaWhiteSpaceToString -Text $repo.Name -Length $MaxLength;
$PrintName = [string]::Format('{0}=> {1}', $PrintName, $repo.Value.RemotePath);

$Repositories += @{
'Caption' = $PrintName;
'Command' = 'Show-IcingaForWindowsManagementConsolePopIcingaRepository';
'Help' = '';
'Action' = @{
'Command' = 'Show-IcingaWindowsManagementConsoleYesNoDialog';
'Arguments' = @{
'-Caption' = ([string]::Format('Move Icinga Repository "{0}" to bottom', $repo.Name));
'-Command' = 'Pop-IcingaRepository';
'-CmdArguments' = @{
'-Name' = $repo.Name;
}
}
}
}
}

if ($Repositories.Count -ne 0) {
Show-IcingaForWindowsInstallerMenu `
-Header 'Select a repository to move it to the bottom of the list' `
-Entries $Repositories;
} else {
Show-IcingaForWindowsInstallerMenu `
-Header 'There are no local configured Icinga Repositories'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function Show-IcingaForWindowsManagementConsolePushIcingaRepository()
{
[array]$Repositories = @();
[array]$RepoList = Get-IcingaRepositories;
[int]$MaxLength = Get-IcingaMaxTextLength -TextArray $RepoList.Name;

foreach ($repo in $RepoList) {

$PrintName = Add-IcingaWhiteSpaceToString -Text $repo.Name -Length $MaxLength;
$PrintName = [string]::Format('{0}=> {1}', $PrintName, $repo.Value.RemotePath);

$Repositories += @{
'Caption' = $PrintName;
'Command' = 'Show-IcingaForWindowsManagementConsolePushIcingaRepository';
'Help' = '';
'Action' = @{
'Command' = 'Show-IcingaWindowsManagementConsoleYesNoDialog';
'Arguments' = @{
'-Caption' = ([string]::Format('Move Icinga Repository "{0}" to top', $repo.Name));
'-Command' = 'Push-IcingaRepository';
'-CmdArguments' = @{
'-Name' = $repo.Name;
}
}
}
}
}

if ($Repositories.Count -ne 0) {
Show-IcingaForWindowsInstallerMenu `
-Header 'Select a repository to move it to the top of the list' `
-Entries $Repositories;
} else {
Show-IcingaForWindowsInstallerMenu `
-Header 'There are no local configured Icinga Repositories'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function Show-IcingaForWindowsManagementConsoleRemoveIcingaRepository()
{
[array]$Repositories = @();
[array]$RepoList = Get-IcingaRepositories;
[int]$MaxLength = Get-IcingaMaxTextLength -TextArray $RepoList.Name;

foreach ($repo in $RepoList) {

$PrintName = Add-IcingaWhiteSpaceToString -Text $repo.Name -Length $MaxLength;
$PrintName = [string]::Format('{0}=> {1}', $PrintName, $repo.Value.RemotePath);

$Repositories += @{
'Caption' = $PrintName;
'Command' = 'Show-IcingaForWindowsManagementConsoleRemoveIcingaRepository';
'Help' = '';
'Action' = @{
'Command' = 'Show-IcingaWindowsManagementConsoleYesNoDialog';
'Arguments' = @{
'-Caption' = ([string]::Format('Remove Icinga Repository "{0}"', $repo.Name));
'-Command' = 'Remove-IcingaRepository';
'-CmdArguments' = @{
'-Name' = $repo.Name;
}
}
}
}
}

if ($Repositories.Count -ne 0) {
Show-IcingaForWindowsInstallerMenu `
-Header 'Select a repository to remove it from the system' `
-Entries $Repositories;
} else {
Show-IcingaForWindowsInstallerMenu `
-Header 'There are no local configured Icinga Repositories'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function Show-IcingaForWindowsManagementConsoleIcingaRepositoriesList()
{
[array]$Repositories = @();
[array]$RepoList = Get-IcingaRepositories;
[int]$MaxLength = Get-IcingaMaxTextLength -TextArray $RepoList.Name;

foreach ($repo in $RepoList) {

$PrintName = Add-IcingaWhiteSpaceToString -Text $repo.Name -Length $MaxLength;
$PrintName = [string]::Format('{0}=> {1}', $PrintName, $repo.Value.RemotePath);

$Repositories += @{
'Caption' = $PrintName;
'Command' = 'Show-IcingaForWindowsManagementConsoleIcingaRepositoriesList';
'Help' = '';
'Disabled' = (-Not $repo.Value.Enabled);
}
}

if ($Repositories.Count -ne 0) {
Show-IcingaForWindowsInstallerMenu `
-Header 'List of local configured Icinga Repositories' `
-Entries $Repositories;
} else {
Show-IcingaForWindowsInstallerMenu `
-Header 'There are no local configured Icinga Repositories'
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
function Show-IcingaForWindowsMenuRemoveComponents()
{

[array]$UninstallFeatures = @();
$AgentInstalled = (Get-IcingaAgentInstallation).Installed;
$PowerShellServiceInstalled = Get-Service -Name 'icingapowershell' -ErrorAction SilentlyContinue;
Expand Down