Separated kubernetes widgets from resources widgets

This commit is contained in:
James Wynn 2022-11-18 18:02:23 -06:00
parent 056e26dfd3
commit fdb143304f
9 changed files with 200 additions and 46 deletions

View file

@ -5,10 +5,10 @@ import { useTranslation } from "next-i18next";
import UsageBar from "./usage-bar";
export default function Disk({ options, expanded, backend }) {
export default function Disk({ options, expanded }) {
const { t } = useTranslation();
const { data, error } = useSWR(`/api/widgets/${backend || 'resources'}?type=disk&target=${options.disk}`, {
const { data, error } = useSWR(`/api/widgets/resources?type=disk&target=${options.disk}`, {
refreshInterval: 1500,
});