Skip to content

Commit f6c51b8

Browse files
authored
Merge pull request #316 from Icinga:feature/relocate_reconfigure_menu
Feature: Relocating reconfigure menu entry The reconfigure menu was previously present inside the Icinga Agent sub-menu and is now moved to the main installation menu. The reason was that in case Agent installation failed, no re-configuration was possible because the entry is locked for the Agent not being present.
2 parents 4bb17aa + 351848d commit f6c51b8

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

doc/31-Changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
2121
* [#305](https://github.com/Icinga/icinga-powershell-framework/pull/305) Adds a new Cmdlet to test if functions with `Add-Type` are already present inside the current scope of the shell
2222
* [#306](https://github.com/Icinga/icinga-powershell-framework/pull/306) Adds new Cmdlet `Exit-IcingaThrowCritical` to throw critical exit with a custom message, either by force or by using string filtering and adds storing of plugin exit codes internally
2323
* [#314](https://github.com/Icinga/icinga-powershell-framework/pull/314) Adds support to configure on which address TCP sockets are created on, defaults to `loopback` interface
24+
* [#316](https://github.com/Icinga/icinga-powershell-framework/pull/316) The reconfigure menu was previously present inside the Icinga Agent sub-menu and is now moved to the main installation menu for the Management Console
2425

2526
## 1.5.2 (2021-07-09)
2627

lib/core/installer/menu/installation/general/Show-IcingaForWindowsInstallerMenuInstallWindows.psm1

+11-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Show-IcingaForWindowsInstallerMenuInstallWindows()
88
[switch]$Advanced = $FALSE
99
);
1010

11-
if ($null -eq (Get-IcingaPowerShellConfig -Path 'Framework.Config.Swap')) {
11+
if ($null -eq (Get-IcingaPowerShellConfig -Path 'Framework.Config.Swap') -And $null -eq (Get-IcingaPowerShellConfig -Path 'Framework.Config.Live')) {
1212
Show-IcingaForWindowsInstallerMenuSelectConnection;
1313
return;
1414
}
@@ -22,9 +22,16 @@ function Show-IcingaForWindowsInstallerMenuInstallWindows()
2222
'Help' = 'Start a new configuration and truncate all information stored on the current swap file. This will only modify your production if you hit "Start installation" at the end';
2323
},
2424
@{
25-
'Caption' = 'Continue configuration';
26-
'Command' = 'Show-IcingaForWindowsInstallerMenuContinueConfiguration';
27-
'Help' = 'Continue with the previous configuration swap file.';
25+
'Caption' = 'Continue configuration';
26+
'Command' = 'Show-IcingaForWindowsInstallerMenuContinueConfiguration';
27+
'Help' = 'Continue with the previous configuration swap file.';
28+
'Disabled' = ([bool]($null -eq (Get-IcingaPowerShellConfig -Path 'Framework.Config.Swap')));
29+
},
30+
@{
31+
'Caption' = 'Reconfigure Environment';
32+
'Command' = 'Invoke-IcingaForWindowsManagementConsoleReconfigureAgent';
33+
'Help' = 'Load the current configuration of Icinga for Windows to modify it.';
34+
'Disabled' = ([bool]($null -eq (Get-IcingaPowerShellConfig -Path 'Framework.Config.Live')));
2835
}
2936
) `
3037
-DefaultIndex $DefaultInput `

lib/core/installer/menu/manage/agent/Show-IcingaForWindowsMenuManageIcingaAgent.psm1

-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ function Show-IcingaForWindowsMenuManageIcingaAgent()
1717
'Help' = 'Allows you to install Icinga for Windows with all required components and options';
1818
'Disabled' = ($null -eq $IcingaService -Or (-Not $AdminShell));
1919
},
20-
@{
21-
'Caption' = 'Reconfigure Installation';
22-
'Command' = 'Invoke-IcingaForWindowsManagementConsoleReconfigureAgent';
23-
'Help' = 'Load the current applied configuration for your Icinga Agent and modify the values';
24-
'Disabled' = ($null -eq (Get-IcingaPowerShellConfig -Path 'Framework.Config.Live'));
25-
},
2620
@{
2721
'Caption' = 'Read Icinga Agent Log File';
2822
'Command' = 'Show-IcingaForWindowsMenuManageIcingaAgent';

0 commit comments

Comments
 (0)