PHP Classes
elePHPant
Icontem

File: resources/views/jobs/index.blade.php

Recommend this page to a friend!
  Classes of Insolita  >  Laravel Interactive Jobs  >  resources/views/jobs/index.blade.php  >  Download  
File: resources/views/jobs/index.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel Interactive Jobs
Run background jobs and monitor progress on a page
Author: By
Last change:
Date: 2 months ago
Size: 1,940 bytes
 

 

Contents

Class file image Download
@php
/**
* @var \App\Lib\InteractiveJobs\Models\Job[]|\Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator $jobs
**/
@endphp
@extends('jobs.master')
@section('jobs_content')
    <div class="card">
        <div class="card-header">Jobs</div>
        <div class="card-body">
            <table class="table table-sm table-hover">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>Name</th>
                    <th>Created</th>
                    <th>Finished</th>
                     <th>Owner</th>
                     <th>Queue</th>
                     <th></th>
                </tr>
                </thead>
                @foreach($jobs as $job)
                    <tr>
                        <td>{{$job->id}}</td>
                        <td>{!!$job->jobState()->label()!!} {{$job->command}} </td>
                        <td>{{$job->created_at}}</td>
                        <td>
                            @if($job->finished_at)
                                {{$job->finished_at}}
                            @else
                                @if($job->progress)
                                    {{$job->progress}}%
                                @else
                                    -
                                @endif
                            @endif
                        </td>
                        <td>{{$job->owner->name}}</td>
                        <td>{{$job->queue}}</td>
                        <td>
                            <a href="{{route('jobs.show', ['job'=>$job])}}" class="btn btn-primary">
                                <i class="fa fa-eye"></i>
                            </a>
                        </td>
                    </tr>
                @endforeach
            </table>
        </div>
        <div class="card-footer">
            {{$jobs->links()}}
        </div>
    </div>
@endsection