Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
firmware
FFS Gluon
Commits
20f665b1
Unverified
Commit
20f665b1
authored
Jun 08, 2021
by
David Bauer
Committed by
GitHub
Jun 08, 2021
Browse files
Merge pull request #2217 from AiyionPrime/status_page_bandwidth_limit
gluon-status-page: add bandwidth limit
parents
278f6c3b
b973c8f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html
View file @
20f665b1
...
...
@@ -64,6 +64,16 @@
return
v
and
translate
('
enabled
')
or
translate
('
disabled
')
end
local
function
formatBits
(
bits
)
local
units =
{[0]='',
'
k
',
'
M
',
'
G
'}
local
pow =
math.floor(math.log(math.max(math.abs(bits),
1))
/
math.log
(1000))
local
known_pow =
math.min(pow,
#units
)
local
significand =
bits/(1000^known_pow)
return
string.format
('%
g
%
sbit
',
significand
,
units
[
known_pow
])
end
local
function
statistics
(
key
,
format
)
return
string.format
('<
span
data-statistics=
"%s"
data-format=
"%s"
></span>
', pcdata(key), pcdata(format or 'id'))
end
...
...
@@ -122,6 +132,17 @@
<br
/><
%|
nodeinfo.network.mesh_vpn.provider
%
>
<
%
-
end
%
>
</dd>
<
%
if
nodeinfo.network.mesh_vpn.bandwidth_limit.enabled
then
-
%
>
<dt><
%
:Bandwidth
limit
%
></dt>
<dd>
<
%
if
nodeinfo.network.mesh_vpn.bandwidth_limit.egress
then
-
%
>
▲
<
%|
formatBits
(
nodeinfo.network.mesh_vpn.bandwidth_limit.egress*1000
)
%
>
/s
<
%
:upstream
%
><br
/>
<
%
-
end
%
>
<
%
if
nodeinfo.network.mesh_vpn.bandwidth_limit.ingress
then
-
%
>
▼
<
%|
formatBits
(
nodeinfo.network.mesh_vpn.bandwidth_limit.ingress*1000
)
%
>
/s
<
%
:downstream
%
>
<
%
-
end
%
>
</dd>
<
%
-
end
%
>
<
%
-
end
%
>
<dt><
%
:Site
%
></dt><dd><
%|
site.site_name
()
%
></dd>
<
%
if
nodeinfo.system.domain_code
then
-
%
>
...
...
package/gluon-status-page/i18n/de.po
View file @
20f665b1
...
...
@@ -28,6 +28,9 @@ msgstr "1 Tag"
msgid "Automatic updates"
msgstr "Automatische Updates"
msgid "Bandwidth limit"
msgstr "Bandbreitenlimit"
msgid "Channel"
msgstr "Kanal"
...
...
@@ -43,6 +46,9 @@ msgstr "Entfernung"
msgid "Domain"
msgstr "Domäne"
msgid "downstream"
msgstr "Downstream"
msgid "Error"
msgstr "Fehler"
...
...
@@ -124,6 +130,9 @@ msgstr ""
msgid "Transmitted"
msgstr "Gesendet"
msgid "upstream"
msgstr "Upstream"
msgid "Uptime"
msgstr "Laufzeit"
...
...
package/gluon-status-page/i18n/fr.README
0 → 100644
View file @
20f665b1
Draft for french translation, taken from gluon-config-mode-mesh-vpn
msgid ""
msgstr ""
msgid "downstream"
msgstr "débit déscendant"
msgid "upstream"
msgstr "débit ascendant"
package/gluon-status-page/i18n/gluon-status-page.pot
View file @
20f665b1
...
...
@@ -19,6 +19,9 @@ msgstr ""
msgid "Automatic updates"
msgstr ""
msgid "Bandwidth limit"
msgstr ""
msgid "Channel"
msgstr ""
...
...
@@ -34,6 +37,9 @@ msgstr ""
msgid "Domain"
msgstr ""
msgid "downstream"
msgstr ""
msgid "Error"
msgstr ""
...
...
@@ -115,6 +121,9 @@ msgstr ""
msgid "Transmitted"
msgstr ""
msgid "upstream"
msgstr ""
msgid "Uptime"
msgstr ""
...
...
package/gluon-status-page/i18n/ru.README
View file @
20f665b1
...
...
@@ -10,6 +10,7 @@ if we ever add Russion to gluon-web, the following strings can be reused:
"Primary MAC": "Основной MAC",
"IP Address": "IP Адрес",
"Automatic updates": "Автоматические обновления",
"Bandwidth limit": "Ограничение пропускной способности",
"Overview": "Обзор",
"used": "используется",
"Uptime": "Время работы",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment