Skip to content

Commit 77b8c1b

Browse files
authored
Merge pull request #68 from Icinga/feature/wizard-improvement
Feature/wizard improvement
2 parents c6a7154 + 971e09d commit 77b8c1b

15 files changed

+191
-67
lines changed

lib/core/framework/Install-IcingaFrameworkService.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function Install-IcingaFrameworkService()
3333
);
3434

3535
if ([string]::IsNullOrEmpty($Path)) {
36-
Write-IcingaConsoleError 'No path specified for Framework service. Service will not be installed';
36+
Write-IcingaConsoleWarning 'No path specified for Framework service. Service will not be installed';
3737
return;
3838
}
3939

lib/core/icingaagent/firewall/Disable-IcingaFirewall.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function Disable-IcingaFirewall()
1111
if ($Firewall.ExitCode -ne 0) {
1212
Write-IcingaConsoleError ([string]::Format('Failed to remove legacy firewall: {0}{1}', $Firewall.Message, $Firewall.Error));
1313
} else {
14-
Write-IcingaConsoleNotice 'Successfully removed legacy Firewall rule';
14+
Write-IcingaConsoleNotice 'Successfully removed legacy firewall rule';
1515
}
1616
}
1717

@@ -24,7 +24,7 @@ function Disable-IcingaFirewall()
2424
if ($Firewall.ExitCode -ne 0) {
2525
Write-IcingaConsoleError ([string]::Format('Failed to remove Icinga firewall: {0}{1}', $Firewall.Message, $Firewall.Error));
2626
} else {
27-
Write-IcingaConsoleNotice 'Successfully removed Icinga Firewall rule';
27+
Write-IcingaConsoleNotice 'Successfully removed Icinga firewall rule';
2828
}
2929
}
3030
}

lib/core/icingaagent/installer/Install-IcingaAgentCertificates.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function Install-IcingaAgentCertificates()
3939
}
4040

4141
if ([string]::IsNullOrEmpty($Endpoint) -And [string]::IsNullOrEmpty($CACert)) {
42-
Write-IcingaConsoleNotice 'Your host certificates have been generated successfully. Please either specify an endpoint to connect to or provide the path to a valid ca.crt.';
42+
Write-IcingaConsoleWarning 'Your host certificates have been generated successfully. Please either specify an endpoint to connect to or provide the path to a valid ca.crt';
4343
return $TRUE;
4444
}
4545

@@ -194,7 +194,7 @@ function Test-IcingaAgentCertificates()
194194
}
195195
}
196196

197-
Write-IcingaConsoleNotice 'Icinga host certificates are present and valid. No generation required.';
197+
Write-IcingaConsoleNotice 'Icinga host certificates are present and valid. No generation required';
198198

199199
return $TRUE;
200200
}

lib/core/icingaagent/installer/Uninstall-IcingaAgent.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ function Uninstall-IcingaAgent()
1111
return;
1212
}
1313

14-
Write-IcingaConsoleNotice 'Removing current installed Icinga Agent';
14+
Write-IcingaConsoleNotice 'Removing current Icinga Agent';
1515

1616
Stop-IcingaService 'icinga2';
1717

1818
$Uninstaller = Start-IcingaProcess -Executable 'MsiExec.exe' -Arguments ([string]::Format('{0} /q', $IcingaData.Uninstaller)) -FlushNewLine;
1919

2020
if ($Uninstaller.ExitCode -ne 0) {
21-
Write-IcingaConsoleError ([string]::Format('Failed to remove Icinga 2 Agent: {0}{1}', $Uninstaller.Message, $Uninstaller.Error));
21+
Write-IcingaConsoleError ([string]::Format('Failed to remove Icinga Agent: {0}{1}', $Uninstaller.Message, $Uninstaller.Error));
2222
return $FALSE;
2323
}
2424

2525
if ($RemoveDataFolder) {
2626
[string]$IcingaProgramData = Join-Path -Path $Env:ProgramData -ChildPath 'icinga2';
27-
Write-IcingaConsoleNotice -Message 'Removing Icinga 2 directoy from ProgramData: "{0}"' -Objects $IcingaProgramData;
27+
Write-IcingaConsoleNotice -Message 'Removing Icinga Agent directory: "{0}"' -Objects $IcingaProgramData;
2828
if ((Remove-ItemSecure -Path $IcingaProgramData -Recurse -Force) -eq $FALSE) {
2929
return $FALSE;
3030
}

lib/core/icingaagent/misc/Disable-IcingaAgentFeature.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Disable-IcingaAgentFeature()
99
}
1010

1111
if ((Test-IcingaAgentFeatureEnabled -Feature $Feature) -eq $FALSE) {
12-
Write-IcingaConsoleWarning ([string]::Format('This feature is already disabled [{0}]', $Feature));
12+
Write-IcingaConsoleNotice ([string]::Format('This feature is already disabled [{0}]', $Feature));
1313
return;
1414
}
1515

lib/core/icingaagent/misc/Enable-IcingaAgentFeature.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Enable-IcingaAgentFeature()
99
}
1010

1111
if ((Test-IcingaAgentFeatureEnabled -Feature $Feature)) {
12-
Write-IcingaConsoleWarning ([string]::Format('This feature is already enabled [{0}]', $Feature));
12+
Write-IcingaConsoleNotice ([string]::Format('This feature is already enabled [{0}]', $Feature));
1313
return;
1414
}
1515

lib/core/icingaagent/misc/Move-IcingaAgentDefaultConfig.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function Move-IcingaAgentDefaultConfig()
44
$BackupFile = Join-Path -Path $ConfigDir -ChildPath 'ps_backup\backup_executed.key';
55

66
if ((Test-Path $BackupFile)) {
7-
Write-IcingaConsoleNotice 'A backup of your default configuration is not required. A backup was already made.';
7+
Write-IcingaConsoleNotice 'A backup of your default configuration is not required. A backup was already made';
88
return;
99
}
1010

lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1

Lines changed: 100 additions & 39 deletions
Large diffs are not rendered by default.

lib/core/icingaagent/setters/Set-IcingaAgentServicePermission.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Set-IcingaAgentServicePermission()
1212
$NewSystemContent = @();
1313

1414
if ([string]::IsNullOrEmpty($ServiceUser)) {
15-
Write-IcingaTestOutput -Severity 'FAILED' -Message 'There is no user assigned to the Icinga 2 service or the service is not yet installed';
15+
Write-IcingaTestOutput -Severity 'Failed' -Message 'There is no user assigned to the Icinga 2 service or the service is not yet installed';
1616
return $FALSE;
1717
}
1818

lib/core/icingaagent/tests/Test-IcingaAcl.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ function Test-IcingaAcl()
3838
[string]$messageFormat = 'Directory "{0}" {1} by the Icinga Service User "{2}"';
3939
if ($UserFound) {
4040
if ($HasAccess) {
41-
Write-IcingaTestOutput -Severity 'PASSED' -Message ([string]::Format($messageFormat, $Directory, 'is accessible and writeable', $ServiceUser));
41+
Write-IcingaTestOutput -Severity 'Passed' -Message ([string]::Format($messageFormat, $Directory, 'is accessible and writeable', $ServiceUser));
4242
} else {
43-
Write-IcingaTestOutput -Severity 'FAILED' -Message ([string]::Format($messageFormat, $Directory, 'is accessible but NOT writeable', $ServiceUser));
43+
Write-IcingaTestOutput -Severity 'Failed' -Message ([string]::Format($messageFormat, $Directory, 'is accessible but NOT writeable', $ServiceUser));
4444
Write-IcingaConsolePlain "\_ Please run the following command to fix this issue: Set-IcingaAcl -Directory '$Directory'";
4545
}
4646
} else {
47-
Write-IcingaTestOutput -Severity 'FAILED' -Message ([string]::Format($messageFormat, $Directory, 'is not accessible', $ServiceUser));
47+
Write-IcingaTestOutput -Severity 'Failed' -Message ([string]::Format($messageFormat, $Directory, 'is not accessible', $ServiceUser));
4848
Write-IcingaConsolePlain "\_ Please run the following command to fix this issue: Set-IcingaAcl -Directory '$Directory'";
4949
}
5050
}

0 commit comments

Comments
 (0)