Revert "Rename unifi_console info widget to unifi"

pull/341/head
Michael Shamoon 2 years ago
parent fbac27f504
commit 69c9a449b1

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

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

@ -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";

@ -61,6 +61,7 @@ const widgets = {
traefik,
transmission,
unifi,
unifi_console: unifi
};
export default widgets;

Loading…
Cancel
Save