mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor
This commit is contained in:
@@ -26,9 +26,10 @@
|
||||
namespace App\Http\Controllers\Install;
|
||||
|
||||
use Exception;
|
||||
use LibreNMS\Interfaces\InstallerStep;
|
||||
use LibreNMS\Util\EnvHelper;
|
||||
|
||||
class FinalizeController extends InstallationController
|
||||
class FinalizeController extends InstallationController implements InstallerStep
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
@@ -106,22 +107,6 @@ class FinalizeController extends InstallationController
|
||||
}
|
||||
}
|
||||
|
||||
public static function enabled($steps): bool
|
||||
{
|
||||
foreach ($steps as $step => $controller) {
|
||||
if ($step !== 'finish' && !session("install.$step")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function icon(): string
|
||||
{
|
||||
return 'fa-check';
|
||||
}
|
||||
|
||||
private function getConfigFileContents()
|
||||
{
|
||||
$db = session('db');
|
||||
@@ -171,4 +156,25 @@ class FinalizeController extends InstallationController
|
||||
EOD;
|
||||
|
||||
}
|
||||
|
||||
public function enabled(): bool
|
||||
{
|
||||
foreach ($this->steps as $step => $controller) {
|
||||
if ($step !== 'finish' && !session("install.$step")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function complete(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function icon(): string
|
||||
{
|
||||
return 'fa-check';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user