<?php
$title='Workflow Automation Scheduler';
?>

<div class="container-fluid py-4">

<div class="card border-0 shadow-lg rounded-4">

<div class="card-body">

<h2 class="fw-bold">

<i class="fa fa-robot text-primary"></i>

Workflow Automation Scheduler

</h2>

<hr>

<div class="d-flex flex-wrap gap-2 mb-4">

<a class="btn btn-primary"
href="/easychair/admin/conference-home/run-all-automation">

Run All Jobs

</a>

<a class="btn btn-warning"
href="/easychair/admin/conference-home/run-escalation">

Run Escalation

</a>

</div>

</div>

</div>

<div class="card border-0 shadow-sm rounded-4 mt-4">

<div class="card-body">

<h4>

Recent Automation Runs

</h4>

<table class="table table-hover">

<thead>

<tr>
<th>ID</th>
<th>Job</th>
<th>Started</th>
<th>Completed</th>
<th>Status</th>
</tr>

</thead>

<tbody>

<?php foreach($runs as $run): ?>

<tr>

<td><?= (int)$run['id'] ?></td>

<td><?= htmlspecialchars($run['job_name']) ?></td>

<td><?= htmlspecialchars($run['started_at']) ?></td>

<td><?= htmlspecialchars($run['completed_at']) ?></td>

<td><?= htmlspecialchars($run['status']) ?></td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
