|
| 1 | +<?php |
| 2 | +include dirname(__DIR__)."/lib/Auth/Process/DatabaseCommand.php"; |
| 3 | +/** |
| 4 | + * @author Pavel Vyskočil <[email protected]> |
| 5 | + * @author Dominik Baránek <[email protected]> |
| 6 | + */ |
| 7 | +?> |
| 8 | +<link rel="stylesheet" media="screen" type="text/css" href="<?php SimpleSAML_Module::getModuleUrl('proxystatistics/statisticsproxy.css')?>" /> |
| 9 | +<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/logins_day}'); ?></h2> |
| 10 | +<div id="tableOfAllLogin"> |
| 11 | + <script type="text/javascript"> |
| 12 | + google.charts.load('current', {'packages':['table']}); |
| 13 | + google.charts.setOnLoadCallback(drawTable); |
| 14 | + |
| 15 | + function drawTable() { |
| 16 | + var data = new google.visualization.DataTable(); |
| 17 | + data.addColumn('date', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/tables_date}'); ?>'); |
| 18 | + data.addColumn('number', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/count}'); ?>'); |
| 19 | + data.addRows([<?php DatabaseCommand::getLoginCountPerDay()?>]); |
| 20 | + |
| 21 | + var table = new google.visualization.Table(document.getElementById('tableOfAllLogin')); |
| 22 | + |
| 23 | + var formatter = new google.visualization.DateFormat({pattern:"d MMMM yyyy"}); |
| 24 | + formatter.format(data, 0); // Apply formatter to second column |
| 25 | + |
| 26 | + table.draw(data, {showRowNumber: false, width: '60%', height: '300px'}); |
| 27 | + } |
| 28 | + </script> |
| 29 | + |
| 30 | + <div id="tableOfAllLogin" ></div> |
| 31 | +</div> |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/logins_identity}'); ?></h2> |
| 36 | +<div> |
| 37 | + <script type="text/javascript"> |
| 38 | + google.charts.load('current', {'packages':['table']}); |
| 39 | + google.charts.setOnLoadCallback(drawTable); |
| 40 | + |
| 41 | + function drawTable() { |
| 42 | + var data = new google.visualization.DataTable(); |
| 43 | + data.addColumn('date', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/tables_month}'); ?>'); |
| 44 | + data.addColumn('string', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/tables_identity_provider}'); ?>'); |
| 45 | + data.addColumn('number', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/count}'); ?>'); |
| 46 | + data.addRows([<?php DatabaseCommand::getLoginCountPerDeyPerService()?>]); |
| 47 | + |
| 48 | + var table = new google.visualization.Table(document.getElementById('tablePerIdP')); |
| 49 | + |
| 50 | + var formatter = new google.visualization.DateFormat({pattern:"MMMM yyyy"}); |
| 51 | + formatter.format(data, 0); // Apply formatter to second column |
| 52 | + |
| 53 | + table.draw(data, {showRowNumber: false, width: '100%', height: '300px'}); |
| 54 | + } |
| 55 | + </script> |
| 56 | + |
| 57 | + <div id="tablePerIdP"></div> |
| 58 | +</div> |
| 59 | + |
| 60 | +<h2><?php echo $this->t('{proxystatistics:Proxystatistics:templates/logins_service}'); ?></h2> |
| 61 | +<div> |
| 62 | + <script type="text/javascript"> |
| 63 | + google.charts.load('current', {'packages':['table']}); |
| 64 | + google.charts.setOnLoadCallback(drawTable); |
| 65 | + |
| 66 | + function drawTable() { |
| 67 | + var data = new google.visualization.DataTable(); |
| 68 | + data.addColumn('date', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/tables_month}'); ?>'); |
| 69 | + data.addColumn('string', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/tables_service_provider}'); ?>'); |
| 70 | + data.addColumn('number', '<?php echo $this->t('{proxystatistics:Proxystatistics:templates/count}'); ?>'); |
| 71 | + data.addRows([<?php DatabaseCommand::getAccessToServicesPerMonth()?>]); |
| 72 | + |
| 73 | + var table = new google.visualization.Table(document.getElementById('accessToServices')); |
| 74 | + |
| 75 | + var formatter = new google.visualization.DateFormat({pattern:"MMMM yyyy"}); |
| 76 | + formatter.format(data, 0); // Apply formatter to second column |
| 77 | + |
| 78 | + table.draw(data, {showRowNumber: false, width: '100%', height: '300px'}); |
| 79 | + } |
| 80 | + </script> |
| 81 | + |
| 82 | + <div id="accessToServices"></div> |
| 83 | +</div> |
| 84 | + |
0 commit comments