Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.9 KiB

  1. <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"></script>
  2. <canvas id="FederationChart" style="width: 400px; height: 400px; float: right; margin: 20px;"></canvas>
  3. <div id="adminpage">
  4. <h1>{{$title}} - {{$page}}</h1>
  5. <p>{{$intro}}</p>
  6. {{if not $autoactive}}
  7. <p class="error-message">{{$hint}}</p>
  8. {{/if}}
  9. <p>{{$legendtext}}
  10. <ul>
  11. {{foreach $counts as $c}}
  12. <li>{{$c[0]['platform']}} ({{$c[0]['count(*)']}})</li>
  13. {{/foreach}}
  14. </ul>
  15. </p>
  16. </div>
  17. <script>
  18. var FedData = [
  19. {{foreach $counts as $c}}
  20. { value: {{$c[0]['count(*)']}}, label: "{{$c[0]['platform']}}", color: "#90EE90", highlight: "#EE90A1", },
  21. {{/foreach}}
  22. ];
  23. var ctx = document.getElementById("FederationChart").getContext("2d");
  24. var myDoughnutChart = new Chart(ctx).Doughnut(FedData,
  25. {
  26. animateRotate : false,
  27. });
  28. document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generateLegend();
  29. </script>
  30. <table style="width: 100%">
  31. {{foreach $counts as $c}}
  32. <tr>
  33. <th>{{$c[0]['platform']}}</th>
  34. <th><strong>{{$c[0]['count(*)']}}</strong></td>
  35. <td>{{$c[0]['network']}}</td>
  36. </tr>
  37. <tr>
  38. <td colspan="3" style="border-bottom: 1px solid #000;">
  39. <canvas id="{{$c[2]}}Chart" style="width: 240px; height: 240px; float: left;
  40. margin: 20px;"></canvas>
  41. <script>
  42. var {{$c[2]}}data = [
  43. {{foreach $c[1] as $v}}
  44. { value: {{$v['count(*)']}}, label: '{{$v['version']}}', color: "#90EE90", highlight: "#EE90A1",},
  45. {{/foreach}}
  46. ];
  47. var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
  48. var my{{$c[2]}}DoughnutChart = new Chart(ctx).Doughnut({{$c[2]}}data,
  49. {animateRotate : false,});
  50. </script>
  51. <ul class="federation-stats">
  52. {{foreach $c[1] as $v}}
  53. <li>{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}<span class="version-match">{{$v['version']}}</span>{{else}}{{$v['version']}}{{/if}} ({{$v['count(*)']}})</li>
  54. {{/foreach}}
  55. </ul>
  56. </td>
  57. </tr>
  58. {{/foreach}}
  59. </table>