ldc-web/resources/views/status-checker/index.blade.php
2022-09-21 11:17:58 +00:00

101 lines
4.8 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<table class="table text-center">
<thead class="thead-dark">
<tr>
<th scope="col">{{ __('Status') }}</th>
<th scope="col">{{ __('HTTPS') }}</th>
<th scope="col">{{ __('Site') }}</th>
<th scope="col">{{ __('PHP') }}</th>
<th scope="col">{{ __('Type') }}</th>
<th scope="col">{{ __('Code') }}</th>
<th scope="col">{{ __('Sitemap') }}</th>
<th scope="col">{{ __('Robots.txt') }}</th>
<th scope="col">{{ __('Log d\'erreurs') }}</th>
</tr>
</thead>
<tbody>
@foreach($projects as $project)
<tr>
<td>
@if ($project->checked === 'missing')
<i class="fa fa-ghost"></i>
@elseif($project->checked === 'true')
<div class="status checked">checked</div>
@else
<div class="status unchecked">unchecked</div>
@endif
</td>
<td>
@if($project->https === 0)
<i class="fa fa-unlock red"></i>
@else
<i class="fa fa-lock green"></i>
@endif
</td>
<th scope="row" class="text-start"><a href="{{ route('projects.edit', $project) }}">{{$project->display_name}}</a></th>
<td><b>{{$project->php->label}}</b></td>
<td>{{ $project->type->label }}</td>
<td>
@if ($project->code === 'missing')
<i class="fa fa-ghost"></i>
@else
@php
$code = optional(json_decode(json_encode($project->code)));
@endphp
@if ($project->type->equals(App\Enums\ProjectType::wp()))
@if ($code->version === $wp_latest)
{{$code->version}}
@else
<b class="red">{{$code->version}} ({{$wp_latest}})</b>
@endif
@elseif ($project->type->equals(App\Enums\ProjectType::laravel()))
@if ($code->version === $laravel_latest)
{{$code->version}}
@else
<b class="red">{{$code->version}} ({{$laravel_latest}})</b>
@endif
@else
{{$code->version}}
@endif
@endif
</td>
<td>
@if ($project->sitemap_checked === 'missing')
<i class="fa fa-ghost"></i>
@elseif($project->sitemap_checked === true)
<i class="fa fa-check-circle green"></i>
@else
<i class="fa fa-times-circle red"></i>
@endif
</td>
<td>
@if ($project->robots_checked === 'missing')
<i class="fa fa-ghost"></i>
@elseif($project->robots_checked === true)
<i class="fa fa-check-circle green"></i>
@else
<i class="fa fa-times-circle red"></i>
@endif
</td>
<td>
@if ($project->logs_checked === 'missing')
<i class="fa fa-ghost"></i>
@elseif($project->logs_checked === 0)
<i class="fa fa-bug green"></i>
@else
<i class="fa fa-bug red"></i> {{ $project->logs_HR }}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection