From 6a7c3716ac6bcc0199ed64dc20c7443260d1ee0b Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Thu, 25 May 2023 16:13:54 +0330 Subject: [PATCH] fix MHz view --- web/assets/js/util/common.js | 8 ++++++-- 1 file 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) {