fixed a formatting error and longhorn's usage bar

This commit is contained in:
James Wynn 2022-11-25 10:21:51 -06:00
parent a1f2003a77
commit c54374068d
2 changed files with 2 additions and 1 deletions

View File

@ -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 }) {

View File

@ -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 && (