From 513d3bc3746ed3ab8a8456f38a33e40bf16de332 Mon Sep 17 00:00:00 2001 From: Ben S Date: Thu, 22 Nov 2018 10:59:04 +0100 Subject: [PATCH] gui: Display rate limit (fixes #5320) (#5328) Display rate limit for own device and connected devices --- gui/default/index.html | 37 ++++++++++++++++--- .../syncthing/device/editDeviceModalView.html | 20 +++++----- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/gui/default/index.html b/gui/default/index.html index 188d5af7..107d948c 100644 --- a/gui/default/index.html +++ b/gui/default/index.html @@ -551,7 +551,13 @@ {{connectionsTotal.inbps | binary}}B/s {{connectionsTotal.inbps*8 | metric}}bps - ({{connectionsTotal.inBytesTotal | binary}}B) + ({{connectionsTotal.inBytesTotal | binary}}B) +
+ Limit: + {{config.options.maxRecvKbps*1024 | binary}}B/s + {{config.options.maxRecvKbps*1024*8 | metric}}bps + +
@@ -562,6 +568,12 @@ {{connectionsTotal.outbps | binary}}B/s {{connectionsTotal.outbps*8 | metric}}bps ({{connectionsTotal.outBytesTotal | binary}}B) +
+ Limit: + {{config.options.maxSendKbps*1024 | binary}}B/s + {{config.options.maxSendKbps*1024*8 | metric}}bps + +
@@ -569,9 +581,10 @@  Local State (Total) -  {{localStateTotal.files | alwaysNumber | localeNumber}}  -  {{localStateTotal.directories| alwaysNumber | localeNumber}}  -  ~{{localStateTotal.bytes | binary}}B +  {{localStateTotal.files | alwaysNumber | localeNumber}}  +  {{localStateTotal.directories| alwaysNumber | localeNumber}}  +  ~{{localStateTotal.bytes | binary}}B + @@ -654,7 +667,13 @@ {{connections[deviceCfg.deviceID].inbps | binary}}B/s {{connections[deviceCfg.deviceID].inbps*8 | metric}}bps - ({{connections[deviceCfg.deviceID].inBytesTotal | binary}}B) + ({{connections[deviceCfg.deviceID].inBytesTotal | binary}}B) +
+ Limit: + {{deviceCfg.maxRecvKbps*1024 | binary}}B/s + {{deviceCfg.maxRecvKbps*1024*8 | metric}}bps + +
@@ -664,7 +683,13 @@ {{connections[deviceCfg.deviceID].outbps | binary}}B/s {{connections[deviceCfg.deviceID].outbps*8 | metric}}bps - ({{connections[deviceCfg.deviceID].outBytesTotal | binary}}B) + ({{connections[deviceCfg.deviceID].outBytesTotal | binary}}B) +
+ Limit: + {{deviceCfg.maxSendKbps*1024 | binary}}B/s + {{deviceCfg.maxSendKbps*1024*8 | metric}}bps + +
diff --git a/gui/default/syncthing/device/editDeviceModalView.html b/gui/default/syncthing/device/editDeviceModalView.html index 7cab6fd7..179be2b3 100644 --- a/gui/default/syncthing/device/editDeviceModalView.html +++ b/gui/default/syncthing/device/editDeviceModalView.html @@ -112,17 +112,6 @@
-
-
-
- Outgoing Rate Limit (KiB/s) -
- -
-
-

The rate limit must be a non-negative number (0: no limit)

-
-
Incoming Rate Limit (KiB/s) @@ -132,6 +121,15 @@

The rate limit must be a non-negative number (0: no limit)

+
+
+ Outgoing Rate Limit (KiB/s) +
+ +
+
+

The rate limit must be a non-negative number (0: no limit)

+