mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 08:04:19 +02:00
UI fix
This commit is contained in:
parent
ea4b085dbe
commit
e3b9884247
@ -7,8 +7,8 @@
|
||||
class Executions extends Component
|
||||
{
|
||||
public $executions = [];
|
||||
|
||||
public $selectedKey;
|
||||
public $task;
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
@ -26,4 +26,12 @@ public function selectTask($key): void
|
||||
}
|
||||
$this->selectedKey = $key;
|
||||
}
|
||||
}
|
||||
|
||||
public function getServerTimezone()
|
||||
{
|
||||
$server = data_get($this, 'destination.server');
|
||||
$serverTimezone = $server->settings->server_timezone;
|
||||
ray('Server Timezone:', $serverTimezone);
|
||||
return $serverTimezone;
|
||||
}
|
||||
}
|
@ -24,9 +24,25 @@
|
||||
</div>
|
||||
@endif
|
||||
<div>Status: {{ data_get($execution, 'status') }}</div>
|
||||
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
||||
<div>Started At:
|
||||
@php
|
||||
$createdAt = data_get($execution, 'created_at', now());
|
||||
$serverTimezone = $this->getServerTimezone();
|
||||
ray('Created At:', $createdAt, 'Server Timezone:', $serverTimezone);
|
||||
|
||||
$date = new DateTime($createdAt);
|
||||
if ($serverTimezone) {
|
||||
try {
|
||||
$date->setTimezone(new DateTimeZone($serverTimezone));
|
||||
} catch (\Exception $e) {
|
||||
ray('Invalid timezone:', $serverTimezone);
|
||||
}
|
||||
}
|
||||
echo $date->format('Y-m-d H:i:s T');
|
||||
@endphp
|
||||
</div>
|
||||
</a>
|
||||
@empty
|
||||
<div>No executions found.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
@ -42,6 +42,6 @@
|
||||
|
||||
<div class="pt-4">
|
||||
<h3 class="py-4">Recent executions <span class="text-xs text-neutral-500">(click to check output)</span></h3>
|
||||
<livewire:project.shared.scheduled-task.executions key="{{ $task->id }}" selectedKey="" :executions="$task->executions->take(-20)" />
|
||||
<livewire:project.shared.scheduled-task.executions :task="$task" key="{{ $task->id }}" selectedKey="" :executions="$task->executions->take(-20)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user