Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-05-25 15:43:54 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-05-25 15:43:54 +0300
commit6a7c3716ac6bcc0199ed64dc20c7443260d1ee0b (patch)
treedb81fb4a6d56cf86abe3028581fa9d25d18d2c0f /web
parent15211f81b1cfa370c94bd8f5af154a1ec0b828f2 (diff)
fix MHz view
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/util/common.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js
index d35c5208..563bfd45 100644
--- a/web/assets/js/util/common.js
+++ b/web/assets/js/util/common.js
@@ -23,8 +23,12 @@ function sizeFormat(size) {
}
function cpuSpeedFormat(speed) {
- const GHz = speed / 1000;
- return GHz.toFixed(2) + " GHz";
+ if (speed > 1000) {
+ const GHz = speed / 1000;
+ return GHz.toFixed(2) + " GHz";
+ } else {
+ return speed.toFixed(2) + " MHz";
+ }
}
function cpuCoreFormat(cores) {