diff --git a/src/components/widgets/unifi/unifi.jsx b/src/components/widgets/unifi_console/unifi_console.jsx similarity index 99% rename from src/components/widgets/unifi/unifi.jsx rename to src/components/widgets/unifi_console/unifi_console.jsx index ae7f1a7f3..7427bd23c 100644 --- a/src/components/widgets/unifi/unifi.jsx +++ b/src/components/widgets/unifi_console/unifi_console.jsx @@ -9,7 +9,7 @@ export default function Widget({ options }) { const { t } = useTranslation(); // eslint-disable-next-line no-param-reassign - options.type = "unifi"; + options.type = "unifi_console"; const { data: statsData, error: statsError } = useWidgetAPI(options, "stat/sites"); if (statsError || statsData?.error) { diff --git a/src/components/widgets/widget.jsx b/src/components/widgets/widget.jsx index fc5a72a53..ac5353eb9 100644 --- a/src/components/widgets/widget.jsx +++ b/src/components/widgets/widget.jsx @@ -10,7 +10,7 @@ const widgetMappings = { greeting: dynamic(() => import("components/widgets/greeting/greeting")), datetime: dynamic(() => import("components/widgets/datetime/datetime")), logo: dynamic(() => import("components/widgets/logo/logo"), { ssr: false }), - unifi: dynamic(() => import("components/widgets/unifi/unifi")), + unifi_console: dynamic(() => import("components/widgets/unifi_console/unifi_console")), }; export default function Widget({ widget }) { diff --git a/src/widgets/unifi/proxy.js b/src/widgets/unifi/proxy.js index 601e42421..60ef44035 100644 --- a/src/widgets/unifi/proxy.js +++ b/src/widgets/unifi/proxy.js @@ -17,11 +17,11 @@ async function getWidget(req) { const { group, service, type } = req.query; let widget = null; - if (type === "unifi") { + if (type === "unifi_console") { const settings = getSettings(); - widget = settings.unifi; + widget = settings.unifi_console; if (!widget) { - logger.debug("There is no unifi section in settings.yaml"); + logger.debug("There is no unifi_console section in settings.yaml"); return null; } widget.type = "unifi"; diff --git a/src/widgets/widgets.js b/src/widgets/widgets.js index c922a9458..a4cab76b0 100644 --- a/src/widgets/widgets.js +++ b/src/widgets/widgets.js @@ -61,6 +61,7 @@ const widgets = { traefik, transmission, unifi, + unifi_console: unifi }; export default widgets;