Skip to content

Commit b01913a

Browse files
committed
+count to info
1 parent 7f151ee commit b01913a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: public/frontend/About.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default {
1919
OS: {{ info.os }}<br>
2020
PHP: {{ info.php.ver }}<br>
2121
Symfony: {{ info.sf.ver }} ({{ info.sf.env }})<br>
22-
Database: {{ info.db.ver }} ({{ info.db.size }} Mb)
22+
Database: {{ info.db.ver }} ({{ info.db.size }} Mb)<br>
23+
SystemEvents count: {{ info.count }}
2324
</p>
2425
2526
<h3>Search</h3>
@@ -78,6 +79,7 @@ export default {
7879
php: { ver: '...' },
7980
sf: { ver: '...', env: '...' },
8081
db: { ver: '...', size: '...' },
82+
count: '...',
8183
}
8284
}
8385
},

Diff for: src/Controller/InfoController.php

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace App\Controller;
66

77
use App\Kernel;
8+
use App\Repository\SystemEventsRepository;
89
use App\Service\Helper\DbHelper;
910
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
1011
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
@@ -17,6 +18,7 @@ class InfoController extends AbstractController
1718
public function __construct(
1819
private readonly DbHelper $dbHelper,
1920
private readonly ParameterBagInterface $parameterBag,
21+
private readonly SystemEventsRepository $systemEventsRepository,
2022
) {
2123
}
2224

@@ -36,6 +38,7 @@ public function info(): JsonResponse
3638
'ver' => $this->dbHelper->getVersion(),
3739
'size' => $this->dbHelper->getSize(),
3840
],
41+
'count' => $this->systemEventsRepository->count(),
3942
]);
4043
}
4144
}

0 commit comments

Comments
 (0)