2024-08-24 18:23:27 +00:00
|
|
|
{{*
|
|
|
|
* Copyright (C) 2010-2024, the Friendica project
|
|
|
|
* SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
*}}
|
2024-03-24 13:20:58 +00:00
|
|
|
<script src="{{$baseurl}}/view/asset/Chart-js/dist/Chart.min.js?v={{$VERSION}}"></script>
|
2017-12-01 05:40:55 +00:00
|
|
|
<div id="adminpage">
|
2018-02-07 15:23:19 +00:00
|
|
|
<h1>{{$title}} - {{$page}}</h1>
|
|
|
|
|
|
|
|
<canvas id="FederationChart" class="federation-graph" width="320" height="320"></canvas>
|
|
|
|
<p>{{$intro}}</p>
|
|
|
|
|
|
|
|
<p>{{$legendtext}}</p>
|
2017-12-01 05:40:55 +00:00
|
|
|
|
2018-02-07 15:23:19 +00:00
|
|
|
<ul>
|
|
|
|
{{foreach $counts as $c}}
|
|
|
|
{{if $c[0]['total'] > 0}}
|
2022-02-07 06:11:37 +00:00
|
|
|
<li>{{$c[0]['platform']}} ({{$c[0]['total']}}/{{$c[0]['users']}})</li>
|
2018-02-07 15:23:19 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var FedData = {
|
|
|
|
datasets: [{
|
|
|
|
data: [
|
|
|
|
{{foreach $counts as $c}}
|
|
|
|
{{$c[0]['total']}},
|
|
|
|
{{/foreach}}
|
|
|
|
],
|
|
|
|
backgroundColor: [
|
|
|
|
{{foreach $counts as $c}}
|
|
|
|
'{{$c[3]}}',
|
|
|
|
{{/foreach}}
|
|
|
|
],
|
|
|
|
hoverBackgroundColor: [
|
|
|
|
{{foreach $counts as $c}}
|
|
|
|
'#EE90A1',
|
|
|
|
{{/foreach}}
|
|
|
|
]
|
|
|
|
}],
|
|
|
|
labels: [
|
|
|
|
{{foreach $counts as $c}}
|
|
|
|
"{{$c[0]['platform']}}",
|
|
|
|
{{/foreach}}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
var ctx = document.getElementById("FederationChart").getContext("2d");
|
|
|
|
var myDoughnutChart = new Chart(ctx, {
|
|
|
|
type: 'doughnut',
|
|
|
|
data: FedData,
|
|
|
|
options: {
|
|
|
|
legend: {display: false},
|
|
|
|
animation: {animateRotate: false},
|
|
|
|
responsive: false
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<table id="federation-stats">
|
|
|
|
{{foreach $counts as $c}}
|
|
|
|
{{if $c[0]['total'] > 0}}
|
|
|
|
<tr>
|
|
|
|
<th>{{$c[0]['platform']}}</th>
|
2023-07-25 11:18:58 +00:00
|
|
|
<th><strong>{{$c[0]['total']}}</strong></th>
|
2018-02-07 15:23:19 +00:00
|
|
|
<td>{{$c[0]['network']}}</td>
|
|
|
|
</tr>
|
2022-02-07 06:11:37 +00:00
|
|
|
<tr>
|
|
|
|
<td colspan="3" class="federation-summary">
|
|
|
|
<ul>
|
2022-02-07 06:23:49 +00:00
|
|
|
{{if $c[0]['total']}}<li>{{$c[0]['totallbl']}}</li>{{/if}}
|
2022-02-07 06:11:37 +00:00
|
|
|
{{if $c[0]['month']}}<li>{{$c[0]['monthlbl']}}</li>{{/if}}
|
|
|
|
{{if $c[0]['halfyear']}}<li>{{$c[0]['halfyearlbl']}}</li>{{/if}}
|
|
|
|
{{if $c[0]['users']}}<li>{{$c[0]['userslbl']}}</li>{{/if}}
|
|
|
|
{{if $c[0]['posts']}}<li>{{$c[0]['postslbl']}}</li>{{/if}}
|
|
|
|
{{if $c[0]['postsuserlbl']}}<li>{{$c[0]['postsuserlbl']}}</li>{{/if}}
|
2022-02-07 06:23:49 +00:00
|
|
|
{{if $c[0]['userssystemlbl']}}<li>{{$c[0]['userssystemlbl']}}</li>{{/if}}
|
2022-02-07 06:11:37 +00:00
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2018-02-07 15:23:19 +00:00
|
|
|
<tr>
|
|
|
|
<td colspan="3" class="federation-data">
|
|
|
|
<canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas>
|
|
|
|
<script>
|
|
|
|
var {{$c[2]}}data = {
|
|
|
|
datasets: [{
|
|
|
|
data: [
|
|
|
|
{{foreach $c[1] as $v}}
|
|
|
|
{{$v['total']}},
|
|
|
|
{{/foreach}}
|
|
|
|
],
|
|
|
|
backgroundColor: [
|
|
|
|
{{foreach $c[1] as $v}}
|
|
|
|
'{{$c[3]}}',
|
|
|
|
{{/foreach}}
|
|
|
|
],
|
|
|
|
hoverBackgroundColor: [
|
|
|
|
{{foreach $c[1] as $v}}
|
|
|
|
'#EE90A1',
|
|
|
|
{{/foreach}}
|
|
|
|
]
|
|
|
|
}],
|
|
|
|
labels: [
|
|
|
|
{{foreach $c[1] as $v}}
|
|
|
|
'{{$v['version']}}',
|
|
|
|
{{/foreach}}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
|
|
|
|
var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
|
|
|
|
type: 'doughnut',
|
|
|
|
data: {{$c[2]}}data,
|
|
|
|
options: {
|
|
|
|
legend: {display: false},
|
|
|
|
animation: {animateRotate: false},
|
|
|
|
responsive: false
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<ul class="federation-stats">
|
|
|
|
{{foreach $c[1] as $v}}
|
|
|
|
<li>
|
2024-03-24 13:20:58 +00:00
|
|
|
{{if $c[0]['platform'] === 'Friendica' && $VERSION === $v['version']}}
|
2018-02-07 15:23:19 +00:00
|
|
|
<span class="version-match">{{$v['version']}}</span>
|
|
|
|
{{else}}
|
|
|
|
{{$v['version']}}
|
|
|
|
{{/if}}
|
|
|
|
({{$v['total']}})
|
|
|
|
</li>
|
|
|
|
{{/foreach}}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|
|
|
|
{{/foreach}}
|
|
|
|
</table>
|
|
|
|
</div>
|