2020-03-10 09:36:21 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Controller;
|
|
|
|
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
|
|
use Symfony\Component\Routing\Annotation\Route;
|
2020-03-10 12:02:21 +01:00
|
|
|
use Symfony\Component\Filesystem\Filesystem;
|
|
|
|
use App\Motion\SnapshotRepository;
|
2020-03-10 09:36:21 +01:00
|
|
|
|
|
|
|
class MonitoringController extends AbstractController
|
|
|
|
{
|
|
|
|
/**
|
2020-03-10 10:42:04 +01:00
|
|
|
* @Route("/", name="charts")
|
2020-03-10 09:36:21 +01:00
|
|
|
*/
|
2020-03-10 10:42:04 +01:00
|
|
|
public function charts()
|
2020-03-10 09:36:21 +01:00
|
|
|
{
|
2020-03-10 10:42:04 +01:00
|
|
|
return $this->render('charts.html.twig');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Route("/camera", name="camera")
|
|
|
|
*/
|
2020-03-10 12:02:21 +01:00
|
|
|
public function camera(SnapshotRepository $snapshotRepository)
|
2020-03-10 10:42:04 +01:00
|
|
|
{
|
2020-03-10 12:02:21 +01:00
|
|
|
$snapshots = $snapshotRepository->find();
|
|
|
|
|
|
|
|
return $this->render('camera.html.twig', [
|
|
|
|
'snapshots' => $snapshots,
|
|
|
|
]);
|
2020-03-10 09:36:21 +01:00
|
|
|
}
|
|
|
|
}
|