mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more style tweaks, will probably dump the table
This commit is contained in:
@@ -31,23 +31,19 @@ class ChecksController extends \App\Http\Controllers\Controller
|
||||
{
|
||||
$checks = [
|
||||
['item' => 'test', 'status' => false, 'comment' => 'comment'],
|
||||
$this->checkExtension('pdo_mysql'),
|
||||
$this->checkExtension('mysqlnd'),
|
||||
$this->checkExtension('gd'),
|
||||
$this->checkPhpModule('pdo_mysql'),
|
||||
$this->checkPhpModule('mysqlnd'),
|
||||
$this->checkPhpModule('gd'),
|
||||
];
|
||||
|
||||
return view('install.checks', ['stage' => 1, 'checks' => $checks]);
|
||||
}
|
||||
|
||||
private function checkExtension($extension)
|
||||
private function checkPhpModule($module)
|
||||
{
|
||||
if (extension_loaded("$extension")) {
|
||||
return ['item' => $extension, 'status' => true];
|
||||
}
|
||||
|
||||
return [
|
||||
'item' => $extension,
|
||||
'status' => false
|
||||
'item' => trans('install.checks.php_module', ['module' => $module]),
|
||||
'status' => extension_loaded("$module"),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ return [
|
||||
'stage' => 'Stage :stage of :stages complete',
|
||||
'checks' => [
|
||||
'title' => 'Pre-Install Checks',
|
||||
'php_module' => 'PHP Module: :module',
|
||||
'item' => 'Item',
|
||||
'status' => 'Status',
|
||||
'comment' => 'Comment',
|
||||
|
@@ -11,12 +11,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>
|
||||
<th class="col-xs-1">@lang('install.checks.status')</th>
|
||||
<th class="col-xs-8">@lang('install.checks.comment')</th>
|
||||
</tr>
|
||||
@foreach($checks as $check)
|
||||
<tr class="{{ $check['status'] ? 'success' : 'danger' }}">
|
||||
<td>{{ $check['item'] }}</td>
|
||||
<td style="white-space: nowrap">{{ $check['item'] }}</td>
|
||||
<td>@if($check['status'])
|
||||
<i class="fa fa-check-circle alert-success"></i>
|
||||
@else
|
||||
|
Reference in New Issue
Block a user