add missing language-strings for traffic page
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -2124,17 +2124,31 @@ Vielen Dank, Ihr Administrator',
|
|||||||
],
|
],
|
||||||
'mb' => 'Traffic',
|
'mb' => 'Traffic',
|
||||||
'day' => 'Tag',
|
'day' => 'Tag',
|
||||||
'distribution' => '<span color="#019522">FTP</span> | <span color="#0000FF">HTTP</span> | <span color="#800000">Mail</span>',
|
'sumtotal' => 'Gesamt Traffic',
|
||||||
'sumhttp' => 'Gesamt HTTP-Traffic',
|
'sumhttp' => 'HTTP-Traffic',
|
||||||
'sumftp' => 'Gesamt FTP-Traffic',
|
'sumftp' => 'FTP-Traffic',
|
||||||
'summail' => 'Gesamt Mail-Traffic',
|
'summail' => 'Mail-Traffic',
|
||||||
'customer' => 'Kunde',
|
'customer' => 'Kunde',
|
||||||
'trafficoverview' => 'Übersicht Traffic je',
|
'trafficoverview' => 'Übersicht Traffic',
|
||||||
|
'bycustomers' => 'Traffic nach Kunden',
|
||||||
'details' => 'Details',
|
'details' => 'Details',
|
||||||
'http' => 'HTTP',
|
'http' => 'HTTP',
|
||||||
'ftp' => 'FTP',
|
'ftp' => 'FTP',
|
||||||
'mail' => 'Mail',
|
'mail' => 'Mail',
|
||||||
'nocustomers' => 'Es wird mindestens ein Kunde benötigt um die Traffic Statistiken anzuzeigen.',
|
'nocustomers' => 'Es wird mindestens ein Kunde benötigt um die Traffic Statistiken anzuzeigen.',
|
||||||
|
'top5customers' => 'Top 5 Kunden',
|
||||||
|
'nodata' => 'Keine Daten im angegebenen Zeitraum.',
|
||||||
|
'range' => [
|
||||||
|
'last24h' => 'die letzten 24 Std',
|
||||||
|
'last7d' => 'die letzten 7 Tage',
|
||||||
|
'last30d' => 'die letzten 30 Tage',
|
||||||
|
'cm' => 'Aktueller Monat',
|
||||||
|
'last3m' => 'die letzten 3 Monate',
|
||||||
|
'last6m' => 'die letzten 6 Monate',
|
||||||
|
'last12m' => 'die letzten 12 Monate',
|
||||||
|
'cy' => 'Aktuelles Jahr',
|
||||||
|
],
|
||||||
|
'byrange' => 'Nach angegebenem Zeitraum',
|
||||||
],
|
],
|
||||||
'translator' => '',
|
'translator' => '',
|
||||||
'update' => [
|
'update' => [
|
||||||
|
|||||||
@@ -2254,18 +2254,32 @@ Yours sincerely, your administrator',
|
|||||||
'total' => 'Total',
|
'total' => 'Total',
|
||||||
],
|
],
|
||||||
'mb' => 'Traffic',
|
'mb' => 'Traffic',
|
||||||
'distribution' => '<font color="#019522">FTP</font> | <font color="#0000FF">HTTP</font> | <font color="#800000">Mail</font>',
|
'sumtotal' => 'Total traffic',
|
||||||
'sumhttp' => 'Total HTTP-Traffic',
|
'sumhttp' => 'HTTP traffic',
|
||||||
'sumftp' => 'Total FTP-Traffic',
|
'sumftp' => 'FTP traffic',
|
||||||
'summail' => 'Total Mail-Traffic',
|
'summail' => 'Mail traffic',
|
||||||
'customer' => 'Customer',
|
'customer' => 'Customer',
|
||||||
'domain' => 'Domain',
|
'domain' => 'Domain',
|
||||||
'trafficoverview' => 'Traffic summary by',
|
'trafficoverview' => 'Traffic summary',
|
||||||
|
'bycustomers' => 'Traffic by customers',
|
||||||
'details' => 'Details',
|
'details' => 'Details',
|
||||||
'http' => 'HTTP',
|
'http' => 'HTTP',
|
||||||
'ftp' => 'FTP',
|
'ftp' => 'FTP',
|
||||||
'mail' => 'Mail',
|
'mail' => 'Mail',
|
||||||
'nocustomers' => 'You need at least one customer to view the traffic reports.',
|
'nocustomers' => 'You need at least one customer to view the traffic reports.',
|
||||||
|
'top5customers' => 'Top 5 customers',
|
||||||
|
'nodata' => 'No data for given range found.',
|
||||||
|
'range' => [
|
||||||
|
'last24h' => 'last 24 hours',
|
||||||
|
'last7d' => 'last 7 days',
|
||||||
|
'last30d' => 'last 30 days',
|
||||||
|
'cm' => 'Current month',
|
||||||
|
'last3m' => 'last 3 months',
|
||||||
|
'last6m' => 'last 6 months',
|
||||||
|
'last12m' => 'last 12 months',
|
||||||
|
'cy' => 'Current year',
|
||||||
|
],
|
||||||
|
'byrange' => 'Specified by range',
|
||||||
],
|
],
|
||||||
'translator' => '',
|
'translator' => '',
|
||||||
'update' => [
|
'update' => [
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
<!-- TODO: set url on change. e.g.: ?param=days:7 -->
|
<!-- TODO: set url on change. e.g.: ?param=days:7 -->
|
||||||
<div class="d-flex justify-content-center justify-content-md-end">
|
<div class="d-flex justify-content-center justify-content-md-end">
|
||||||
<select class="form-select mb-3 mb-md-4 w-auto mt-md-n4" aria-label="select the traffic range" name="range" data-baseref="{{ linker({'section':'traffic'}) }}">
|
<select class="form-select mb-3 mb-md-4 w-auto mt-md-n4" aria-label="select the traffic range" name="range" data-baseref="{{ linker({'section':'traffic'}) }}">
|
||||||
<option value="hours:24" {% if range == 'hours:24' %}selected{% endif %}>last 24 hours</option>
|
<option value="hours:24" {% if range == 'hours:24' %}selected{% endif %}>{{ lng('traffic.ranges.last24h') }}</option>
|
||||||
<option value="days:7" {% if range == 'days:7' %}selected{% endif %}>last 7 days</option>
|
<option value="days:7" {% if range == 'days:7' %}selected{% endif %}>{{ lng('traffic.ranges.last7d') }}</option>
|
||||||
<option value="days:30" {% if range == 'days:30' %}selected{% endif %}>last 30 days</option>
|
<option value="days:30" {% if range == 'days:30' %}selected{% endif %}>{{ lng('traffic.ranges.last30d') }}</option>
|
||||||
<option value="currentmonth" {% if range == 'currentmonth' %}selected{% endif %}>current month</option>
|
<option value="currentmonth" {% if range == 'currentmonth' %}selected{% endif %}>{{ lng('traffic.ranges.cm') }}</option>
|
||||||
<option value="months:3" {% if range == 'months:3' %}selected{% endif %}>last 3 months</option>
|
<option value="months:3" {% if range == 'months:3' %}selected{% endif %}>{{ lng('traffic.ranges.last3m') }}</option>
|
||||||
<option value="months:6" {% if range == 'months:6' %}selected{% endif %}>last 6 months</option>
|
<option value="months:6" {% if range == 'months:6' %}selected{% endif %}>{{ lng('traffic.ranges.last6m') }}</option>
|
||||||
<option value="months:12" {% if range == 'months:12' %}selected{% endif %}>last 12 months</option>
|
<option value="months:12" {% if range == 'months:12' %}selected{% endif %}>{{ lng('traffic.ranges.last12m') }}</option>
|
||||||
<option value="currentyear" {% if range == 'currentyear' %}selected{% endif %}>current year</option>
|
<option value="currentyear" {% if range == 'currentyear' %}selected{% endif %}>{{ lng('traffic.ranges.cy') }}</option>
|
||||||
{% for yd in years_avail %}
|
{% for yd in years_avail %}
|
||||||
{% if yd.year != "now"|date('Y') %}
|
{% if yd.year != "now"|date('Y') %}
|
||||||
<option value="year:{{ yd.year }}" {% if range == 'year:' ~ yd.year %}selected{% endif %}>{{ yd.year }}</option>
|
<option value="year:{{ yd.year }}" {% if range == 'year:' ~ yd.year %}selected{% endif %}>{{ yd.year }}</option>
|
||||||
@@ -50,37 +50,36 @@
|
|||||||
<div class="row row-cols-2 row-cols-md-4 g-0">
|
<div class="row row-cols-2 row-cols-md-4 g-0">
|
||||||
<div class="col p-3 border-end">
|
<div class="col p-3 border-end">
|
||||||
<h3>{{ metrics.total|formatBytes }}</h3>
|
<h3>{{ metrics.total|formatBytes }}</h3>
|
||||||
<span>Total</span>
|
<span>{{ lng('traffic.months.total') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3 border-end">
|
<div class="col p-3 border-end">
|
||||||
<h3>{{ metrics.http|formatBytes }}</h3>
|
<h3>{{ metrics.http|formatBytes }}</h3>
|
||||||
<span>HTTP</span>
|
<span>{{ lng('traffic.http') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3 border-end">
|
<div class="col p-3 border-end">
|
||||||
<h3>{{ metrics.ftp|formatBytes }}</h3>
|
<h3>{{ metrics.ftp|formatBytes }}</h3>
|
||||||
<span>FTP</span>
|
<span>{{ lng('traffic.ftp') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-3 border-end">
|
<div class="col p-3 border-end">
|
||||||
<h3>{{ metrics.mail|formatBytes }}</h3>
|
<h3>{{ metrics.mail|formatBytes }}</h3>
|
||||||
<span>Mail</span>
|
<span>{{ lng('traffic.mail') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if userinfo.adminsession == 1 %}
|
{% if userinfo.adminsession == 1 %}
|
||||||
<!-- Overview for given range by user -->
|
<!-- Overview for given range by user -->
|
||||||
<h4 class="page-header">Traffic by customers</h4>
|
<h4 class="page-header">{{ lng('traffic.bycustomers') }}</h4>
|
||||||
{% if users is not empty %}
|
{% if users is not empty %}
|
||||||
<div class="card table-responsive">
|
<div class="card table-responsive">
|
||||||
<table class="table table-borderless table-striped align-middle mb-0 px-3">
|
<table class="table table-borderless table-striped align-middle mb-0 px-3">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">{{ lng('login.username') }}</th>
|
<th scope="col">{{ lng('login.username') }}</th>
|
||||||
<th scope="col">Total</th>
|
<th scope="col">{{ lng('traffic.months.total') }}</th>
|
||||||
<th scope="col">HTTP</th>
|
<th scope="col">{{ lng('traffic.http') }}</th>
|
||||||
<th scope="col">FTP</th>
|
<th scope="col">{{ lng('traffic.ftp') }}</th>
|
||||||
<th scope="col">Mail
|
<th scope="col">{{ lng('traffic.mail') }}</th>
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -101,19 +100,19 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p>No data for given range found.</p>
|
<p>{{ lng('traffic.nodata') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const labelsS = ['HTTP', 'FTP', 'Mail'];
|
const labelsS = ['{{ lng('traffic.http') }}', '{{ lng('traffic.ftp') }}', '{{ lng('traffic.mail') }}'];
|
||||||
|
|
||||||
const dataS = {
|
const dataS = {
|
||||||
labels: labelsS,
|
labels: labelsS,
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Traffic summary',
|
label: '{{ lng('traffic.trafficoverview') }}',
|
||||||
backgroundColor: ['rgb(255, 99, 132)', 'rgb(200, 199, 132)', 'rgb(255, 99, 0)'],
|
backgroundColor: ['rgb(255, 99, 132)', 'rgb(200, 199, 132)', 'rgb(255, 99, 0)'],
|
||||||
data: [{value: '{{ metrics.http|default(0) }}', formatted: '{{ metrics.http|formatBytes }}'}, {value: '{{ metrics.ftp|default(0) }}', formatted: '{{ metrics.ftp|formatBytes }}'}, {value: '{{ metrics.mail|default(0) }}', formatted: '{{ metrics.mail|formatBytes }}'}]
|
data: [{value: '{{ metrics.http|default(0) }}', formatted: '{{ metrics.http|formatBytes }}'}, {value: '{{ metrics.ftp|default(0) }}', formatted: '{{ metrics.ftp|formatBytes }}'}, {value: '{{ metrics.mail|default(0) }}', formatted: '{{ metrics.mail|formatBytes }}'}]
|
||||||
}]
|
}]
|
||||||
@@ -130,7 +129,7 @@
|
|||||||
plugins: {
|
plugins: {
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'Total traffic'
|
text: '{{ lng('traffic.sumtotal') }}'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
position: 'right'
|
position: 'right'
|
||||||
@@ -161,7 +160,7 @@
|
|||||||
const dataC = {
|
const dataC = {
|
||||||
labels: labelsC,
|
labels: labelsC,
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Top 5 customers',
|
label: '{{ lng('traffic.top5customers') }}',
|
||||||
backgroundColor: ['rgb(255, 99, 132)', 'rgb(200, 199, 132)', 'rgb(255, 99, 0)', 'rgb(100, 100, 132)', 'rgb(240, 150, 232)'],
|
backgroundColor: ['rgb(255, 99, 132)', 'rgb(200, 199, 132)', 'rgb(255, 99, 0)', 'rgb(100, 100, 132)', 'rgb(240, 150, 232)'],
|
||||||
data: dataValues
|
data: dataValues
|
||||||
}]
|
}]
|
||||||
@@ -178,7 +177,7 @@
|
|||||||
plugins: {
|
plugins: {
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'Top 5 customers'
|
text: '{{ lng('traffic.top5customers') }}'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
position: 'right'
|
position: 'right'
|
||||||
@@ -220,7 +219,7 @@
|
|||||||
labels: labelsC,
|
labels: labelsC,
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
label: 'HTTP traffic',
|
label: '{{ lng('traffic.sumhttp') }}',
|
||||||
backgroundColor: 'rgb(255, 99, 132)',
|
backgroundColor: 'rgb(255, 99, 132)',
|
||||||
{% if range starts with 'days' or range == 'currentmonth' %}
|
{% if range starts with 'days' or range == 'currentmonth' %}
|
||||||
data: [{% for d,dd in days %}{value: '{{ dd.http|default(0) }}', formatted: '{{ dd.http|formatBytes }}', axisv: '{{ d }}'},{% endfor %}],
|
data: [{% for d,dd in days %}{value: '{{ dd.http|default(0) }}', formatted: '{{ dd.http|formatBytes }}', axisv: '{{ d }}'},{% endfor %}],
|
||||||
@@ -234,7 +233,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'FTP traffic',
|
label: '{{ lng('traffic.sumftp') }}',
|
||||||
backgroundColor: 'rgb(200, 199, 132)',
|
backgroundColor: 'rgb(200, 199, 132)',
|
||||||
{% if range starts with 'days' or range == 'currentmonth' %}
|
{% if range starts with 'days' or range == 'currentmonth' %}
|
||||||
data: [{% for d,dd in days %}{value: '{{ dd.ftp|default(0) }}', formatted: '{{ dd.ftp|formatBytes }}', axisv: '{{ d }}'},{% endfor %}],
|
data: [{% for d,dd in days %}{value: '{{ dd.ftp|default(0) }}', formatted: '{{ dd.ftp|formatBytes }}', axisv: '{{ d }}'},{% endfor %}],
|
||||||
@@ -248,7 +247,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Mail traffic',
|
label: '{{ lng('traffic.summail') }}',
|
||||||
backgroundColor: 'rgb(255, 99, 0)',
|
backgroundColor: 'rgb(255, 99, 0)',
|
||||||
{% if range starts with 'days' or range == 'currentmonth' %}
|
{% if range starts with 'days' or range == 'currentmonth' %}
|
||||||
data: [{% for d,dd in days %}{value: '{{ dd.mail|default(0) }}', formatted: '{{ dd.mail|formatBytes }}', axisv: '{{ d }}'},{% endfor %}],
|
data: [{% for d,dd in days %}{value: '{{ dd.mail|default(0) }}', formatted: '{{ dd.mail|formatBytes }}', axisv: '{{ d }}'},{% endfor %}],
|
||||||
@@ -283,7 +282,7 @@
|
|||||||
plugins: {
|
plugins: {
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'Specified by range'
|
text: '{{ lng('traffic.byrange') }}'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user