mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix(#60): error when creation_timestamp not set
This commit is contained in:
parent
1e30ddb7b6
commit
2056e2a2c2
2 changed files with 7 additions and 2 deletions
|
|
@ -45,9 +45,14 @@ new class extends Component {
|
||||||
|
|
||||||
<tbody class="divide-y divide-zinc-800/10 dark:divide-white/20" data-flux-rows="">
|
<tbody class="divide-y divide-zinc-800/10 dark:divide-white/20" data-flux-rows="">
|
||||||
@foreach ($logs as $log)
|
@foreach ($logs as $log)
|
||||||
|
@if (!isset($log->log_entry['log_message']))
|
||||||
|
@continue
|
||||||
|
@endif
|
||||||
<tr data-flux-row="">
|
<tr data-flux-row="">
|
||||||
<td class="py-3 px-3 first:pl-0 last:pr-0 text-sm whitespace-nowrap text-zinc-500 dark:text-zinc-300">
|
<td class="py-3 px-3 first:pl-0 last:pr-0 text-sm whitespace-nowrap text-zinc-500 dark:text-zinc-300">
|
||||||
{{ \Carbon\Carbon::createFromTimestamp($log->log_entry['creation_timestamp'])->setTimezone(config('app.timezone'))->format('Y-m-d H:i:s') }}
|
@if (isset($log->log_entry['creation_timestamp']))
|
||||||
|
{{ \Carbon\Carbon::createFromTimestamp($log->log_entry['creation_timestamp'])->setTimezone(config('app.timezone'))->format('Y-m-d H:i:s') }}
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="py-3 px-3 first:pl-0 last:pr-0 text-sm whitespace-nowrap text-zinc-500 dark:text-zinc-300">
|
<td class="py-3 px-3 first:pl-0 last:pr-0 text-sm whitespace-nowrap text-zinc-500 dark:text-zinc-300">
|
||||||
<div class="inline-flex items-center font-medium whitespace-nowrap -mt-1 -mb-1 text-xs py-1 px-2 rounded-md
|
<div class="inline-flex items-center font-medium whitespace-nowrap -mt-1 -mb-1 text-xs py-1 px-2 rounded-md
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ test('device can submit logs', function () {
|
||||||
$logData = [
|
$logData = [
|
||||||
'log' => [
|
'log' => [
|
||||||
'logs_array' => [
|
'logs_array' => [
|
||||||
['message' => 'Test log message', 'level' => 'info'],
|
['log_message' => 'Test log message', 'level' => 'info'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue