Skip to content

Commit

Permalink
fixed a formatting error and longhorn's usage bar
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswynn committed Nov 25, 2022
1 parent a1f2003 commit c543740
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/widgets/kubernetes/kubernetes.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import useSWR from "swr";
import { BiError } from "react-icons/bi";
import { useTranslation } from "next-i18next";

import Node from "./node";

export default function Widget({ options }) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/longhorn/node.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Node({ data, expanded, labels }) {
<div className="pr-1">{t("resources.total")}</div>
</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>
{labels && (
Expand Down

0 comments on commit c543740

Please sign in to comment.