terrarium-web/src/Controller/MonitoringController.php
2020-03-10 12:02:21 +01:00

32 lines
717 B
PHP

<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Filesystem\Filesystem;
use App\Motion\SnapshotRepository;
class MonitoringController extends AbstractController
{
/**
* @Route("/", name="charts")
*/
public function charts()
{
return $this->render('charts.html.twig');
}
/**
* @Route("/camera", name="camera")
*/
public function camera(SnapshotRepository $snapshotRepository)
{
$snapshots = $snapshotRepository->find();
return $this->render('camera.html.twig', [
'snapshots' => $snapshots,
]);
}
}