78 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <x-app-layout>
 | |
|     <x-slot name="header">
 | |
|         <h2 class="font-semibold text-xl text-gray-800 leading-tight">
 | |
|             {{ __('Monitor') }}
 | |
|         </h2>
 | |
|     </x-slot>
 | |
| 
 | |
|     <div class="container mx-auto">
 | |
|         <div class="mt-6 sm:mt-0">
 | |
|             <h2 class="text-2xl font-bold leading-tight text-gray-900 mt-3">
 | |
|                Cron Monitoring
 | |
|             </h2>
 | |
|     
 | |
|             <div class="flex flex-col mt-6">
 | |
|                 <div class="-my-2 py-2 overflow-x-auto sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8">
 | |
|                     <div
 | |
|                         class="align-middle inline-block min-w-full shadow overflow-hidden rounded-lg border-b border-gray-200">
 | |
|                         <table class="min-w-full">
 | |
|                             <tbody>
 | |
|                                 <tr class="bg-white">
 | |
|                                     <td
 | |
|                                         class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-900">
 | |
|                                         Name
 | |
|                                     </td>
 | |
|                                     <td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-900">
 | |
|                                         Cron
 | |
|                                     </td>
 | |
|                                     <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">
 | |
|                                     <td
 | |
|                                         class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-medium text-gray-900">
 | |
|                                         {{$task->name}}
 | |
|                                     </td>
 | |
|                                     <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">
 | |
|                                         {{$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="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="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
 | |
|                                
 | |
|                                
 | |
|                             </tbody>
 | |
|                         </table>
 | |
|                     </div>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| 
 | |
|     
 | |
| 
 | |
| </x-app-layout>    
 |