mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
consistency run through
This commit is contained in:
@@ -71,6 +71,10 @@ class ChecksController extends InstallationController implements InstallerStep
|
|||||||
|
|
||||||
public function complete(): bool
|
public function complete(): bool
|
||||||
{
|
{
|
||||||
|
if ($this->stepCompleted('checks')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$this->checkPhpVersion()) {
|
if (!$this->checkPhpVersion()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -107,7 +107,7 @@ class DatabaseController extends InstallationController implements InstallerStep
|
|||||||
|
|
||||||
public function complete(): bool
|
public function complete(): bool
|
||||||
{
|
{
|
||||||
if (session('install.database')) {
|
if ($this->stepCompleted('database')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@ namespace App\Http\Controllers\Install;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use LibreNMS\DB\Eloquent;
|
use LibreNMS\DB\Eloquent;
|
||||||
|
use LibreNMS\Interfaces\InstallerStep;
|
||||||
|
|
||||||
class InstallationController extends Controller
|
class InstallationController extends Controller
|
||||||
{
|
{
|
||||||
@@ -39,10 +40,16 @@ class InstallationController extends Controller
|
|||||||
'finish' => \App\Http\Controllers\Install\FinalizeController::class,
|
'finish' => \App\Http\Controllers\Install\FinalizeController::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function redirectToFirst()
|
||||||
|
{
|
||||||
|
$step = collect($this->filterActiveSteps())->keys()->first(null, 'checks');
|
||||||
|
return redirect()->route("install.$step");
|
||||||
|
}
|
||||||
|
|
||||||
public function redirectToIncomplete()
|
public function redirectToIncomplete()
|
||||||
{
|
{
|
||||||
foreach ($this->stepStatus() as $step => $complete) {
|
foreach ($this->filterActiveSteps() as $step => $controller) {
|
||||||
if (!$complete) {
|
if (!$controller->complete()) {
|
||||||
return redirect()->route("install.$step");
|
return redirect()->route("install.$step");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,21 +70,19 @@ class InstallationController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Init step info and return false if previous steps have not been completed.
|
* Init step info and return false if previous steps have not been completed.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool if all previous steps have been completed
|
||||||
*/
|
*/
|
||||||
final protected function initInstallStep()
|
final protected function initInstallStep()
|
||||||
{
|
{
|
||||||
if (is_string(config('librenms.install'))) {
|
$this->filterActiveSteps();
|
||||||
$this->steps = array_intersect_key($this->steps, array_flip(explode(',', config('librenms.install'))));
|
|
||||||
}
|
|
||||||
$this->configureDatabase();
|
$this->configureDatabase();
|
||||||
|
|
||||||
foreach ($this->stepStatus() as $step => $completed) {
|
foreach ($this->stepStatus() as $step => $complete) {
|
||||||
if ($step == $this->step) {
|
if ($step == $this->step) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$completed) {
|
if (!$complete) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,13 +92,21 @@ class InstallationController extends Controller
|
|||||||
|
|
||||||
final protected function markStepComplete()
|
final protected function markStepComplete()
|
||||||
{
|
{
|
||||||
session(["install.$this->step" => true]);
|
if (!$this->stepCompleted($this->step)) {
|
||||||
session()->save();
|
session(["install.$this->step" => true]);
|
||||||
|
session()->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final protected function stepCompleted(string $step)
|
||||||
|
{
|
||||||
|
return (bool)session("install.$step");
|
||||||
}
|
}
|
||||||
|
|
||||||
final protected function formatData($data = [])
|
final protected function formatData($data = [])
|
||||||
{
|
{
|
||||||
$data['steps'] = $this->hydrateControllers();
|
$data['steps'] = $this->hydrateControllers();
|
||||||
|
$data['step'] = $this->step;
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,18 +127,32 @@ class InstallationController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function filterActiveSteps()
|
||||||
|
{
|
||||||
|
if (is_string(config('librenms.install'))) {
|
||||||
|
$this->steps = array_intersect_key($this->steps, array_flip(explode(',', config('librenms.install'))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->steps;
|
||||||
|
}
|
||||||
|
|
||||||
private function hydrateControllers()
|
private function hydrateControllers()
|
||||||
{
|
{
|
||||||
$this->steps = array_map(function ($class) {
|
$this->steps = array_map(function ($class) {
|
||||||
return is_object($class) ? $class : app()->make($class);
|
return is_object($class) ? $class : app()->make($class);
|
||||||
}, $this->steps);
|
}, $this->steps);
|
||||||
|
|
||||||
|
return $this->steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function stepStatus()
|
private function stepStatus()
|
||||||
{
|
{
|
||||||
$this->hydrateControllers();
|
$this->hydrateControllers();
|
||||||
return array_map(function ($controller) {
|
return array_map(function (InstallerStep $controller) {
|
||||||
return $controller->complete();
|
return [
|
||||||
}, $this->steps);
|
'enabled' => $controller->enabled(),
|
||||||
|
'complete' => $controller->complete(),
|
||||||
|
];
|
||||||
|
}, $this->steps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
namespace App\Http\Controllers\Install;
|
namespace App\Http\Controllers\Install;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Illuminate\Database\QueryException;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use LibreNMS\DB\Eloquent;
|
|
||||||
use LibreNMS\Interfaces\InstallerStep;
|
use LibreNMS\Interfaces\InstallerStep;
|
||||||
|
|
||||||
class MakeUserController extends InstallationController implements InstallerStep
|
class MakeUserController extends InstallationController implements InstallerStep
|
||||||
@@ -65,11 +65,20 @@ class MakeUserController extends InstallationController implements InstallerStep
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$user = new User($request->only(['username', 'password', 'email']));
|
// only allow the first admin to be created
|
||||||
$user->level = 10;
|
if (!$this->complete()) {
|
||||||
$user->setPassword($request->get('password'));
|
$this->configureDatabase();
|
||||||
$res = $user->save();
|
$user = new User($request->only(['username', 'password', 'email']));
|
||||||
$message = $res ? trans('install.user.success') : trans('install.user.failure');
|
$user->level = 10; // admin
|
||||||
|
$user->setPassword($request->get('password'));
|
||||||
|
$res = $user->save();
|
||||||
|
|
||||||
|
$message = trans('install.user.failure');
|
||||||
|
if ($res) {
|
||||||
|
$message = trans('install.user.success');
|
||||||
|
$this->markStepComplete();
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$message = $e->getMessage();
|
$message = $e->getMessage();
|
||||||
}
|
}
|
||||||
@@ -79,12 +88,27 @@ class MakeUserController extends InstallationController implements InstallerStep
|
|||||||
|
|
||||||
public function complete(): bool
|
public function complete(): bool
|
||||||
{
|
{
|
||||||
return Eloquent::isConnected() && User::adminOnly()->exists();
|
if ($this->stepCompleted('user')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ($this->stepCompleted('database')) {
|
||||||
|
$exists = User::adminOnly()->exists();
|
||||||
|
if ($exists) {
|
||||||
|
$this->markStepComplete();
|
||||||
|
}
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
} catch (QueryException $e) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function enabled(): bool
|
public function enabled(): bool
|
||||||
{
|
{
|
||||||
return (bool)session('install.database');
|
return $this->stepCompleted('database');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function icon(): string
|
public function icon(): string
|
||||||
|
@@ -53,6 +53,10 @@ class CheckInstalled
|
|||||||
// redirect to install if not installed
|
// redirect to install if not installed
|
||||||
return redirect()->route('install');
|
return redirect()->route('install');
|
||||||
} elseif ($installed && $is_install_route) {
|
} elseif ($installed && $is_install_route) {
|
||||||
|
// in case someone refreshes on the finish step
|
||||||
|
if ($request->routeIs('install.finish')) {
|
||||||
|
return redirect()->route('home');
|
||||||
|
}
|
||||||
throw new AuthorizationException('This should only be called during install');
|
throw new AuthorizationException('This should only be called during install');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
@extends('layouts.install')
|
@extends('layouts.install')
|
||||||
|
|
||||||
@section('title', trans('install.checks.title'))
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class=" col-8 offset-2">
|
<div class=" col-8 offset-2">
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
@extends('layouts.install')
|
@extends('layouts.install')
|
||||||
|
|
||||||
@section('title', trans('install.database.title'))
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -73,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" @if(!$valid_credentials) style="display: none" @endif>
|
<div id="migrate-step" class="row" @if(!$valid_credentials) style="display: none" @endif>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div id="db-form-header"
|
<div id="db-form-header"
|
||||||
@@ -95,12 +93,16 @@
|
|||||||
<i class="fa fa-lg fa-chevron-down rotate-if-collapsed fa-pull-right"></i>
|
<i class="fa fa-lg fa-chevron-down rotate-if-collapsed fa-pull-right"></i>
|
||||||
</div>
|
</div>
|
||||||
<div id="migrate-container" class="card-body collapse @if(!$migrated) show @endif">
|
<div id="migrate-container" class="card-body collapse @if(!$migrated) show @endif">
|
||||||
<div class="mb-2 text-right">
|
<div class="row">
|
||||||
<button id="migrate-btn" type="button" class="btn btn-primary">
|
<div class="col-md-8">
|
||||||
@lang('install.migrate.migrate')
|
<div id="migrate-warning" class="alert alert-warning">@lang('install.migrate.building_interrupt')</div>
|
||||||
</button>
|
</div>
|
||||||
|
<div class="col-md-4 text-right">
|
||||||
|
<button id="migrate-btn" type="button" class="btn btn-primary mt-1 mb-4">
|
||||||
|
@lang('install.migrate.migrate')
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="migrate-warning" class="alert alert-warning">@lang('install.migrate.building_interrupt')</div>
|
|
||||||
<textarea readonly id="db-update" class="form-control" rows="20" placeholder="@lang('install.migrate.wait')"></textarea>
|
<textarea readonly id="db-update" class="form-control" rows="20" placeholder="@lang('install.migrate.wait')"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -123,7 +125,7 @@
|
|||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.result === 'ok') {
|
if (response.result === 'ok') {
|
||||||
$('#credential-status>i').attr('class', 'fa fa-lg fa-check-circle text-success');
|
$('#credential-status>i').attr('class', 'fa fa-lg fa-check-circle text-success');
|
||||||
$('#migration-output').show();
|
$('#migrate-step').show();
|
||||||
$('#db-form-container').collapse('hide')
|
$('#db-form-container').collapse('hide')
|
||||||
} else {
|
} else {
|
||||||
$('#credential-status>i').attr('class', 'fa fa-lg fa-times-circle text-danger')
|
$('#credential-status>i').attr('class', 'fa fa-lg fa-times-circle text-danger')
|
||||||
@@ -168,8 +170,7 @@
|
|||||||
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
|
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
|
||||||
$('#migrate-warning').hide();
|
$('#migrate-warning').hide();
|
||||||
checkStepStatus(function (status) {
|
checkStepStatus(function (status) {
|
||||||
console.log(status);
|
if (status.database.complete) {
|
||||||
if (status.database) {
|
|
||||||
$('#migrate-status>i').attr('class', 'fa fa-lg fa-check-circle text-success');
|
$('#migrate-status>i').attr('class', 'fa fa-lg fa-check-circle text-success');
|
||||||
$('#migrate-container').collapse('hide');
|
$('#migrate-container').collapse('hide');
|
||||||
}
|
}
|
||||||
@@ -186,10 +187,6 @@
|
|||||||
#db-update {
|
#db-update {
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
#retry-btn {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#migrate-warning {
|
#migrate-warning {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
@extends('layouts.install')
|
@extends('layouts.install')
|
||||||
|
|
||||||
@section('title', trans('install.finish.title'))
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="card mb-2">
|
<div class="card mb-2">
|
||||||
<div class="card-header" data-toggle="collapse" data-target="#env-file-text" aria-expanded="false">
|
<div class="card-header" data-toggle="collapse" data-target="#env-file-text" aria-expanded="false">
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
@extends('layouts.install')
|
@extends('layouts.install')
|
||||||
|
|
||||||
@section('title', trans('install.user.title'))
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -28,7 +26,7 @@
|
|||||||
@error('email')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
@error('email')<div class="invalid-feedback">{{ $message }}</div>@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-success float-right">@lang('install.user.button')</button>
|
<button type="submit" class="btn btn-primary float-right">@lang('install.user.button')</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
@extends('layouts.install')
|
@extends('layouts.install')
|
||||||
|
|
||||||
@section('title', trans('install.user.created'))
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-center p-5">
|
<div class="col-12 text-center p-5">
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
.primary-panel {
|
.primary-panel {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border:0;
|
border: 0;
|
||||||
box-shadow: 3px 3px 30px #222;
|
box-shadow: 3px 3px 30px #222;
|
||||||
min-height: 540px;
|
min-height: 540px;
|
||||||
}
|
}
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
.card-img-top {
|
.card-img-top {
|
||||||
background-color: #EEEEEE;
|
background-color: #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#progress-icons {
|
#progress-icons {
|
||||||
background: linear-gradient(to bottom, #EEEEEE 50%, white 50%)
|
background: linear-gradient(to bottom, #EEEEEE 50%, white 50%)
|
||||||
}
|
}
|
||||||
@@ -51,16 +52,16 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: lightgray;
|
background-color: lightgray;
|
||||||
box-shadow:
|
box-shadow: inset 0 6px 4px -5px black,
|
||||||
inset 0 6px 4px -5px black,
|
inset 0 -6px 4px -7px black;
|
||||||
inset 0 -6px 4px -7px black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-progress.loop {
|
.install-progress.loop {
|
||||||
box-shadow:
|
box-shadow: inset 0 6px 4px -5px black,
|
||||||
inset 0 6px 4px -5px black,
|
inset 0 -6px 4px -7px black,
|
||||||
inset 0 -6px 4px -7px black,
|
inset 8px 0 4px -6px grey; /* missing button shadow */
|
||||||
inset 8px 0 4px -6px grey; /* missing button shadow */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-progress.complete {
|
.install-progress.complete {
|
||||||
background-color: #db202e;
|
background-color: #db202e;
|
||||||
}
|
}
|
||||||
@@ -72,9 +73,11 @@
|
|||||||
.rotate-if-collapsed {
|
.rotate-if-collapsed {
|
||||||
transition: .4s transform ease-in-out;
|
transition: .4s transform ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-toggle="collapse"] {
|
[data-toggle="collapse"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-toggle="collapse"][aria-expanded="true"] .rotate-if-collapsed {
|
[data-toggle="collapse"][aria-expanded="true"] .rotate-if-collapsed {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
@@ -88,30 +91,33 @@
|
|||||||
<img class="card-img-top p-4" src="{{ asset(\LibreNMS\Config::get('title_image', "images/librenms_logo_light.svg")) }}" alt="LibreNMS">
|
<img class="card-img-top p-4" src="{{ asset(\LibreNMS\Config::get('title_image', "images/librenms_logo_light.svg")) }}" alt="LibreNMS">
|
||||||
<div id="progress-icons" class="d-flex flex-row justify-content-around">
|
<div id="progress-icons" class="d-flex flex-row justify-content-around">
|
||||||
<div class="install-progress complete"></div>
|
<div class="install-progress complete"></div>
|
||||||
@foreach($steps as $step => $controller)
|
@foreach($steps as $name => $controller)
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ route('install.' . $step) }}"
|
<a href="{{ route('install.' . $name) }}"
|
||||||
class="install-enable-{{ $step }} btn btn-info btn-circle @if(!$controller->enabled($steps)) disabled @endif"
|
id="install-step-{{ $name }}"
|
||||||
title="@lang("install.$step.title")"
|
class="install-step btn btn-circle
|
||||||
|
@if($step === $name) btn-outline-info @else btn-info @endif
|
||||||
|
@if(!$controller->enabled()) disabled @endif"
|
||||||
|
title="@lang("install.$name.title")"
|
||||||
>
|
>
|
||||||
<i class="fa fa-lg {{ $controller->icon() }}"></i>
|
<i class="fa fa-lg {{ $controller->icon() }}"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="progress-{{ $step }}-bar" class="install-progress loop @if($controller->complete()) complete @endif"></div>
|
<div id="progress-{{ $name }}-bar" class="install-progress loop @if($controller->complete()) complete @endif"></div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<h2 id="step-title">@yield('title')</h2>
|
<h2 id="step-title">@lang("install.$step.title")</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="error-box" class="col-12">
|
<div id="error-box" class="col-12">
|
||||||
@if(!empty($messages))
|
@if(!empty($messages))
|
||||||
@foreach($messages as $message)
|
@foreach($messages as $message)
|
||||||
<div class="alert alert-danger">{{ $message }}</div>
|
<div class="alert alert-danger">{{ $message }}</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -121,22 +127,43 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
var step = '{{ $step }}';
|
||||||
function checkStepStatus(callback) {
|
function checkStepStatus(callback) {
|
||||||
$.ajax('{{ route('install.action.steps') }}')
|
$.ajax('{{ route('install.action.steps') }}')
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
Object.keys(data).forEach(function (key) {
|
var primary;
|
||||||
if (data[key]) {
|
Object.keys(data).forEach(function (key) {
|
||||||
$('.install-enable-' + key).removeClass('disabled');
|
var classes = 'btn btn-circle';
|
||||||
} else {
|
classes += (key === step ? ' btn-outline-info' : ' btn-info');
|
||||||
$('.install-enable-' + key).addClass('disabled');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (callback && typeof callback === "function") {
|
// mark buttons enabled
|
||||||
callback(data);
|
if (!data[key].enabled) {
|
||||||
}
|
classes += ' disabled';
|
||||||
})
|
} else if (!data[key].complete && !primary) {
|
||||||
|
// if this step is the first enabled, but not complete, mark it as primary
|
||||||
|
primary = key
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#install-step-' + key).attr('class', classes);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (primary) {
|
||||||
|
$('#install-step-' + primary)
|
||||||
|
.removeClass('btn-info')
|
||||||
|
.removeClass('btn-outline-info')
|
||||||
|
.addClass(primary === step ? 'btn-outline-primary' : 'btn-primary');
|
||||||
|
} else {
|
||||||
|
// all complete
|
||||||
|
$('.install-progress').addClass('complete')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (callback && typeof callback === "function") {
|
||||||
|
callback(data);
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkStepStatus();
|
||||||
</script>
|
</script>
|
||||||
@yield('scripts')
|
@yield('scripts')
|
||||||
</body>
|
</body>
|
||||||
|
@@ -33,7 +33,7 @@ Route::group(['middleware' => ['auth'], 'guard' => 'auth'], function () {
|
|||||||
Route::get('about', 'AboutController@index');
|
Route::get('about', 'AboutController@index');
|
||||||
Route::get('authlog', 'UserController@authlog');
|
Route::get('authlog', 'UserController@authlog');
|
||||||
Route::get('overview', 'OverviewController@index')->name('overview');
|
Route::get('overview', 'OverviewController@index')->name('overview');
|
||||||
Route::get('/', 'OverviewController@index');
|
Route::get('/', 'OverviewController@index')->name('home');
|
||||||
Route::match(['get', 'post'], 'device/{device}/{tab?}/{vars?}', 'DeviceController@index')
|
Route::match(['get', 'post'], 'device/{device}/{tab?}/{vars?}', 'DeviceController@index')
|
||||||
->name('device')->where(['vars' => '.*']);
|
->name('device')->where(['vars' => '.*']);
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ Route::group(['middleware' => ['auth'], 'guard' => 'auth'], function () {
|
|||||||
|
|
||||||
// installation routes
|
// installation routes
|
||||||
Route::group(['prefix' => 'install', 'namespace' => 'Install'], function () {
|
Route::group(['prefix' => 'install', 'namespace' => 'Install'], function () {
|
||||||
Route::get('/', 'InstallationController@redirectToIncomplete')->name('install');
|
Route::get('/', 'InstallationController@redirectToFirst')->name('install');
|
||||||
Route::get('/checks', 'ChecksController@index')->name('install.checks');
|
Route::get('/checks', 'ChecksController@index')->name('install.checks');
|
||||||
Route::get('/database', 'DatabaseController@index')->name('install.database');
|
Route::get('/database', 'DatabaseController@index')->name('install.database');
|
||||||
Route::get('/user', 'MakeUserController@index')->name('install.user');
|
Route::get('/user', 'MakeUserController@index')->name('install.user');
|
||||||
|
Reference in New Issue
Block a user