24 lines
866 B
TypeScript
24 lines
866 B
TypeScript
import { IconBuildingBroadcastTower, IconServerOff } from "@tabler/icons-react";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { optionsBuilder } from "../options";
|
|
|
|
export const { definition, componentLoader } = createWidgetDefinition("unifiSiteManager", {
|
|
icon: IconBuildingBroadcastTower,
|
|
supportedIntegrations: ["unifiSiteManager"],
|
|
integrationsRequired: true,
|
|
refetchInterval: 300,
|
|
createOptions() {
|
|
return optionsBuilder.from((factory) => ({
|
|
showIsp: factory.switch({ defaultValue: true, withDescription: true }),
|
|
showExternalIp: factory.switch({ defaultValue: true, withDescription: true }),
|
|
}));
|
|
},
|
|
errors: {
|
|
INTERNAL_SERVER_ERROR: {
|
|
icon: IconServerOff,
|
|
message: (t) => t("widget.unifiSiteManager.error.internalServerError"),
|
|
},
|
|
},
|
|
}).withDynamicImport(() => import("./component"));
|