diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-25 15:43:54 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-25 15:43:54 +0300 |
| commit | 6a7c3716ac6bcc0199ed64dc20c7443260d1ee0b (patch) | |
| tree | db81fb4a6d56cf86abe3028581fa9d25d18d2c0f /web | |
| parent | 15211f81b1cfa370c94bd8f5af154a1ec0b828f2 (diff) | |
fix MHz view
Diffstat (limited to 'web')
| -rw-r--r-- | web/assets/js/util/common.js | 8 |
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) { |
