Update monitor.blade.php

This commit is contained in:
2020-09-17 15:43:02 +05:00
parent f727c0cec0
commit 71284d8b01

View File

@@ -28,6 +28,9 @@
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5font-semibold text-gray-900">
Last Ping
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5font-semibold text-gray-900">
Status
</td>
</tr>
@foreach ($tasks as $task)
<tr class="bg-gray-50">
@@ -38,23 +41,25 @@
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{$task->cron}}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500 flex items-center">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{$task->last_ping_at->diffforHumans()}}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
@if($task->last_ping_at->between(Carbon\Carbon::now()->subMinutes(5), \Carbon\Carbon::now()))
<div class="ml-5 flex items-center">
<div class="flex items-center">
<span>Healthy</span>
<svg class="w-6 h-6 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
</div>
@else
<div class="ml-5 flex items-center">
<div class="flex items-center">
<span>Danger</span>
<svg class="w-6 h-6 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
</div>
@endif
</td>
</tr>
@endforeach