0byt3m1n1
Path:
/
home
/
mgatv524
/
lot.mgaplay.com.br
/
cache
/
79
/
[
Home
]
File: 79f4e08d6ada141f1552f96b4e018e40a52dc1206227dcd1de98783aaca801e4.php
<?php use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Extension\SandboxExtension; use Twig\Markup; use Twig\Sandbox\SecurityError; use Twig\Sandbox\SecurityNotAllowedTagError; use Twig\Sandbox\SecurityNotAllowedFilterError; use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template; /* timeconnected-report-form.twig */ class __TwigTemplate_e195165da37cb26799c0367a2cb38166e7cf60271771061fb5f0e83b86ae0b8a extends Template { private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->blocks = [ 'title' => [$this, 'block_title'], 'actionMenu' => [$this, 'block_actionMenu'], 'pageContent' => [$this, 'block_pageContent'], 'javaScript' => [$this, 'block_javaScript'], ]; } protected function doGetParent(array $context) { // line 24 return "authed.twig"; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; // line 25 $macros["inline"] = $this->macros["inline"] = $this->loadTemplate("inline.twig", "timeconnected-report-form.twig", 25)->unwrap(); // line 24 $this->parent = $this->loadTemplate("authed.twig", "timeconnected-report-form.twig", 24); $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 27 public function block_title($context, array $blocks = []) { $macros = $this->macros; echo __("Report: Time Connected"); echo " | "; } // line 29 public function block_actionMenu($context, array $blocks = []) { $macros = $this->macros; // line 30 echo " <style> table { table-layout: fixed; border-collapse: collapse; border-spacing: 20px 0; padding: 20px 0 0; } th { text-align: center; } td.display-label { padding-right: 10px; text-align: right; } td.display-percent { border: 1px solid #408640; } .note-box { height: 15px; width: 15px; float:left; } </style> "; // line 53 $this->loadTemplate("report-schedule-buttons.twig", "timeconnected-report-form.twig", 53)->display($context); } // line 56 public function block_pageContent($context, array $blocks = []) { $macros = $this->macros; // line 57 echo " <div class=\"widget\"> <div class=\"widget-title\"> <span>"; // line 59 echo __("Time Connected"); echo "</span> </div> "; // line 62 $this->loadTemplate("report-selector.twig", "timeconnected-report-form.twig", 62)->display($context); // line 63 echo " <div class=\"widget-body\"> <div class=\"XiboGrid\" id=\""; // line 65 echo twig_escape_filter($this->env, twig_random($this->env), "html", null, true); echo "\"> <div class=\"pull-right p-3\"> <div> <div class=\"note-box\" style=\"background-color: #03a9f4;\"></div> <div style=\"padding-left: 20px\">Blue is disconnected %</div> </div> <div> <div class=\"note-box\" style=\"background-color: #5cb85c;\"></div> <div style=\"padding-left: 20px\">Green is connected %</div> </div> </div> <div class=\"XiboFilterCustom card bg-light mb-3\"> <div class=\"FilterDiv card-body\" id=\"timeconnected\"> <form class=\"form-inline\"> "; // line 79 ob_start(function () { return ''; }); echo __("Range"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 80 echo " "; ob_start(function () { return ''; }); echo __("Select a range"); $context["range"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 81 echo " "; ob_start(function () { return ''; }); echo __("Today"); $context["today"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 82 echo " "; ob_start(function () { return ''; }); echo __("Yesterday"); $context["yesterday"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 83 echo " "; ob_start(function () { return ''; }); echo __("This Week"); $context["thisweek"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 84 echo " "; ob_start(function () { return ''; }); echo __("This Month"); $context["thismonth"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 85 echo " "; ob_start(function () { return ''; }); echo __("This Year"); $context["thisyear"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 86 echo " "; ob_start(function () { return ''; }); echo __("Last Week"); $context["lastweek"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 87 echo " "; ob_start(function () { return ''; }); echo __("Last Month"); $context["lastmonth"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 88 echo " "; ob_start(function () { return ''; }); echo __("Last Year"); $context["lastyear"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 89 echo " "; $context["options"] = [0 => ["filterName" => "", "reportFilter" => // line 90 ($context["range"] ?? null)], 1 => ["filterName" => "today", "reportFilter" => // line 91 ($context["today"] ?? null)], 2 => ["filterName" => "yesterday", "reportFilter" => // line 92 ($context["yesterday"] ?? null)], 3 => ["filterName" => "thisweek", "reportFilter" => // line 93 ($context["thisweek"] ?? null)], 4 => ["filterName" => "thismonth", "reportFilter" => // line 94 ($context["thismonth"] ?? null)], 5 => ["filterName" => "thisyear", "reportFilter" => // line 95 ($context["thisyear"] ?? null)], 6 => ["filterName" => "lastweek", "reportFilter" => // line 96 ($context["lastweek"] ?? null)], 7 => ["filterName" => "lastmonth", "reportFilter" => // line 97 ($context["lastmonth"] ?? null)], 8 => ["filterName" => "lastyear", "reportFilter" => // line 98 ($context["lastyear"] ?? null)]]; // line 100 echo " "; echo twig_call_macro($macros["inline"], "macro_dropdown", ["reportFilter", "single", ($context["title"] ?? null), "today", ($context["options"] ?? null), "filterName", "reportFilter"], 100, $context, $this->getSourceContext()); echo " "; // line 102 ob_start(function () { return ''; }); echo __("From Date"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 103 echo " "; echo twig_call_macro($macros["inline"], "macro_date", ["statsFromDt", ($context["title"] ?? null), twig_get_attribute($this->env, $this->source, ($context["defaults"] ?? null), "fromDateOneDay", [], "any", false, false, false, 103), "", "stats-from-dt", "", ""], 103, $context, $this->getSourceContext()); echo " "; // line 105 ob_start(function () { return ''; }); echo __("To Date"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 106 echo " "; echo twig_call_macro($macros["inline"], "macro_date", ["statsToDt", ($context["title"] ?? null), twig_get_attribute($this->env, $this->source, ($context["defaults"] ?? null), "toDate", [], "any", false, false, false, 106), "", "stats-to-dt", "", ""], 106, $context, $this->getSourceContext()); echo " "; // line 108 ob_start(function () { return ''; }); echo __("Group by"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 109 echo " "; ob_start(function () { return ''; }); echo __("Hour"); $context["byhour"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 110 echo " "; ob_start(function () { return ''; }); echo __("Day of month"); $context["bydayofmonth"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 111 echo " "; $context["options"] = [0 => ["filterName" => "byhour", "groupByFilter" => // line 112 ($context["byhour"] ?? null)], 1 => ["filterName" => "bydayofmonth", "groupByFilter" => // line 113 ($context["bydayofmonth"] ?? null)]]; // line 115 echo " "; echo twig_call_macro($macros["inline"], "macro_dropdown", ["groupByFilter", "single", ($context["title"] ?? null), "", ($context["options"] ?? null), "filterName", "groupByFilter", "", "group-by-filter"], 115, $context, $this->getSourceContext()); echo " "; // line 117 ob_start(function () { return ''; }); echo __("Display/Display Groups"); $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 118 echo " "; ob_start(function () { return ''; }); echo __("Please select one or more displays / groups for this notification to be shown on - Layouts will need the notification widget."); $context["helpText"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 119 echo " "; $context["attributes"] = [0 => ["name" => "data-width", "value" => "100%"]]; // line 122 echo " "; ob_start(function () { return ''; }); echo __("Groups"); $context["transGroups"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 123 echo " "; ob_start(function () { return ''; }); echo __("Display"); $context["transDisplays"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 124 echo " "; $context["optionGroups"] = [0 => ["id" => "group", "label" => // line 125 ($context["transGroups"] ?? null)], 1 => ["id" => "display", "label" => // line 126 ($context["transDisplays"] ?? null)]]; // line 128 echo " "; echo twig_call_macro($macros["inline"], "macro_dropdown", ["displayGroupIds[]", "dropdownmulti", ($context["title"] ?? null), ($context["displayGroupIds"] ?? null), ["group" => twig_get_attribute($this->env, $this->source, ($context["defaults"] ?? null), "displayGroups", [], "any", false, false, false, 128), "display" => twig_get_attribute($this->env, $this->source, ($context["defaults"] ?? null), "displays", [], "any", false, false, false, 128)], "displayGroupId", "displayGroup", ($context["helpText"] ?? null), "selectPicker", "", "", "", ($context["attributes"] ?? null), ($context["optionGroups"] ?? null)], 128, $context, $this->getSourceContext()); echo " <div class=\"w-100\"> <a id=\"applyBtn\" class=\"btn btn-success\"> <span>"; // line 132 echo __("Apply"); echo "</span> </a> <span id=\"applyWarning\" class=\"text-warning\" style=\"display:none; padding-left: 10px\">"; // line 134 echo __("Warning: This may return a lot of data and may take several minutes to process."); echo "</span> </div> </form> </div> </div> <div class=\"XiboData card pt-3\"> <table id=\"records_table\"></table> <img id=\"imageLoader\" style=\"display: block; margin: auto;\" src=\""; // line 141 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["theme"] ?? null), "uri", [0 => "img/loader.gif"], "method", false, false, false, 141), "html", null, true); echo "\"> </div> </div> </div> </div> "; } // line 149 public function block_javaScript($context, array $blocks = []) { $macros = $this->macros; // line 150 echo " <script type=\"text/javascript\"> \$(function () { \$('[data-toggle=\"popover\"]').popover(); }); var imageLoader = \$(\"#imageLoader\"); function setReport() { imageLoader.show(); \$(\"#records_table\").empty(); \$.ajax({ type: \"get\", url: \""; // line 164 echo twig_escape_filter($this->env, $this->env->getRuntime('Slim\Views\TwigRuntimeExtension')->urlFor("report.data", ["name" => ($context["reportName"] ?? null)]), "html", null, true); echo "\", cache: false, dataType: \"json\", data: \$(\"#timeconnected\").find(\"form\").serialize(), success: function(response) { setTimeout(function() { \$(\"#applyBtn\").removeClass('disabled'); }, 300); imageLoader.hide(); \$('.XiboData').find(\".form-error\").remove(); if (response.success === false) { \$('.XiboData').append('<div class=\"alert alert-danger form-error\">'+ response.message +'</div>'); return; } \$.each(response.extra.table.timeConnected, function(index, displayStat) { var \$displayHeader = \$('<tr>'); \$.each(response.extra.table.displays[index], function(i, displayName) { \$displayHeader.append(\$('<th colspan=\"2\">').text(displayName)); \$displayHeader.appendTo('#records_table').html(); }); // Display Statistics \$.each(displayStat, function(periodId, item) { var \$tr = \$('<tr>'); \$.each(item, function(displayId, displayData) { var percent= ''; if (displayData.percent > 0) { percent = displayData.percent + \"%\"; } var \$label = \$('<td class=\"display-label\" style=\"width:300px\">').text(displayData.label); var \$percentage = \$('<td class=\"display-percent\" style=\"width:300px\">').css({\"background-color\": \"#03a9f4\", \"color\": \"white\"}).append( \$('<div>').css({\"background-color\": \"#5cb85c\", \"width\": percent}).text(percent) ); \$tr.append(\$label); \$tr.append(\$percentage); }); \$tr.appendTo('#records_table').html(); }); }); } }); } \$(document).ready(function() { // Init var applyBtn = \$(\"#applyBtn\"); // Enable/Disable Schedule Btn var checkEnableSchedule = function() { // Schedule button enable/disable - start var anchorReportAddBtn = \$(\"button#reportAddBtn\"); anchorReportAddBtn.attr(\"href\", \""; // line 234 echo twig_escape_filter($this->env, $this->env->getRuntime('Slim\Views\TwigRuntimeExtension')->urlFor("reportschedule.add.form"), "html", null, true); echo "?reportName=timeconnected\" ); }; // Report Filter var reportFilter = \$(\"#reportFilter\"); // Hide / Show FromDt and ToDt function checkReportFilter(reportFilter) { if (reportFilter.val() === '' || reportFilter.val() === undefined) { \$(\".stats-from-dt\").show(); \$(\".stats-to-dt\").show(); } else { \$(\".stats-from-dt\").hide(); \$(\".stats-to-dt\").hide(); } } var checkFilterAndApply = function() { reportFilter.off('change').change( function() { var value = reportFilter.val(); // Hide / Show FromDt and ToDt checkReportFilter(reportFilter); }); }; imageLoader.hide(); checkReportFilter(reportFilter); checkFilterAndApply(); checkEnableSchedule(); // Bind to form change \$(\"#timeconnected\").on('change', function() { checkEnableSchedule(); }); // Apply applyBtn.click(function () { checkFilterAndApply(); setReport(); }); }); </script> "; } public function getTemplateName() { return "timeconnected-report-form.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 396 => 234, 323 => 164, 307 => 150, 303 => 149, 292 => 141, 282 => 134, 277 => 132, 269 => 128, 267 => 126, 266 => 125, 264 => 124, 259 => 123, 254 => 122, 251 => 119, 246 => 118, 242 => 117, 236 => 115, 234 => 113, 233 => 112, 231 => 111, 226 => 110, 221 => 109, 217 => 108, 211 => 106, 207 => 105, 201 => 103, 197 => 102, 191 => 100, 189 => 98, 188 => 97, 187 => 96, 186 => 95, 185 => 94, 184 => 93, 183 => 92, 182 => 91, 181 => 90, 179 => 89, 174 => 88, 169 => 87, 164 => 86, 159 => 85, 154 => 84, 149 => 83, 144 => 82, 139 => 81, 134 => 80, 130 => 79, 113 => 65, 109 => 63, 107 => 62, 101 => 59, 97 => 57, 93 => 56, 89 => 53, 64 => 30, 60 => 29, 52 => 27, 47 => 24, 45 => 25, 38 => 24,); } public function getSourceContext() { return new Source("", "timeconnected-report-form.twig", "/home/mgatv524/lot.mgaplay.com.br/reports/timeconnected-report-form.twig"); } }