slight style improvements

checks partial
This commit is contained in:
Tony Murray 2020-06-05 15:44:10 -05:00
parent 72efd7bbd9
commit 2221c0cfc2
4 changed files with 95 additions and 6 deletions

View File

@ -29,6 +29,25 @@ class ChecksController extends \App\Http\Controllers\Controller
{
public function __invoke()
{
return view('install.checks');
$checks = [
['item' => 'test', 'status' => false, 'comment' => 'comment'],
$this->checkExtension('pdo_mysql'),
$this->checkExtension('mysqlnd'),
$this->checkExtension('gd'),
];
return view('install.checks', ['stage' => 1, 'checks' => $checks]);
}
private function checkExtension($extension)
{
if (extension_loaded("$extension")) {
return ['item' => $extension, 'status' => true];
}
return [
'item' => $extension,
'status' => false
];
}
}

View File

@ -1,4 +1,13 @@
<?php
return [
'title' => 'LibreNMS Install'
'title' => 'LibreNMS Install',
'install' => 'Install',
'welcome' => 'Welcome to the LibreNMS installer',
'stage' => 'Stage :stage of :stages complete',
'checks' => [
'title' => 'Pre-Install Checks',
'item' => 'Item',
'status' => 'Status',
'comment' => 'Comment',
]
];

View File

@ -1,5 +1,31 @@
@extends('layouts.install')
@section('content')
Checks
<div class="row">
<div class="col-xs-12">
<h4 class="text-center">@lang('install.checks.title')</h4>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<table class="table table-condensed table-bordered">
<tr>
<th class="col-xs-3">@lang('install.checks.item')</th>
<th class="col-xs-2">@lang('install.checks.status')</th>
<th class="col-xs-7">@lang('install.checks.comment')</th>
</tr>
@foreach($checks as $check)
<tr class="{{ $check['status'] ? 'success' : 'danger' }}">
<td>{{ $check['item'] }}</td>
<td>@if($check['status'])
<i class="fa fa-check-circle alert-success"></i>
@else
<i class="fa fa-times-circle alert-danger"></i>
@endif</td>
<td>{{ $check['comment'] ?? '' }}</td>
</tr>
@endforeach
</table>
</div>
</div>
@endsection

View File

@ -6,15 +6,50 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" type="text/css"/>
<link href="{{ asset(Config::get('stylesheet')) }}" rel="stylesheet" type="text/css"/>
<link href="{{ asset(\LibreNMS\Config::get('stylesheet')) }}" rel="stylesheet" type="text/css"/>
<link href="{{ asset('css/font-awesome.min.css') }}" rel="stylesheet" type="text/css"/>
<script src="{{ asset('js/jquery.min.js') }}"></script>
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/bootstrap-hover-dropdown.min.js') }}"></script>
<script src="{{ asset('js/hogan-2.0.0.js') }}"></script>
</head>
<body>
<body style="background-color: #1b6d85">
<div class="container">
@yield('content')
<div class="panel panel-default col-md-6 col-md-offset-3" style="box-shadow: 0 0 20px black;">
<div class="panel-body">
<div class="row" style="border-bottom: 1px solid #f6f6f6;">
<div class="col-xs-10 col-xs-offset-1">
<h2 class="text-center">
<img src="{{ asset(\LibreNMS\Config::get('title_image', "images/librenms_logo_" . \LibreNMS\Config::get('applied_site_style') . ".svg")) }}" alt="{{ \LibreNMS\Config::get('project_name', 'LibreNMS') }}">
@lang('install.install')
</h2>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h4 class="text-center">@lang('install.stage', ['stage' => $stage ?? 0, 'stages' => $stages ?? 6])</h4>
</div>
</div>
@if(!empty($msg))
<div class="row">
<div class="col-xs-12">
<div class="alert alert-danger">{{ $msg }}</div>
</div>
</div>
@endif
<div class="row">
<div class="col-xs-12">
<div id="install-progress" class="progress progress-striped">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ !empty($stage) ? (($stages ?? 6) / $stage) : 0 }}"
aria-valuemin="0" aria-valuemax="100" style="width: {{ !empty($stage) ? (($stages ?? 6) / $stage) : 0 }}%">
<span class="sr-only">{{ !empty($stage) ? (($stages ?? 6) / $stage) : 0 }}% Complete</span>
</div>
</div>
</div>
</div>
@yield('content')
</div>
</div>
</div>
</body>
</html>