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
16 changes: 6 additions & 10 deletions src/app/(dashboard)/alerts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import {
} from "@/components/ui/select";
import { ConfirmDialog } from "@/components/confirm-dialog";
import { Separator } from "@/components/ui/separator";
import { PageHeader } from "@/components/page-header";
import { isEventMetric } from "@/lib/alert-metrics";

// ─── Constants ──────────────────────────────────────────────────────────────────
Expand Down Expand Up @@ -308,15 +307,12 @@ function AlertRulesSection({ environmentId }: { environmentId: string }) {

return (
<div className="space-y-4">
<PageHeader
title="Alerts"
actions={
<Button size="sm" onClick={openCreate}>
<Plus className="mr-2 h-4 w-4" />
Add Rule
</Button>
}
/>
<div className="flex items-center justify-end">
<Button size="sm" onClick={openCreate}>
<Plus className="mr-2 h-4 w-4" />
Add Rule
</Button>
</div>

{rulesQuery.isLoading ? (
<div className="space-y-3">
Expand Down
43 changes: 19 additions & 24 deletions src/app/(dashboard)/analytics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { useEnvironmentStore } from "@/stores/environment-store";
import { formatBytes, formatTimeAxis } from "@/lib/format";
import { cn } from "@/lib/utils";
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
import { PageHeader } from "@/components/page-header";

type VolumeRange = "1h" | "6h" | "1d" | "7d" | "30d";

Expand Down Expand Up @@ -150,7 +149,6 @@ export default function AnalyticsPage() {
if (!selectedEnvironmentId) {
return (
<div className="space-y-6">
<PageHeader title="Analytics" />
<div className="flex flex-col items-center justify-center rounded-lg border border-dashed p-12 text-center">
<p className="text-muted-foreground">
Select an environment to view analytics.
Expand All @@ -162,28 +160,25 @@ export default function AnalyticsPage() {

return (
<div className="space-y-6">
<PageHeader
title="Analytics"
actions={
<div className="flex items-center gap-1">
{(["1h", "6h", "1d", "7d", "30d"] as const).map((v) => (
<button
key={v}
type="button"
onClick={() => setRange(v)}
className={cn(
"rounded-full px-3 h-7 text-xs font-medium border transition-colors",
range === v
? "bg-accent text-accent-foreground border-transparent"
: "bg-transparent text-muted-foreground border-border hover:bg-muted",
)}
>
{v}
</button>
))}
</div>
}
/>
<div className="flex items-center justify-end">
<div className="flex items-center gap-1">
{(["1h", "6h", "1d", "7d", "30d"] as const).map((v) => (
<button
key={v}
type="button"
onClick={() => setRange(v)}
className={cn(
"rounded-full px-3 h-7 text-xs font-medium border transition-colors",
range === v
? "bg-accent text-accent-foreground border-transparent"
: "bg-transparent text-muted-foreground border-border hover:bg-muted",
)}
>
{v}
</button>
))}
</div>
</div>

{/* KPI Cards */}
<div className="grid gap-4 md:grid-cols-4">
Expand Down
2 changes: 0 additions & 2 deletions src/app/(dashboard)/audit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
SelectValue,
} from "@/components/ui/select";
import { Skeleton } from "@/components/ui/skeleton";
import { PageHeader } from "@/components/page-header";
import { useTeamStore } from "@/stores/team-store";

const ALL_VALUE = "__all__";
Expand Down Expand Up @@ -141,7 +140,6 @@ export default function AuditPage() {

return (
<div className="space-y-6">
<PageHeader title="Audit Log" />
{/* Filter bar */}
<Card>
<CardHeader className="pb-3">
Expand Down
20 changes: 8 additions & 12 deletions src/app/(dashboard)/environments/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
TableRow,
} from "@/components/ui/table";
import { Skeleton } from "@/components/ui/skeleton";
import { PageHeader } from "@/components/page-header";

export default function EnvironmentsPage() {
const trpc = useTRPC();
Expand All @@ -35,17 +34,14 @@ export default function EnvironmentsPage() {

return (
<div className="space-y-4">
<PageHeader
title="Environments"
actions={
<Button asChild size="sm">
<Link href="/environments/new">
<Plus className="mr-1.5 h-3.5 w-3.5" />
New Environment
</Link>
</Button>
}
/>
<div className="flex items-center justify-end">
<Button asChild size="sm">
<Link href="/environments/new">
<Plus className="mr-1.5 h-3.5 w-3.5" />
New Environment
</Link>
</Button>
</div>
{isLoading ? (
<div className="space-y-3">
{Array.from({ length: 3 }).map((_, i) => (
Expand Down
2 changes: 0 additions & 2 deletions src/app/(dashboard)/fleet/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { DeploymentMatrix } from "@/components/fleet/deployment-matrix";
import { formatLastSeen } from "@/lib/format";
import { nodeStatusVariant, nodeStatusLabel } from "@/lib/status";
import { isVersionOlder } from "@/lib/version";
import { PageHeader } from "@/components/page-header";
import { toast } from "sonner";

const AGENT_REPO = "TerrifiedBug/vectorflow";
Expand Down Expand Up @@ -117,7 +116,6 @@ export default function FleetPage() {

return (
<div className="space-y-6">
<PageHeader title="Fleet" />
{isLoading ? (
<div className="space-y-3">
{Array.from({ length: 3 }).map((_, i) => (
Expand Down
17 changes: 6 additions & 11 deletions src/app/(dashboard)/library/shared-components/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import { Input } from "@/components/ui/input";
import { Skeleton } from "@/components/ui/skeleton";
import { PageHeader } from "@/components/page-header";
import {
Card,
CardContent,
Expand Down Expand Up @@ -108,7 +107,6 @@ export default function SharedComponentsPage() {
if (!selectedEnvironmentId) {
return (
<div className="space-y-8">
<PageHeader title="Shared Components" />
<div className="rounded-lg border border-dashed p-4 text-center text-sm text-muted-foreground">
Select an environment from the header to view shared components
</div>
Expand All @@ -118,15 +116,12 @@ export default function SharedComponentsPage() {

return (
<div className="space-y-6">
<PageHeader
title="Shared Components"
actions={
<Button onClick={() => router.push("/library/shared-components/new")}>
<Plus className="mr-2 h-4 w-4" />
New Shared Component
</Button>
}
/>
<div className="flex items-center justify-end">
<Button onClick={() => router.push("/library/shared-components/new")}>
<Plus className="mr-2 h-4 w-4" />
New Shared Component
</Button>
</div>

{/* Search */}
<div className="relative max-w-sm">
Expand Down
2 changes: 0 additions & 2 deletions src/app/(dashboard)/library/templates/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
} from "@/components/ui/card";
import { Skeleton } from "@/components/ui/skeleton";
import { ConfirmDialog } from "@/components/confirm-dialog";
import { PageHeader } from "@/components/page-header";

/* ------------------------------------------------------------------ */
/* Category icon mapping */
Expand Down Expand Up @@ -180,7 +179,6 @@ export default function TemplatesPage() {

return (
<div className="space-y-8">
<PageHeader title="Templates" />
{/* Environment notice */}
{!selectedEnvironmentId && (
<div className="rounded-lg border border-dashed p-4 text-center text-sm text-muted-foreground">
Expand Down
2 changes: 0 additions & 2 deletions src/app/(dashboard)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { MetricChart } from "@/components/dashboard/metric-chart";
import { ViewBuilderDialog } from "@/components/dashboard/view-builder-dialog";
import { CustomView } from "@/components/dashboard/custom-view";
import { formatSI, formatBytesRate, formatEventsRate, formatLatency } from "@/lib/format";
import { PageHeader } from "@/components/page-header";
import { cn } from "@/lib/utils";

/** Derive an overall status for a pipeline from its node statuses */
Expand Down Expand Up @@ -134,7 +133,6 @@ export default function DashboardPage() {

return (
<div className="space-y-6">
<PageHeader title="Dashboard" />
{/* ── Tab Bar ────────────────────────────────────────────── */}
<div className="flex items-center gap-1 border-b px-1 overflow-x-auto">
<button
Expand Down
20 changes: 8 additions & 12 deletions src/app/(dashboard)/pipelines/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import { ConfirmDialog } from "@/components/confirm-dialog";
import { PromotePipelineDialog } from "@/components/promote-pipeline-dialog";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
import { PageHeader } from "@/components/page-header";
import { formatEventsRate, formatBytesRate } from "@/lib/format";
import { tagBadgeClass, reductionBadgeClass } from "@/lib/badge-variants";

Expand Down Expand Up @@ -206,17 +205,14 @@ export default function PipelinesPage() {

return (
<div className="space-y-2">
<PageHeader
title="Pipelines"
actions={
<Button asChild size="sm">
<Link href="/pipelines/new">
<Plus className="mr-1.5 h-3.5 w-3.5" />
New Pipeline
</Link>
</Button>
}
/>
<div className="flex items-center justify-end">
<Button asChild size="sm">
<Link href="/pipelines/new">
<Plus className="mr-1.5 h-3.5 w-3.5" />
New Pipeline
</Link>
</Button>
</div>

{isLoading ? (
<div className="space-y-3">
Expand Down
2 changes: 0 additions & 2 deletions src/app/(dashboard)/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
CardTitle,
} from "@/components/ui/card";
import { TotpSetupCard } from "@/components/totp-setup-card";
import { PageHeader } from "@/components/page-header";
import { useTeamStore } from "@/stores/team-store";

export default function ProfilePage() {
Expand Down Expand Up @@ -93,7 +92,6 @@ export default function ProfilePage() {

return (
<div className="space-y-6 max-w-2xl">
<PageHeader title="Profile" />
{/* Personal Info */}
<Card>
<CardHeader>
Expand Down
Loading