src/Platform/ControlPanelBundle/Resources/views/Dashboard/Stats/modulesUnique.html.twig line 1

Open in your IDE?
  1. {% extends '@PlatformControlPanel/base.html.twig' %}
  2. {% block header %}
  3.     {% embed '@ui/common/headers/new.html.twig' with {
  4.         subtitle: 'Unique Module Activity Stats',
  5.         title: (tenant is not empty) ? tenant.name : 'SYSTEM'
  6.     } %}
  7.         {% block actions %}
  8.             {% if tenant is not empty %}
  9.                 {% include '@ui/common/buttons/default.html.twig' with {
  10.                     text: 'Back to Tenants',
  11.                     helper: 'default',
  12.                     link: path('platform.control_panel.dashboard.tenant.index')
  13.                 } %}
  14.             {% endif %}
  15.         {% endblock %}
  16.     {% endembed %}
  17.     {% include '@PlatformControlPanel/Dashboard/Stats/includes/navbar.html.twig' %}
  18. {% endblock %}
  19. {% block content %}
  20.     <div style="background-color: #FFFFFF; height: 500px;">
  21.         <canvas id="statsChart"></canvas>
  22.     </div>
  23.     <pre><code>{{- data|json_encode(constant('JSON_PRETTY_PRINT'))|raw -}}</code></pre>
  24.     <script type="text/javascript">
  25.         ;(function (window, document, $, undefined) {
  26.             $(function () {
  27.                 new Chart(
  28.                     $('#statsChart'),
  29.                     {
  30.                         type: 'line',
  31.                         data: {{ data|json_encode|raw }},
  32.                         options: {
  33.                             responsive: true,
  34.                             maintainAspectRatio: false,
  35.                             tooltips: {
  36.                                 mode: 'index',
  37.                                 intersect: false,
  38.                                 position: 'nearest'
  39.                             },
  40.                             hover: {
  41.                                 animationDuration: 0
  42.                             }
  43.                         }
  44.                     }
  45.                 );
  46.             });
  47.         })(window, document, jQuery);
  48.     </script>
  49. {% endblock %}