Skip to content

Commit

Permalink
Add final installation step and fix progress bar on the last wizard page
Browse files Browse the repository at this point in the history
refs #3761
  • Loading branch information
Johannes Meyer committed Oct 11, 2013
1 parent 96a64ce commit 189cc50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
7 changes: 6 additions & 1 deletion installer/layouts/scripts/menu.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php $currentStep = isset($this->form) ? $this->form->getCurrentStep() : 0; ?>
<?php
$currentStep = isset($this->form) ? $this->form->getCurrentStep() : -1;
if ($currentStep === 0) { // The installation seems to be finished but we still want a progress on the last page
$currentStep = 7;
}
?>
<table class="table" style="margin: .7em;">
<tr class="<?php echo $currentStep == 1 ? 'active' : ($currentStep > 1 ? 'success' : '') ?>">
<td>Start</td>
Expand Down
11 changes: 10 additions & 1 deletion library/Icinga/Application/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,16 @@ private function setupDefaultAdmin()
*/
private function finalize()
{

$configPath = $this->configDir . '/config.ini';
$config = new Config($configPath);
$config->global->installed = 1;
$iniWriter = new PreservingIniWriter(
array(
'filename' => $configPath,
'config' => $config
)
);
$iniWriter->write();
}

/**
Expand Down

0 comments on commit 189cc50

Please sign in to comment.