34 lines
942 B
TypeScript
34 lines
942 B
TypeScript
import { IconActivityHeartbeat, IconServerOff } from "@tabler/icons-react";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { optionsBuilder } from "../options";
|
|
|
|
export const { definition, componentLoader } = createWidgetDefinition("tracearr", {
|
|
icon: IconActivityHeartbeat,
|
|
refetchInterval: 5,
|
|
createOptions() {
|
|
return optionsBuilder.from((factory) => ({
|
|
showStreams: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
showStats: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
|
|
showRecentActivity: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
showViolations: factory.switch({
|
|
defaultValue: true,
|
|
}),
|
|
}));
|
|
},
|
|
supportedIntegrations: ["tracearr"],
|
|
errors: {
|
|
INTERNAL_SERVER_ERROR: {
|
|
icon: IconServerOff,
|
|
message: (t) => t("widget.tracearr.error.internalServerError"),
|
|
},
|
|
},
|
|
}).withDynamicImport(() => import("./component"));
|