Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/framework

go 1.26.1
go 1.26.2

require (
cloud.google.com/go/storage v1.61.3
Expand Down
2 changes: 1 addition & 1 deletion plugins/compat/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/compat

go 1.26.1
go 1.26.2

require (
github.com/maximhq/bifrost/core v1.5.2
Expand Down
2 changes: 1 addition & 1 deletion plugins/governance/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/governance

go 1.26.1
go 1.26.2

require gorm.io/gorm v1.31.1

Expand Down
2 changes: 1 addition & 1 deletion plugins/jsonparser/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/jsonparser

go 1.26.1
go 1.26.2

require github.com/maximhq/bifrost/core v1.5.2

Expand Down
2 changes: 1 addition & 1 deletion plugins/logging/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/logging

go 1.26.1
go 1.26.2

require (
github.com/bytedance/sonic v1.15.0
Expand Down
2 changes: 1 addition & 1 deletion plugins/maxim/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/maxim

go 1.26.1
go 1.26.2

require (
github.com/maximhq/bifrost/core v1.5.2
Expand Down
2 changes: 1 addition & 1 deletion plugins/mocker/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/mocker

go 1.26.1
go 1.26.2

require (
github.com/jaswdr/faker/v2 v2.8.0
Expand Down
2 changes: 1 addition & 1 deletion plugins/otel/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/otel

go 1.26.1
go 1.26.2

require (
github.com/maximhq/bifrost/core v1.5.2
Expand Down
2 changes: 1 addition & 1 deletion plugins/semanticcache/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/semanticcache

go 1.26.1
go 1.26.2

require (
github.com/cespare/xxhash/v2 v2.3.0
Expand Down
2 changes: 1 addition & 1 deletion plugins/telemetry/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/plugins/telemetry

go 1.26.1
go 1.26.2

require (
github.com/maximhq/bifrost/core v1.5.2
Expand Down
2 changes: 1 addition & 1 deletion transports/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/maximhq/bifrost/transports

go 1.26.1
go 1.26.2

require (
github.com/andybalholm/brotli v1.2.0
Expand Down
101 changes: 62 additions & 39 deletions ui/app/workspace/dashboard/components/charts/chartCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,68 @@ import { cn } from "@/lib/utils";
import type { ReactNode } from "react";

interface ChartCardProps {
title: string;
children: ReactNode;
headerActions?: ReactNode;
loading?: boolean;
testId?: string;
height?: string;
className?: string;
title: string;
children: ReactNode;
headerActions?: ReactNode;
loading?: boolean;
testId?: string;
height?: string;
className?: string;
}

export function ChartCard({ title, children, headerActions, loading, testId, height = "200px", className }: ChartCardProps) {
if (loading) {
return (
<Card className={cn("min-w-0 rounded-sm p-2 shadow-none", className)} data-testid={testId}>
<div className="mb-2 space-y-2">
<span className="text-primary pl-2 text-sm font-medium">{title}</span>
{headerActions && (
<div className="w-full min-w-0" data-testid={testId ? `${testId}-actions` : undefined}>
{headerActions}
</div>
)}
</div>
<div style={{ height }} data-testid={testId ? `${testId}-chart-skeleton` : undefined}>
<Skeleton className="h-full w-full" />
</div>
</Card>
);
}
export function ChartCard({
title,
children,
headerActions,
loading,
testId,
height = "200px",
className,
}: ChartCardProps) {
if (loading) {
return (
<Card
className={cn("min-w-0 rounded-sm p-2 shadow-none", className)}
data-testid={testId}
>
<div className="mb-2 space-y-2">
<span className="text-primary pl-2 text-sm font-medium">{title}</span>
{headerActions && (
<div
className="w-full min-w-0"
data-testid={testId ? `${testId}-actions` : undefined}
>
{headerActions}
</div>
)}
</div>
<div
style={{ height }}
data-testid={testId ? `${testId}-chart-skeleton` : undefined}
>
<Skeleton className="h-full w-full" />
</div>
</Card>
);
}

return (
<Card className={cn("min-w-0 rounded-sm p-2 shadow-none", className)} data-testid={testId}>
<div className="mb-2 space-y-2">
<span className="text-primary pl-2 text-sm font-medium">{title}</span>
{headerActions && (
<div className="w-full min-w-0" data-testid={testId ? `${testId}-actions` : undefined}>
{headerActions}
</div>
)}
</div>
<div style={{ height }}>{children}</div>
</Card>
);
}
return (
<Card
className={cn("min-w-0 rounded-sm p-2 shadow-none", className)}
data-testid={testId}
>
<div className="mb-2 space-y-2">
<span className="text-primary pl-2 text-sm font-medium">{title}</span>
{headerActions && (
<div
className="w-full min-w-0"
data-testid={testId ? `${testId}-actions` : undefined}
>
{headerActions}
</div>
)}
</div>
<div style={{ height }}>{children}</div>
</Card>
);
}
Loading
Loading