Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

1003 B
Raw Blame
import { IconBrandDocker } from "@tabler/icons-react";

import { getWidgetIntegrationConfig } from "@homarr/definitions";

import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";

export const { definition, componentLoader } = createWidgetDefinition("wud", {
  icon: IconBrandDocker,
  supportsAdvancedFocus: true,
  refetchInterval: null,
  ...getWidgetIntegrationConfig("wud"),
  createOptions() {
    return optionsBuilder.from((factory) => ({
      showTitle: factory.switch({ defaultValue: true }),
      showRing: factory.switch({ defaultValue: true }),
      layout: factory.select({
        options: (["horizontal", "vertical"] as const).map((value) => ({
          value,
          label: (t) => t(`widget.common.layout.option.${value}`),
        })),
        defaultValue: "horizontal",
      }),
      showUpdateList: factory.switch({ defaultValue: false, withDescription: true }),
    }));
  },
}).withDynamicImport(() => import("./component"));