fix(ops): use adaptive byte units for memory usage display#3987
Open
feitianbubu wants to merge 1 commit into
Open
fix(ops): use adaptive byte units for memory usage display#3987feitianbubu wants to merge 1 commit into
feitianbubu wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
运维仪表盘的内存卡片一直用
formatNumber格式化 MB 数值,中文环境下超过一万会缩写成"万",32G 内存的机器就显示成6,514 / 3.2万 MB,中文数量级混着英文存储单位,看着很别扭。改用项目里已有的
formatBytes自动换算单位,现在显示6.4 GB / 32 GB,小内存机器仍然会显示 MB。优化前:

优化后:
