mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-01 13:09:31 +01:00
Revert "Rename unifi_console info widget to unifi"
This commit is contained in:
parent
fbac27f504
commit
69c9a449b1
@ -9,7 +9,7 @@ export default function Widget({ options }) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
options.type = "unifi";
|
options.type = "unifi_console";
|
||||||
const { data: statsData, error: statsError } = useWidgetAPI(options, "stat/sites");
|
const { data: statsData, error: statsError } = useWidgetAPI(options, "stat/sites");
|
||||||
|
|
||||||
if (statsError || statsData?.error) {
|
if (statsError || statsData?.error) {
|
@ -10,7 +10,7 @@ const widgetMappings = {
|
|||||||
greeting: dynamic(() => import("components/widgets/greeting/greeting")),
|
greeting: dynamic(() => import("components/widgets/greeting/greeting")),
|
||||||
datetime: dynamic(() => import("components/widgets/datetime/datetime")),
|
datetime: dynamic(() => import("components/widgets/datetime/datetime")),
|
||||||
logo: dynamic(() => import("components/widgets/logo/logo"), { ssr: false }),
|
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 }) {
|
export default function Widget({ widget }) {
|
||||||
|
@ -17,11 +17,11 @@ async function getWidget(req) {
|
|||||||
const { group, service, type } = req.query;
|
const { group, service, type } = req.query;
|
||||||
|
|
||||||
let widget = null;
|
let widget = null;
|
||||||
if (type === "unifi") {
|
if (type === "unifi_console") {
|
||||||
const settings = getSettings();
|
const settings = getSettings();
|
||||||
widget = settings.unifi;
|
widget = settings.unifi_console;
|
||||||
if (!widget) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
widget.type = "unifi";
|
widget.type = "unifi";
|
||||||
|
@ -61,6 +61,7 @@ const widgets = {
|
|||||||
traefik,
|
traefik,
|
||||||
transmission,
|
transmission,
|
||||||
unifi,
|
unifi,
|
||||||
|
unifi_console: unifi
|
||||||
};
|
};
|
||||||
|
|
||||||
export default widgets;
|
export default widgets;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user