mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
Always display two decimals in container memory tooltip
- Also removes --china-mirrors when copying brew install script
This commit is contained in:
@@ -77,7 +77,8 @@ function copyLinuxCommand(port = "45876", publicKey: string, brew = false) {
|
|||||||
let cmd = `curl -sL https://get.beszel.dev${
|
let cmd = `curl -sL https://get.beszel.dev${
|
||||||
brew ? "/brew" : ""
|
brew ? "/brew" : ""
|
||||||
} -o /tmp/install-agent.sh && chmod +x /tmp/install-agent.sh && /tmp/install-agent.sh -p ${port} -k "${publicKey}"`
|
} -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`
|
cmd += ` --china-mirrors`
|
||||||
}
|
}
|
||||||
copyToClipboard(cmd)
|
copyToClipboard(cmd)
|
||||||
|
@@ -115,7 +115,7 @@ export default memo(function ContainerChart({
|
|||||||
} else if (chartType === ChartType.Memory) {
|
} else if (chartType === ChartType.Memory) {
|
||||||
obj.toolTipFormatter = (item: any) => {
|
obj.toolTipFormatter = (item: any) => {
|
||||||
const { v, u } = getSizeAndUnit(item.value, false)
|
const { v, u } = getSizeAndUnit(item.value, false)
|
||||||
return updateYAxisWidth(toFixedFloat(v, 2) + u)
|
return decimalString(v, 2) + u
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
obj.toolTipFormatter = (item: any) => decimalString(item.value) + unit
|
obj.toolTipFormatter = (item: any) => decimalString(item.value) + unit
|
||||||
|
Reference in New Issue
Block a user