Skip to content

Commit

Permalink
reverse data order
Browse files Browse the repository at this point in the history
  • Loading branch information
nckrtl committed Jan 3, 2024
1 parent 2a41a92 commit 4ab51a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/uptime.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function getGradient(ctx, chartArea) {
<div class="absolute flex justify-between w-full px-6 text-xs text-gray-400 bottom-8 dark:text-gray-500">
<span>Now</span>

<span>{{\Carbon\Carbon::createFromTimestamp($this->performanceRecords[count($this->performanceRecords) -2][0]/1000)->diffInMinutes(now(), true)}} min ago</span>
<span>{{\Carbon\Carbon::createFromTimestamp($this->performanceRecords[count($this->performanceRecords) -1][0]/1000)->diffInMinutes(now(), true)}} min ago</span>
</div>
</div>
</x-pulse::card>
2 changes: 1 addition & 1 deletion src/Livewire/OhDearUptimePulseCardComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function setPerformanceRecords()
$createdAt->getTimestampMs(),
ceil($record->totalTimeInSeconds * 1000),
];
})->toArray();
})->reverse()->values()->toArray();

$this->performanceRecords = $performanceRecords;
}
Expand Down

0 comments on commit 4ab51a3

Please sign in to comment.