mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-03-14 12:29:44 +01:00
Cache the amount of incidents we have
This commit is contained in:
parent
2a3cf0a52b
commit
d67b36ad42
@ -7,7 +7,9 @@
|
||||
->groupBy('status')
|
||||
->orderBy('status', 'desc');
|
||||
|
||||
if ($incidents->get()->count() <= 1 || ($incidents->get()->count() > 1 && (int) $incidents->first()->status === 4)) {
|
||||
$incidentCount = $incidents->count();
|
||||
|
||||
if ($incidentCount <= 1 || ($incidentCount > 1 && (int) $incidents->first()->status === 4)) {
|
||||
$status = 'success';
|
||||
$message = 'All systems are functional.';
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user