Skip to content

Commit

Permalink
Scheduler status added
Browse files Browse the repository at this point in the history
  • Loading branch information
ttimot24 committed Sep 30, 2024
1 parent 28c2db1 commit 76665f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Controllers/ScheduleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function index()
return view('settings.schedules', [
'commands' => rescue(fn() => \Artisan::all(), fn() => []),
'scheduled_tasks' => \App\Model\ScheduledTask::all(),
'scheduler' => \Settings::where('setting','scheduler')->first()
]);
}

Expand Down
6 changes: 6 additions & 0 deletions app/View/settings/schedules.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
'data' => 'data-bs-toggle=modal data-bs-target=.new_task',
],
],
'buttons_right' => [
[
'label' => "Scheduler: ".$scheduler->value,
'class' => 'badge '.(\Carbon\Carbon::now()->diffInMinutes($scheduler->updated_at) > 5)? 'text-bg-danger' : 'text-bg-success',
],
],
])

<div class="card-body">
Expand Down

0 comments on commit 76665f7

Please sign in to comment.