mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-12 07:58:49 +00:00
Run pre-commit hooks over existing codebase
Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
parent
fa50bbad9c
commit
19c25713c4
387 changed files with 4785 additions and 4109 deletions
|
@ -13,29 +13,40 @@ export default function Cpu({ expanded, refresh = 1500 }) {
|
|||
});
|
||||
|
||||
if (error || data?.error) {
|
||||
return <Error />
|
||||
return <Error />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <Resource icon={FiCpu} value="-" label={t("resources.cpu")} expandedValue="-"
|
||||
expandedLabel={t("resources.load")} percentage="0" expanded={expanded} />
|
||||
return (
|
||||
<Resource
|
||||
icon={FiCpu}
|
||||
value="-"
|
||||
label={t("resources.cpu")}
|
||||
expandedValue="-"
|
||||
expandedLabel={t("resources.load")}
|
||||
percentage="0"
|
||||
expanded={expanded}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <Resource
|
||||
icon={FiCpu}
|
||||
value={t("common.number", {
|
||||
value: data.cpu.usage,
|
||||
style: "unit",
|
||||
unit: "percent",
|
||||
maximumFractionDigits: 0,
|
||||
})}
|
||||
label={t("resources.cpu")}
|
||||
expandedValue={t("common.number", {
|
||||
value: data.cpu.load,
|
||||
maximumFractionDigits: 2,
|
||||
})}
|
||||
expandedLabel={t("resources.load")}
|
||||
percentage={data.cpu.usage}
|
||||
expanded={expanded}
|
||||
/>
|
||||
return (
|
||||
<Resource
|
||||
icon={FiCpu}
|
||||
value={t("common.number", {
|
||||
value: data.cpu.usage,
|
||||
style: "unit",
|
||||
unit: "percent",
|
||||
maximumFractionDigits: 0,
|
||||
})}
|
||||
label={t("resources.cpu")}
|
||||
expandedValue={t("common.number", {
|
||||
value: data.cpu.load,
|
||||
maximumFractionDigits: 2,
|
||||
})}
|
||||
expandedLabel={t("resources.load")}
|
||||
percentage={data.cpu.usage}
|
||||
expanded={expanded}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue