diff --git a/web/src/components/DevicesDataTable.vue b/web/src/components/DevicesDataTable.vue
new file mode 100644
index 0000000..d68a6ec
--- /dev/null
+++ b/web/src/components/DevicesDataTable.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+ {{ user.displayName }} ({{ user.sAMAccountName }})
+
+ Não logado
+
+
+
+ {{ uptime | durationFromSeconds }}
+
+
+
+
+
+
+ {{ signalStrengthIcon(signalStrength) }}
+
+ {{ signalStrength }}
+ dBm
+
+
+
+
+ mdi-signal-off
+ Aguarde...
+
+
+
+
+
+ {{ speed }} Mbps
+
+
+
+ {{ usage | bytes }}
+
+
+
+ {{ protocol }}
+ -
+
+
+
+ {{ frequency || '-' }}
+
+
+
+
+
+
+
+
diff --git a/web/src/plugins/format-bytes.js b/web/src/plugins/format-bytes.js
index 0ab0cc8..56ff355 100644
--- a/web/src/plugins/format-bytes.js
+++ b/web/src/plugins/format-bytes.js
@@ -16,11 +16,14 @@ function bytes(bytes, kib, maxUnit) {
const sizes = kib
? ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB', 'BiB']
: ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB', 'BB']
- var i = Math.floor(Math.log(bytes) / Math.log(k))
+
+ let i = Math.floor(Math.log(bytes) / Math.log(k))
+
if (maxUnit != undefined) {
const index = sizes.indexOf(maxUnit)
if (index != -1) i = index
}
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)) + ' ' + sizes[i]
}
diff --git a/web/src/views/AccessPoints/clients.vue b/web/src/views/AccessPoints/clients.vue
index ed994b0..d0da5cc 100644
--- a/web/src/views/AccessPoints/clients.vue
+++ b/web/src/views/AccessPoints/clients.vue
@@ -41,70 +41,10 @@
-
-
-
-
- {{ user.displayName }} ({{ user.sAMAccountName }})
-
- Não logado
-
-
-
- {{ uptime | durationFromSeconds }}
-
-
-
-
-
-
- {{ signalStrengthIcon(signalStrength) }}
-
- {{ signalStrength }}
- dBm
-
-
-
-
- mdi-signal-off
- Aguarde...
-
-
-
-
-
- {{ speed }} Mbps
-
-
-
- {{ usage | bytes }}
-
-
-
- {{ protocol }}
- -
-
-
-
- {{ frequency || '-' }}
-
-
+
@@ -122,28 +62,16 @@