Always display two decimals in container memory tooltip

- Also removes --china-mirrors when copying brew install script
This commit is contained in:
henrygd
2025-04-27 19:18:44 -04:00
parent 17c8e7e1bd
commit 6280323cb1
2 changed files with 3 additions and 2 deletions

View File

@@ -77,7 +77,8 @@ function copyLinuxCommand(port = "45876", publicKey: string, brew = false) {
let cmd = `curl -sL https://get.beszel.dev${
brew ? "/brew" : ""
} -o /tmp/install-agent.sh && chmod +x /tmp/install-agent.sh && /tmp/install-agent.sh -p ${port} -k "${publicKey}"`
if ((i18n.locale + navigator.language).includes("zh-CN")) {
// brew script does not support --china-mirrors
if (!brew && (i18n.locale + navigator.language).includes("zh-CN")) {
cmd += ` --china-mirrors`
}
copyToClipboard(cmd)

View File

@@ -115,7 +115,7 @@ export default memo(function ContainerChart({
} else if (chartType === ChartType.Memory) {
obj.toolTipFormatter = (item: any) => {
const { v, u } = getSizeAndUnit(item.value, false)
return updateYAxisWidth(toFixedFloat(v, 2) + u)
return decimalString(v, 2) + u
}
} else {
obj.toolTipFormatter = (item: any) => decimalString(item.value) + unit