style(widgets): apply formatter to widget runtime files
This commit is contained in:
@@ -29,11 +29,7 @@ export function GrafanaLinkWidget({ widget }: Props) {
|
||||
</Alert>
|
||||
) : url ? (
|
||||
<Button asChild>
|
||||
<a
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<a href={url} target="_blank" rel="noopener noreferrer">
|
||||
Open Grafana
|
||||
<ExternalLink className="ml-2 h-4 w-4" />
|
||||
</a>
|
||||
|
||||
@@ -40,9 +40,7 @@ export function SshTaskWidget({ widget }: Props) {
|
||||
Exit status:{" "}
|
||||
<span
|
||||
className={
|
||||
result.exit_status === 0
|
||||
? "text-green-600"
|
||||
: "text-destructive"
|
||||
result.exit_status === 0 ? "text-green-600" : "text-destructive"
|
||||
}
|
||||
>
|
||||
{result.exit_status}
|
||||
|
||||
@@ -4,5 +4,9 @@ export { JellyfinWidget } from "./JellyfinWidget";
|
||||
export { PrometheusMetricWidget } from "./PrometheusMetricWidget";
|
||||
export { SshTaskWidget } from "./SshTaskWidget";
|
||||
export { StaticWidget } from "./StaticWidget";
|
||||
export { getWidgetDefinition, listWidgetTypes, WIDGET_REGISTRY } from "./registry";
|
||||
export {
|
||||
getWidgetDefinition,
|
||||
listWidgetTypes,
|
||||
WIDGET_REGISTRY,
|
||||
} from "./registry";
|
||||
export type { WidgetConfigField, WidgetDefinition } from "./registry";
|
||||
|
||||
@@ -84,9 +84,7 @@ export const WIDGET_REGISTRY: Record<string, WidgetDefinition> = {
|
||||
sourceType: "prometheus",
|
||||
refreshInterval: 30_000,
|
||||
defaultConfig: { promql: "" },
|
||||
configFields: [
|
||||
{ key: "promql", label: "PromQL query", type: "string" },
|
||||
],
|
||||
configFields: [{ key: "promql", label: "PromQL query", type: "string" }],
|
||||
component: PrometheusMetricWidget,
|
||||
},
|
||||
"ssh-task": {
|
||||
@@ -97,9 +95,7 @@ export const WIDGET_REGISTRY: Record<string, WidgetDefinition> = {
|
||||
sourceType: "ssh_task",
|
||||
refreshInterval: 0,
|
||||
defaultConfig: { task_id: "" },
|
||||
configFields: [
|
||||
{ key: "task_id", label: "Saved task ID", type: "string" },
|
||||
],
|
||||
configFields: [{ key: "task_id", label: "Saved task ID", type: "string" }],
|
||||
component: SshTaskWidget,
|
||||
},
|
||||
static: {
|
||||
|
||||
Reference in New Issue
Block a user