var/cache/dev/twig/cd/cddcb91cbac70f5ba6f6e09a195a117c.php line 44

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* debug/live.html.twig */
  16. class __TwigTemplate_3b6b5437c6319de1bea259c29656c496 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'body' => [$this, 'block_body'],
  29. 'javascripts' => [$this, 'block_javascripts'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "base.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/live.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/live.html.twig"));
  44. $this->parent = $this->load("base.html.twig", 1);
  45. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48. }
  49. // line 3
  50. /**
  51. * @return iterable<null|scalar|\Stringable>
  52. */
  53. public function block_body(array $context, array $blocks = []): iterable
  54. {
  55. $macros = $this->macros;
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  60. // line 4
  61. yield " <div class=\"page\">
  62. <div class=\"container header-page\">
  63. <div class=\"row animated fadeIn delay-0-2s mb-3 mb-lg-5 align-items-center header-button\">
  64. <div class=\"col-6\">
  65. <div class=\"\">
  66. \t<h2><svg class=\"icon-network\" style=\"width: 27px; position: relative; top: -5px;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"35\" height=\"27\" fill=\"currentColor\" class=\"bi bi-wifi\" viewBox=\"0 0 16 16\">
  67. \t\t\t\t\t\t <path d=\"M15.384 6.115a.485.485 0 0 0-.047-.736A12.444 12.444 0 0 0 8 3C5.259 3 2.723 3.882.663 5.379a.485.485 0 0 0-.048.736.518.518 0 0 0 .668.05A11.448 11.448 0 0 1 8 4c2.507 0 4.827.802 6.716 2.164.205.148.49.13.668-.049z\"/>
  68. \t\t\t\t\t\t <path d=\"M13.229 8.271a.482.482 0 0 0-.063-.745A9.455 9.455 0 0 0 8 6c-1.905 0-3.68.56-5.166 1.526a.48.48 0 0 0-.063.745.525.525 0 0 0 .652.065A8.46 8.46 0 0 1 8 7a8.46 8.46 0 0 1 4.576 1.336c.206.132.48.108.653-.065zm-2.183 2.183c.226-.226.185-.605-.1-.75A6.473 6.473 0 0 0 8 9c-1.06 0-2.062.254-2.946.704-.285.145-.326.524-.1.75l.015.015c.16.16.407.19.611.09A5.478 5.478 0 0 1 8 10c.868 0 1.69.201 2.42.56.203.1.45.07.61-.091l.016-.015zM9.06 12.44c.196-.196.198-.52-.04-.66A1.99 1.99 0 0 0 8 11.5a1.99 1.99 0 0 0-1.02.28c-.238.14-.236.464-.04.66l.706.706a.5.5 0 0 0 .707 0l.707-.707z\"/>
  69. \t\t\t\t\t\t</svg> Live</h2>
  70. </div>
  71. </div>
  72. <div class=\"col-6 text-right\">
  73. \t<div class=\"link-right\">
  74. \t\t<button class=\"btn btn-secondary link-i-see d-none\">Recept</button>
  75. \t</div>
  76. \t</div>
  77. \t<div class=\"col-12\">
  78. \t\t<hr></hr>
  79. \t</div>
  80. </div>
  81. </div>
  82. <div class=\"container\">
  83. \t<div class=\"row\">
  84. \t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
  85. \t\t\t<div class=\"card text-center\" id=\"current-position\">
  86. \t\t\t\t\t \t<div class=\"card-header\">
  87. \t\t\t\t\t \tCurrent position
  88. \t\t\t\t\t \t</div>
  89. \t\t\t\t\t \t";
  90. // line 34
  91. if ((($tmp = (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 34, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  92. // line 35
  93. yield "\t\t\t\t\t\t \t<div class=\"card-body\">
  94. \t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">";
  95. // line 36
  96. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 36, $this->source); })()), "datePrinted", [], "any", false, false, false, 36), "d-m-Y H:i:s"), "html", null, true);
  97. yield "</span></h5>
  98. \t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
  99. \t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">";
  100. // line 38
  101. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 38, $this->source); })()), "latitude", [], "any", false, false, false, 38), "html", null, true);
  102. yield "</div></li>
  103. \t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">";
  104. // line 39
  105. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentPosition"]) || array_key_exists("currentPosition", $context) ? $context["currentPosition"] : (function () { throw new RuntimeError('Variable "currentPosition" does not exist.', 39, $this->source); })()), "longitude", [], "any", false, false, false, 39), "html", null, true);
  106. yield "</div></li>
  107. \t\t\t\t\t\t\t\t <li class=\"list-group-item\"><a href=\"/debug/information/position\" class=\"btn btn-primary mt-3\">Get last positions</a></li>
  108. \t\t\t\t\t\t\t \t</ul>
  109. \t\t\t\t\t\t\t \t
  110. \t\t\t\t\t\t \t</div>
  111. \t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
  112. \t\t\t\t\t\t \t<span class=\"value\">";
  113. // line 45
  114. yield (isset($context["currentAgo"]) || array_key_exists("currentAgo", $context) ? $context["currentAgo"] : (function () { throw new RuntimeError('Variable "currentAgo" does not exist.', 45, $this->source); })());
  115. yield "</span> ago
  116. \t\t\t\t\t\t \t</div>
  117. \t\t\t\t\t \t";
  118. } else {
  119. // line 48
  120. yield "\t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
  121. \t\t\t\t\t \t";
  122. }
  123. // line 50
  124. yield "\t\t\t\t\t</div>
  125. \t\t</div>
  126. \t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
  127. \t\t\t<div class=\"card text-center\" id=\"current-hobit\">
  128. \t\t\t\t\t \t<div class=\"card-header\">
  129. \t\t\t\t\t \tLast hobit
  130. \t\t\t\t\t \t</div>
  131. \t\t\t\t\t \t";
  132. // line 59
  133. if ((($tmp = (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 59, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  134. // line 60
  135. yield "\t\t\t\t\t\t \t<div class=\"card-body\">
  136. \t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">";
  137. // line 61
  138. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 61, $this->source); })()), "startDateTime", [], "any", false, false, false, 61), "d-m-Y H:i:s"), "html", null, true);
  139. yield "</span></h5>
  140. \t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
  141. \t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">";
  142. // line 63
  143. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 63, $this->source); })()), "data", [], "any", false, false, false, 63), "latitude", [], "any", false, false, false, 63), "html", null, true);
  144. yield "</div></li>
  145. \t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">";
  146. // line 64
  147. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 64, $this->source); })()), "data", [], "any", false, false, false, 64), "longitude", [], "any", false, false, false, 64), "html", null, true);
  148. yield "</div></li>
  149. \t\t\t\t\t\t\t\t <li class=\"list-group-item end\">End (or now) : <div class=\"value\">";
  150. // line 65
  151. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 65, $this->source); })()), "endDateTime", [], "any", false, false, false, 65), "d-m-Y H:i:s"), "html", null, true);
  152. yield "</div></li>
  153. \t\t\t\t\t\t\t \t</ul>
  154. \t\t\t\t\t\t\t \t
  155. \t\t\t\t\t\t \t</div>
  156. \t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
  157. \t\t\t\t\t\t \t<span class=\"value\">";
  158. // line 70
  159. yield (isset($context["currentHobitAgo"]) || array_key_exists("currentHobitAgo", $context) ? $context["currentHobitAgo"] : (function () { throw new RuntimeError('Variable "currentHobitAgo" does not exist.', 70, $this->source); })());
  160. yield "</span> ago
  161. \t\t\t\t\t\t \t</div>
  162. \t\t\t\t\t \t";
  163. } else {
  164. // line 73
  165. yield "\t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
  166. \t\t\t\t\t \t";
  167. }
  168. // line 75
  169. yield "\t\t\t\t\t</div>
  170. \t\t</div>
  171. \t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 \">
  172. \t\t";
  173. // line 79
  174. if (((isset($context["newHobitAgo"]) || array_key_exists("newHobitAgo", $context) ? $context["newHobitAgo"] : (function () { throw new RuntimeError('Variable "newHobitAgo" does not exist.', 79, $this->source); })()) == false)) {
  175. // line 80
  176. yield " \t\t\t<div class=\"card text-center d-none animated fadeIn delay-0-2s\" id=\"new-hobit\">
  177. \t\t\t";
  178. } else {
  179. // line 82
  180. yield " \t\t\t\t<div class=\"card text-center animated fadeIn delay-0-2s\" id=\"new-hobit\">
  181. \t\t\t\t";
  182. }
  183. // line 84
  184. yield "\t\t\t\t\t \t<div class=\"card-header\">
  185. \t\t\t\t\t \tScan hobit
  186. \t\t\t\t\t \t</div>
  187. \t\t\t\t\t \t<div class=\"card-body\">
  188. \t\t\t\t\t \t<h5 class=\"card-title\">
  189. \t\t\t\t \t\t<span class=\"value\">
  190. \t\t\t\t \t\t\t";
  191. // line 90
  192. if ((($tmp = (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 90, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  193. // line 91
  194. yield "\t\t\t\t\t \t\t\tSince ";
  195. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["lastHobit"]) || array_key_exists("lastHobit", $context) ? $context["lastHobit"] : (function () { throw new RuntimeError('Variable "lastHobit" does not exist.', 91, $this->source); })()), "endDateTime", [], "any", false, false, false, 91), "d-m-Y H:i:s"), "html", null, true);
  196. yield "
  197. \t\t\t\t \t\t\t";
  198. }
  199. // line 93
  200. yield "\t\t\t\t \t\t</span></h5>
  201. \t\t\t\t\t \t<div class=\"loader mt-lg-4\">
  202. \t\t\t\t\t \t\t<div class=\"spinner-grow text-primary\" role=\"status\">
  203. \t\t\t\t\t\t\t\t <span class=\"visually-hidden\">Loading...</span>
  204. \t\t\t\t\t\t\t\t</div>
  205. \t\t\t\t\t \t</div>
  206. \t\t\t\t\t \t</div>
  207. \t\t\t\t\t \t<div class=\"card-footer text-muted\">
  208. \t\t\t\t\t \t<span class=\"value\">";
  209. // line 101
  210. yield (isset($context["newHobitAgo"]) || array_key_exists("newHobitAgo", $context) ? $context["newHobitAgo"] : (function () { throw new RuntimeError('Variable "newHobitAgo" does not exist.', 101, $this->source); })());
  211. yield "</span> ago
  212. \t\t\t\t\t \t</div>
  213. \t\t\t\t\t</div>
  214. \t\t</div>
  215. \t\t</div>
  216. <div class=\"row mt-5\">
  217. \t<div class=\"col-12\">
  218. \t\t<h3 class=\"mb-3 animated fadeIn delay-0-2s\">Last positions</h3>
  219. \t\t</div>
  220. </div>
  221. <div class=\"row\">
  222. \t";
  223. // line 114
  224. if ((($tmp = (isset($context["positionGpsList"]) || array_key_exists("positionGpsList", $context) ? $context["positionGpsList"] : (function () { throw new RuntimeError('Variable "positionGpsList" does not exist.', 114, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  225. // line 115
  226. yield "\t \t\t";
  227. $context["i"] = 1;
  228. // line 116
  229. yield "\t ";
  230. $context["number"] = 1;
  231. // line 117
  232. yield "\t \t\t";
  233. $context['_parent'] = $context;
  234. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["positionGpsList"]) || array_key_exists("positionGpsList", $context) ? $context["positionGpsList"] : (function () { throw new RuntimeError('Variable "positionGpsList" does not exist.', 117, $this->source); })()));
  235. foreach ($context['_seq'] as $context["_key"] => $context["positionGps"]) {
  236. // line 118
  237. yield "\t <div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-5\">
  238. \t <div class=\"card animated fadeIn delay-0-";
  239. // line 119
  240. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 119, $this->source); })()), "html", null, true);
  241. yield "s\" style=\"width: 100%;\">
  242. \t <div class=\"card-body\">
  243. \t <h5 class=\"card-title\"><b>Position <span class=\"value\">";
  244. // line 121
  245. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 121, $this->source); })()), "html", null, true);
  246. yield "</span></b></h5>
  247. \t <div class=\"card-text line mb-1\"><b>Date application : </b>";
  248. // line 122
  249. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "datePrinted", [], "any", false, false, false, 122), "d-m-Y H:i:s"), "html", null, true);
  250. yield "</div>
  251. \t <div class=\"card-text line mb-1\"><b>Date server : </b>";
  252. // line 123
  253. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "dateCreatedByServer", [], "any", false, false, false, 123), "d-m-Y H:i:s"), "html", null, true);
  254. yield "</div>
  255. \t <div class=\"card-text line mb-1\"><b>Latitude : </b>";
  256. // line 124
  257. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "latitude", [], "any", false, false, false, 124), "html", null, true);
  258. yield "</div>
  259. \t <div class=\"card-text line mb-1\"><b>Longitude : </b>";
  260. // line 125
  261. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "longitude", [], "any", false, false, false, 125), "html", null, true);
  262. yield "</div>
  263. \t <a href=\"/debug/information/positions/";
  264. // line 126
  265. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["positionGps"], "datePrinted", [], "any", false, false, false, 126), "Y-m-d"), "html", null, true);
  266. yield "\" class=\"btn btn-primary mt-3\">All positions</a>
  267. \t </div>
  268. \t </div>
  269. \t </div>
  270. \t ";
  271. // line 130
  272. $context["i"] = ((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 130, $this->source); })()) + 1);
  273. // line 131
  274. yield "\t ";
  275. $context["number"] = ((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 131, $this->source); })()) + 1);
  276. // line 132
  277. yield " ";
  278. }
  279. $_parent = $context['_parent'];
  280. unset($context['_seq'], $context['_key'], $context['positionGps'], $context['_parent']);
  281. $context = array_intersect_key($context, $_parent) + $_parent;
  282. yield "
  283. ";
  284. } else {
  285. // line 134
  286. yield "\t <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  287. ";
  288. }
  289. // line 136
  290. yield "
  291. </div>
  292. </div>
  293. </div>
  294. ";
  295. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  296. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  297. yield from [];
  298. }
  299. // line 142
  300. /**
  301. * @return iterable<null|scalar|\Stringable>
  302. */
  303. public function block_javascripts(array $context, array $blocks = []): iterable
  304. {
  305. $macros = $this->macros;
  306. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  307. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  308. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  309. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  310. // line 143
  311. yield " ";
  312. yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  313. yield "
  314. <script>
  315. \twindow.onload=function() {
  316. \t\t var boucle = 1;
  317. \t \tsetInterval(function(){
  318. \t\t\t\t\$.get(
  319. \t\t\t\t '";
  320. // line 151
  321. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("information_live_refresh_debug");
  322. yield "',
  323. \t\t\t \t{
  324. \t\t\t \t},
  325. \t\t\t\t function(data){
  326. \t\t\t\t \tif(data['data']['dataHere']){
  327. \t\t\t\t\t \tif(data['data']['currentPostition']['start'] != \$(\"body #current-position .card-title .value\").html()){
  328. \t\t\t\t\t \t\t\$(\".icon-network\").removeClass(\"active\");
  329. \t\t\t\t\t \t\t\$(\".icon-network\").addClass(\"active\");
  330. \t\t\t\t\t \t\t\$(\".link-i-see\").removeClass(\"d-none\");
  331. \t\t\t\t\t \t\tconst soundEffect = new Audio();
  332. \t\t\t\t\t\t\t\t// onClick of first interaction on page before I need the sounds
  333. \t\t\t\t\t\t\t\tsoundEffect.play();
  334. \t\t\t\t\t\t\t\t// later on when you actually want to play a sound at any point without user interaction
  335. \t\t\t\t\t\t\t\tsoundEffect.src = '/alert.mp3';
  336. \t\t\t\t\t\t\t\tsoundEffect.play();
  337. \t\t\t\t\t \t}
  338. \t\t\t\t\t \t//Current position
  339. \t\t\t\t\t \$(\"body #current-position .card-title .value\").html(data['data']['currentPostition']['start']);
  340. \t\t\t\t\t \$(\"body #current-position .latitude .value\").html(data['data']['currentPostition']['latitude']);
  341. \t\t\t\t\t \$(\"body #current-position .longitude .value\").html(data['data']['currentPostition']['longitude']);
  342. \t\t\t\t\t \$(\"body #current-position .card-footer .value\").html(data['data']['currentAgo']);
  343. \t\t\t\t\t //Current hobit
  344. \t\t\t\t\t \$(\"body #current-hobit .card-title .value\").html(data['data']['lastHobit']['start']);
  345. \t\t\t\t\t \$(\"body #current-hobit .latitude .value\").html(data['data']['lastHobit']['latitude']);
  346. \t\t\t\t\t \$(\"body #current-hobit .longitude .value\").html(data['data']['lastHobit']['longitude']);
  347. \t\t\t\t\t \$(\"body #current-hobit .end .value\").html(data['data']['lastHobit']['end']);
  348. \t\t\t\t\t \$(\"body #current-hobit .card-footer .value\").html(data['data']['currentHobitAgo']);
  349. \t\t\t\t\t //Current hobit
  350. \t\t\t\t\t if(data['data']['newHobitAgo'] != false){
  351. \t\t\t\t\t \t\$(\"body #new-hobit .card-title .value\").html(data['data']['currentPostition']['start']);
  352. \t\t\t\t\t \t\$(\"body #new-hobit .card-footer .value\").html(data['data']['newHobitAgo']);
  353. \t\t\t\t\t \t\$(\"body #new-hobit\").removeClass(\"d-none\");
  354. \t\t\t\t\t \t}
  355. \t\t\t\t\t \telse{
  356. \t\t\t\t\t \t\t\$(\"body #new-hobit\").addClass(\"d-none\");
  357. \t\t\t\t\t \t}
  358. \t\t\t\t \t}
  359. \t\t\t\t }
  360. \t\t\t\t);
  361. \t\t\t}, 1000);
  362. \t\t\t};
  363. \t\t\$(\"body\").on(\"click\", \".link-i-see\", function(){
  364. \t\t\t\$(this).addClass(\"d-none\");
  365. \t\t\t\$(\".icon-network\").removeClass(\"active\");
  366. \t\t});
  367. </script>
  368. ";
  369. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  370. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  371. yield from [];
  372. }
  373. /**
  374. * @codeCoverageIgnore
  375. */
  376. public function getTemplateName(): string
  377. {
  378. return "debug/live.html.twig";
  379. }
  380. /**
  381. * @codeCoverageIgnore
  382. */
  383. public function isTraitable(): bool
  384. {
  385. return false;
  386. }
  387. /**
  388. * @codeCoverageIgnore
  389. */
  390. public function getDebugInfo(): array
  391. {
  392. return array ( 353 => 151, 341 => 143, 328 => 142, 313 => 136, 309 => 134, 300 => 132, 297 => 131, 295 => 130, 288 => 126, 284 => 125, 280 => 124, 276 => 123, 272 => 122, 268 => 121, 263 => 119, 260 => 118, 255 => 117, 252 => 116, 249 => 115, 247 => 114, 231 => 101, 221 => 93, 215 => 91, 213 => 90, 205 => 84, 201 => 82, 197 => 80, 195 => 79, 189 => 75, 185 => 73, 179 => 70, 171 => 65, 167 => 64, 163 => 63, 158 => 61, 155 => 60, 153 => 59, 142 => 50, 138 => 48, 132 => 45, 123 => 39, 119 => 38, 114 => 36, 111 => 35, 109 => 34, 77 => 4, 64 => 3, 41 => 1,);
  393. }
  394. public function getSourceContext(): Source
  395. {
  396. return new Source("{% extends 'base.html.twig' %}
  397. {% block body %}
  398. <div class=\"page\">
  399. <div class=\"container header-page\">
  400. <div class=\"row animated fadeIn delay-0-2s mb-3 mb-lg-5 align-items-center header-button\">
  401. <div class=\"col-6\">
  402. <div class=\"\">
  403. \t<h2><svg class=\"icon-network\" style=\"width: 27px; position: relative; top: -5px;\" xmlns=\"http://www.w3.org/2000/svg\" width=\"35\" height=\"27\" fill=\"currentColor\" class=\"bi bi-wifi\" viewBox=\"0 0 16 16\">
  404. \t\t\t\t\t\t <path d=\"M15.384 6.115a.485.485 0 0 0-.047-.736A12.444 12.444 0 0 0 8 3C5.259 3 2.723 3.882.663 5.379a.485.485 0 0 0-.048.736.518.518 0 0 0 .668.05A11.448 11.448 0 0 1 8 4c2.507 0 4.827.802 6.716 2.164.205.148.49.13.668-.049z\"/>
  405. \t\t\t\t\t\t <path d=\"M13.229 8.271a.482.482 0 0 0-.063-.745A9.455 9.455 0 0 0 8 6c-1.905 0-3.68.56-5.166 1.526a.48.48 0 0 0-.063.745.525.525 0 0 0 .652.065A8.46 8.46 0 0 1 8 7a8.46 8.46 0 0 1 4.576 1.336c.206.132.48.108.653-.065zm-2.183 2.183c.226-.226.185-.605-.1-.75A6.473 6.473 0 0 0 8 9c-1.06 0-2.062.254-2.946.704-.285.145-.326.524-.1.75l.015.015c.16.16.407.19.611.09A5.478 5.478 0 0 1 8 10c.868 0 1.69.201 2.42.56.203.1.45.07.61-.091l.016-.015zM9.06 12.44c.196-.196.198-.52-.04-.66A1.99 1.99 0 0 0 8 11.5a1.99 1.99 0 0 0-1.02.28c-.238.14-.236.464-.04.66l.706.706a.5.5 0 0 0 .707 0l.707-.707z\"/>
  406. \t\t\t\t\t\t</svg> Live</h2>
  407. </div>
  408. </div>
  409. <div class=\"col-6 text-right\">
  410. \t<div class=\"link-right\">
  411. \t\t<button class=\"btn btn-secondary link-i-see d-none\">Recept</button>
  412. \t</div>
  413. \t</div>
  414. \t<div class=\"col-12\">
  415. \t\t<hr></hr>
  416. \t</div>
  417. </div>
  418. </div>
  419. <div class=\"container\">
  420. \t<div class=\"row\">
  421. \t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
  422. \t\t\t<div class=\"card text-center\" id=\"current-position\">
  423. \t\t\t\t\t \t<div class=\"card-header\">
  424. \t\t\t\t\t \tCurrent position
  425. \t\t\t\t\t \t</div>
  426. \t\t\t\t\t \t{% if currentPosition %}
  427. \t\t\t\t\t\t \t<div class=\"card-body\">
  428. \t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">{{ currentPosition.datePrinted|date(\"d-m-Y H:i:s\") }}</span></h5>
  429. \t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
  430. \t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">{{ currentPosition.latitude }}</div></li>
  431. \t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">{{ currentPosition.longitude }}</div></li>
  432. \t\t\t\t\t\t\t\t <li class=\"list-group-item\"><a href=\"/debug/information/position\" class=\"btn btn-primary mt-3\">Get last positions</a></li>
  433. \t\t\t\t\t\t\t \t</ul>
  434. \t\t\t\t\t\t\t \t
  435. \t\t\t\t\t\t \t</div>
  436. \t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
  437. \t\t\t\t\t\t \t<span class=\"value\">{{ currentAgo|raw }}</span> ago
  438. \t\t\t\t\t\t \t</div>
  439. \t\t\t\t\t \t{% else %}
  440. \t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
  441. \t\t\t\t\t \t{% endif %}
  442. \t\t\t\t\t</div>
  443. \t\t</div>
  444. \t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 animated fadeIn delay-0-2s\">
  445. \t\t\t<div class=\"card text-center\" id=\"current-hobit\">
  446. \t\t\t\t\t \t<div class=\"card-header\">
  447. \t\t\t\t\t \tLast hobit
  448. \t\t\t\t\t \t</div>
  449. \t\t\t\t\t \t{% if lastHobit %}
  450. \t\t\t\t\t\t \t<div class=\"card-body\">
  451. \t\t\t\t\t\t \t<h5 class=\"card-title\"><span class=\"value\">{{ lastHobit.startDateTime|date(\"d-m-Y H:i:s\") }}</span></h5>
  452. \t\t\t\t\t\t \t<ul class=\"list-group list-group-flush\">
  453. \t\t\t\t\t\t\t\t <li class=\"list-group-item latitude\">Latitude : <div class=\"value\">{{ lastHobit.data.latitude }}</div></li>
  454. \t\t\t\t\t\t\t\t <li class=\"list-group-item longitude\">Longitude : <div class=\"value\">{{ lastHobit.data.longitude }}</div></li>
  455. \t\t\t\t\t\t\t\t <li class=\"list-group-item end\">End (or now) : <div class=\"value\">{{ lastHobit.endDateTime|date(\"d-m-Y H:i:s\") }}</div></li>
  456. \t\t\t\t\t\t\t \t</ul>
  457. \t\t\t\t\t\t\t \t
  458. \t\t\t\t\t\t \t</div>
  459. \t\t\t\t\t\t \t<div class=\"card-footer text-muted\">
  460. \t\t\t\t\t\t \t<span class=\"value\">{{ currentHobitAgo|raw }}</span> ago
  461. \t\t\t\t\t\t \t</div>
  462. \t\t\t\t\t \t{% else %}
  463. \t\t\t\t\t \t\t<div class=\"text-center\">No data</div>
  464. \t\t\t\t\t \t{% endif %}
  465. \t\t\t\t\t</div>
  466. \t\t</div>
  467. \t\t<div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-0 col-xl-3 \">
  468. \t\t{% if newHobitAgo == false %}
  469. \t\t\t<div class=\"card text-center d-none animated fadeIn delay-0-2s\" id=\"new-hobit\">
  470. \t\t\t{% else %}
  471. \t\t\t\t<div class=\"card text-center animated fadeIn delay-0-2s\" id=\"new-hobit\">
  472. \t\t\t\t{% endif %}
  473. \t\t\t\t\t \t<div class=\"card-header\">
  474. \t\t\t\t\t \tScan hobit
  475. \t\t\t\t\t \t</div>
  476. \t\t\t\t\t \t<div class=\"card-body\">
  477. \t\t\t\t\t \t<h5 class=\"card-title\">
  478. \t\t\t\t \t\t<span class=\"value\">
  479. \t\t\t\t \t\t\t{% if lastHobit %}
  480. \t\t\t\t\t \t\t\tSince {{ lastHobit.endDateTime|date(\"d-m-Y H:i:s\") }}
  481. \t\t\t\t \t\t\t{% endif %}
  482. \t\t\t\t \t\t</span></h5>
  483. \t\t\t\t\t \t<div class=\"loader mt-lg-4\">
  484. \t\t\t\t\t \t\t<div class=\"spinner-grow text-primary\" role=\"status\">
  485. \t\t\t\t\t\t\t\t <span class=\"visually-hidden\">Loading...</span>
  486. \t\t\t\t\t\t\t\t</div>
  487. \t\t\t\t\t \t</div>
  488. \t\t\t\t\t \t</div>
  489. \t\t\t\t\t \t<div class=\"card-footer text-muted\">
  490. \t\t\t\t\t \t<span class=\"value\">{{ newHobitAgo|raw }}</span> ago
  491. \t\t\t\t\t \t</div>
  492. \t\t\t\t\t</div>
  493. \t\t</div>
  494. \t\t</div>
  495. <div class=\"row mt-5\">
  496. \t<div class=\"col-12\">
  497. \t\t<h3 class=\"mb-3 animated fadeIn delay-0-2s\">Last positions</h3>
  498. \t\t</div>
  499. </div>
  500. <div class=\"row\">
  501. \t{% if positionGpsList %}
  502. \t \t\t{% set i = 1 %}
  503. \t {% set number = 1 %}
  504. \t \t\t{% for positionGps in positionGpsList %}
  505. \t <div class=\"col-12 col-md-6 col-lg-4 mb-3 mb-lg-5\">
  506. \t <div class=\"card animated fadeIn delay-0-{{ i }}s\" style=\"width: 100%;\">
  507. \t <div class=\"card-body\">
  508. \t <h5 class=\"card-title\"><b>Position <span class=\"value\">{{ number }}</span></b></h5>
  509. \t <div class=\"card-text line mb-1\"><b>Date application : </b>{{ positionGps.datePrinted|date(\"d-m-Y H:i:s\") }}</div>
  510. \t <div class=\"card-text line mb-1\"><b>Date server : </b>{{ positionGps.dateCreatedByServer|date(\"d-m-Y H:i:s\") }}</div>
  511. \t <div class=\"card-text line mb-1\"><b>Latitude : </b>{{ positionGps.latitude }}</div>
  512. \t <div class=\"card-text line mb-1\"><b>Longitude : </b>{{ positionGps.longitude }}</div>
  513. \t <a href=\"/debug/information/positions/{{ positionGps.datePrinted|date(\"Y-m-d\") }}\" class=\"btn btn-primary mt-3\">All positions</a>
  514. \t </div>
  515. \t </div>
  516. \t </div>
  517. \t {% set i = i + 1 %}
  518. \t {% set number = number + 1 %}
  519. {% endfor %}
  520. {% else %}
  521. \t <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  522. {% endif %}
  523. </div>
  524. </div>
  525. </div>
  526. {% endblock %}
  527. {% block javascripts %}
  528. {{ parent() }}
  529. <script>
  530. \twindow.onload=function() {
  531. \t\t var boucle = 1;
  532. \t \tsetInterval(function(){
  533. \t\t\t\t\$.get(
  534. \t\t\t\t '{{ path(\"information_live_refresh_debug\") }}',
  535. \t\t\t \t{
  536. \t\t\t \t},
  537. \t\t\t\t function(data){
  538. \t\t\t\t \tif(data['data']['dataHere']){
  539. \t\t\t\t\t \tif(data['data']['currentPostition']['start'] != \$(\"body #current-position .card-title .value\").html()){
  540. \t\t\t\t\t \t\t\$(\".icon-network\").removeClass(\"active\");
  541. \t\t\t\t\t \t\t\$(\".icon-network\").addClass(\"active\");
  542. \t\t\t\t\t \t\t\$(\".link-i-see\").removeClass(\"d-none\");
  543. \t\t\t\t\t \t\tconst soundEffect = new Audio();
  544. \t\t\t\t\t\t\t\t// onClick of first interaction on page before I need the sounds
  545. \t\t\t\t\t\t\t\tsoundEffect.play();
  546. \t\t\t\t\t\t\t\t// later on when you actually want to play a sound at any point without user interaction
  547. \t\t\t\t\t\t\t\tsoundEffect.src = '/alert.mp3';
  548. \t\t\t\t\t\t\t\tsoundEffect.play();
  549. \t\t\t\t\t \t}
  550. \t\t\t\t\t \t//Current position
  551. \t\t\t\t\t \$(\"body #current-position .card-title .value\").html(data['data']['currentPostition']['start']);
  552. \t\t\t\t\t \$(\"body #current-position .latitude .value\").html(data['data']['currentPostition']['latitude']);
  553. \t\t\t\t\t \$(\"body #current-position .longitude .value\").html(data['data']['currentPostition']['longitude']);
  554. \t\t\t\t\t \$(\"body #current-position .card-footer .value\").html(data['data']['currentAgo']);
  555. \t\t\t\t\t //Current hobit
  556. \t\t\t\t\t \$(\"body #current-hobit .card-title .value\").html(data['data']['lastHobit']['start']);
  557. \t\t\t\t\t \$(\"body #current-hobit .latitude .value\").html(data['data']['lastHobit']['latitude']);
  558. \t\t\t\t\t \$(\"body #current-hobit .longitude .value\").html(data['data']['lastHobit']['longitude']);
  559. \t\t\t\t\t \$(\"body #current-hobit .end .value\").html(data['data']['lastHobit']['end']);
  560. \t\t\t\t\t \$(\"body #current-hobit .card-footer .value\").html(data['data']['currentHobitAgo']);
  561. \t\t\t\t\t //Current hobit
  562. \t\t\t\t\t if(data['data']['newHobitAgo'] != false){
  563. \t\t\t\t\t \t\$(\"body #new-hobit .card-title .value\").html(data['data']['currentPostition']['start']);
  564. \t\t\t\t\t \t\$(\"body #new-hobit .card-footer .value\").html(data['data']['newHobitAgo']);
  565. \t\t\t\t\t \t\$(\"body #new-hobit\").removeClass(\"d-none\");
  566. \t\t\t\t\t \t}
  567. \t\t\t\t\t \telse{
  568. \t\t\t\t\t \t\t\$(\"body #new-hobit\").addClass(\"d-none\");
  569. \t\t\t\t\t \t}
  570. \t\t\t\t \t}
  571. \t\t\t\t }
  572. \t\t\t\t);
  573. \t\t\t}, 1000);
  574. \t\t\t};
  575. \t\t\$(\"body\").on(\"click\", \".link-i-see\", function(){
  576. \t\t\t\$(this).addClass(\"d-none\");
  577. \t\t\t\$(\".icon-network\").removeClass(\"active\");
  578. \t\t});
  579. </script>
  580. {% endblock %}", "debug/live.html.twig", "/var/www/vhosts/webpro-developpement.fr/follow.webpro-developpement.fr/public/templates/debug/live.html.twig");
  581. }
  582. }