mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-12 13:10:05 +00:00
Add All Time Traffic Usage in inbounds page top banner
This commit is contained in:
parent
8b3650b756
commit
fffdc72c1e
14 changed files with 27 additions and 5 deletions
|
@ -167,28 +167,35 @@
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-card size="small" :style="{ padding: '16px' }" hoverable>
|
<a-card size="small" :style="{ padding: '16px' }" hoverable>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :sm="12" :md="6">
|
<a-col :sm="12" :md="5">
|
||||||
<a-custom-statistic title='{{ i18n "pages.inbounds.totalDownUp" }}' :value="`${SizeFormatter.sizeFormat(total.up)} / ${SizeFormatter.sizeFormat(total.down)}`">
|
<a-custom-statistic title='{{ i18n "pages.inbounds.totalDownUp" }}' :value="`${SizeFormatter.sizeFormat(total.up)} / ${SizeFormatter.sizeFormat(total.down)}`">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="swap"></a-icon>
|
<a-icon type="swap"></a-icon>
|
||||||
</template>
|
</template>
|
||||||
</a-custom-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="12" :md="6">
|
<a-col :sm="12" :md="5">
|
||||||
<a-custom-statistic title='{{ i18n "pages.inbounds.totalUsage" }}' :value="SizeFormatter.sizeFormat(total.up + total.down)" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-custom-statistic title='{{ i18n "pages.inbounds.totalUsage" }}' :value="SizeFormatter.sizeFormat(total.up + total.down)" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="pie-chart"></a-icon>
|
<a-icon type="pie-chart"></a-icon>
|
||||||
</template>
|
</template>
|
||||||
</a-custom-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="12" :md="6">
|
<a-col :sm="12" :md="5">
|
||||||
|
<a-custom-statistic title='{{ i18n "pages.inbounds.allTimeTrafficUsage" }}' :value="SizeFormatter.sizeFormat(total.allTime)" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
|
<template #prefix>
|
||||||
|
<a-icon type="history"></a-icon>
|
||||||
|
</template>
|
||||||
|
</a-custom-statistic>
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="12" :md="5">
|
||||||
<a-custom-statistic title='{{ i18n "pages.inbounds.inboundCount" }}' :value="dbInbounds.length" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-custom-statistic title='{{ i18n "pages.inbounds.inboundCount" }}' :value="dbInbounds.length" :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-icon type="bars"></a-icon>
|
<a-icon type="bars"></a-icon>
|
||||||
</template>
|
</template>
|
||||||
</a-custom-statistic>
|
</a-custom-statistic>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="12" :md="6">
|
<a-col :sm="12" :md="4">
|
||||||
<a-custom-statistic title='{{ i18n "clients" }}' value=" " :style="{ marginTop: isMobile ? '10px' : 0 }">
|
<a-custom-statistic title='{{ i18n "clients" }}' value=" " :style="{ marginTop: isMobile ? '10px' : 0 }">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-space direction="horizontal">
|
<a-space direction="horizontal">
|
||||||
|
@ -1621,11 +1628,12 @@
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
total() {
|
total() {
|
||||||
let down = 0, up = 0;
|
let down = 0, up = 0, allTime = 0;
|
||||||
let clients = 0, deactive = [], depleted = [], expiring = [];
|
let clients = 0, deactive = [], depleted = [], expiring = [];
|
||||||
this.dbInbounds.forEach(dbInbound => {
|
this.dbInbounds.forEach(dbInbound => {
|
||||||
down += dbInbound.down;
|
down += dbInbound.down;
|
||||||
up += dbInbound.up;
|
up += dbInbound.up;
|
||||||
|
allTime += (dbInbound.allTime || (dbInbound.up + dbInbound.down));
|
||||||
if (this.clientCount[dbInbound.id]) {
|
if (this.clientCount[dbInbound.id]) {
|
||||||
clients += this.clientCount[dbInbound.id].clients;
|
clients += this.clientCount[dbInbound.id].clients;
|
||||||
deactive = deactive.concat(this.clientCount[dbInbound.id].deactive);
|
deactive = deactive.concat(this.clientCount[dbInbound.id].deactive);
|
||||||
|
@ -1636,6 +1644,7 @@
|
||||||
return {
|
return {
|
||||||
down: down,
|
down: down,
|
||||||
up: up,
|
up: up,
|
||||||
|
allTime: allTime,
|
||||||
clients: clients,
|
clients: clients,
|
||||||
deactive: deactive,
|
deactive: deactive,
|
||||||
depleted: depleted,
|
depleted: depleted,
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "إجمالي حركة المرور"
|
"allTimeTraffic" = "إجمالي حركة المرور"
|
||||||
|
"allTimeTrafficUsage" = "إجمالي الاستخدام طوال الوقت"
|
||||||
"title" = "الإدخالات"
|
"title" = "الإدخالات"
|
||||||
"totalDownUp" = "إجمالي المرسل/المستقبل"
|
"totalDownUp" = "إجمالي المرسل/المستقبل"
|
||||||
"totalUsage" = "إجمالي الاستخدام"
|
"totalUsage" = "إجمالي الاستخدام"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "All-time Traffic"
|
"allTimeTraffic" = "All-time Traffic"
|
||||||
|
"allTimeTrafficUsage" = "All Time Total Usage"
|
||||||
"title" = "Inbounds"
|
"title" = "Inbounds"
|
||||||
"totalDownUp" = "Total Sent/Received"
|
"totalDownUp" = "Total Sent/Received"
|
||||||
"totalUsage" = "Total Usage"
|
"totalUsage" = "Total Usage"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Tráfico Total"
|
"allTimeTraffic" = "Tráfico Total"
|
||||||
|
"allTimeTrafficUsage" = "Uso total de todos los tiempos"
|
||||||
"title" = "Entradas"
|
"title" = "Entradas"
|
||||||
"totalDownUp" = "Subidas/Descargas Totales"
|
"totalDownUp" = "Subidas/Descargas Totales"
|
||||||
"totalUsage" = "Uso Total"
|
"totalUsage" = "Uso Total"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "کل ترافیک"
|
"allTimeTraffic" = "کل ترافیک"
|
||||||
|
"allTimeTrafficUsage" = "کل استفاده در تمام مدت"
|
||||||
"title" = "کاربران"
|
"title" = "کاربران"
|
||||||
"totalDownUp" = "دریافت/ارسال کل"
|
"totalDownUp" = "دریافت/ارسال کل"
|
||||||
"totalUsage" = "مصرف کل"
|
"totalUsage" = "مصرف کل"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Total Lalu Lintas"
|
"allTimeTraffic" = "Total Lalu Lintas"
|
||||||
|
"allTimeTrafficUsage" = "Total Penggunaan Sepanjang Waktu"
|
||||||
"title" = "Masuk"
|
"title" = "Masuk"
|
||||||
"totalDownUp" = "Total Terkirim/Diterima"
|
"totalDownUp" = "Total Terkirim/Diterima"
|
||||||
"totalUsage" = "Penggunaan Total"
|
"totalUsage" = "Penggunaan Total"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "総トラフィック"
|
"allTimeTraffic" = "総トラフィック"
|
||||||
|
"allTimeTrafficUsage" = "これまでの総使用量"
|
||||||
"title" = "インバウンド一覧"
|
"title" = "インバウンド一覧"
|
||||||
"totalDownUp" = "総アップロード / ダウンロード"
|
"totalDownUp" = "総アップロード / ダウンロード"
|
||||||
"totalUsage" = "総使用量"
|
"totalUsage" = "総使用量"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Tráfego Total"
|
"allTimeTraffic" = "Tráfego Total"
|
||||||
|
"allTimeTrafficUsage" = "Uso total de todos os tempos"
|
||||||
"title" = "Inbounds"
|
"title" = "Inbounds"
|
||||||
"totalDownUp" = "Total Enviado/Recebido"
|
"totalDownUp" = "Total Enviado/Recebido"
|
||||||
"totalUsage" = "Uso Total"
|
"totalUsage" = "Uso Total"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Общий трафик"
|
"allTimeTraffic" = "Общий трафик"
|
||||||
|
"allTimeTrafficUsage" = "Общее использование за все время"
|
||||||
"title" = "Инбаунды"
|
"title" = "Инбаунды"
|
||||||
"totalDownUp" = "Объем отправленного/полученного трафика"
|
"totalDownUp" = "Объем отправленного/полученного трафика"
|
||||||
"totalUsage" = "Всего трафика"
|
"totalUsage" = "Всего трафика"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Toplam Trafik"
|
"allTimeTraffic" = "Toplam Trafik"
|
||||||
|
"allTimeTrafficUsage" = "Tüm Zamanların Toplam Kullanımı"
|
||||||
"title" = "Gelenler"
|
"title" = "Gelenler"
|
||||||
"totalDownUp" = "Toplam Gönderilen/Alınan"
|
"totalDownUp" = "Toplam Gönderilen/Alınan"
|
||||||
"totalUsage" = "Toplam Kullanım"
|
"totalUsage" = "Toplam Kullanım"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Загальний трафік"
|
"allTimeTraffic" = "Загальний трафік"
|
||||||
|
"allTimeTrafficUsage" = "Загальне використання за весь час"
|
||||||
"title" = "Вхідні"
|
"title" = "Вхідні"
|
||||||
"totalDownUp" = "Всього надісланих/отриманих"
|
"totalDownUp" = "Всього надісланих/отриманих"
|
||||||
"totalUsage" = "Всього використанно"
|
"totalUsage" = "Всього використанно"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "Tổng Lưu Lượng"
|
"allTimeTraffic" = "Tổng Lưu Lượng"
|
||||||
|
"allTimeTrafficUsage" = "Tổng mức sử dụng mọi lúc"
|
||||||
"title" = "Điểm vào (Inbounds)"
|
"title" = "Điểm vào (Inbounds)"
|
||||||
"totalDownUp" = "Tổng tải lên/tải xuống"
|
"totalDownUp" = "Tổng tải lên/tải xuống"
|
||||||
"totalUsage" = "Tổng sử dụng"
|
"totalUsage" = "Tổng sử dụng"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "累计总流量"
|
"allTimeTraffic" = "累计总流量"
|
||||||
|
"allTimeTrafficUsage" = "所有时间总使用量"
|
||||||
"title" = "入站列表"
|
"title" = "入站列表"
|
||||||
"totalDownUp" = "总上传 / 下载"
|
"totalDownUp" = "总上传 / 下载"
|
||||||
"totalUsage" = "总用量"
|
"totalUsage" = "总用量"
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
|
|
||||||
[pages.inbounds]
|
[pages.inbounds]
|
||||||
"allTimeTraffic" = "累計總流量"
|
"allTimeTraffic" = "累計總流量"
|
||||||
|
"allTimeTrafficUsage" = "所有时间总使用量"
|
||||||
"title" = "入站列表"
|
"title" = "入站列表"
|
||||||
"totalDownUp" = "總上傳 / 下載"
|
"totalDownUp" = "總上傳 / 下載"
|
||||||
"totalUsage" = "總用量"
|
"totalUsage" = "總用量"
|
||||||
|
|
Loading…
Reference in a new issue