mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 06:48:47 +00:00
fixed a formatting error and longhorn's usage bar
This commit is contained in:
parent
a1f2003a77
commit
c54374068d
2 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { BiError } from "react-icons/bi";
|
import { BiError } from "react-icons/bi";
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import Node from "./node";
|
import Node from "./node";
|
||||||
|
|
||||||
export default function Widget({ options }) {
|
export default function Widget({ options }) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ export default function Node({ data, expanded, labels }) {
|
||||||
<div className="pr-1">{t("resources.total")}</div>
|
<div className="pr-1">{t("resources.total")}</div>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<UsageBar percent={Math.round((data.node.available / data.node.maximum) * 100)} />
|
<UsageBar percent={Math.round(((data.node.maximum - data.node.available) / data.node.maximum) * 100)} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{labels && (
|
{labels && (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue