Browse Source

fix MHz view

MHSanaei 1 year ago
parent
commit
6a7c3716ac
1 changed files with 6 additions and 2 deletions
  1. 6 2
      web/assets/js/util/common.js

+ 6 - 2
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) {