durable-actors-observer 0.14.5 → 0.14.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -0
- package/dist/client/DatatContext.d.ts +19 -0
- package/dist/client/TimeRangeContext.d.ts +8 -0
- package/dist/client/cacheKeys.d.ts +6 -0
- package/dist/client/observerClient.d.ts +21 -0
- package/dist/client/streams/actorStream.d.ts +2 -0
- package/dist/client/streams/requestStream.d.ts +2 -0
- package/dist/components/actorType/actorTypePage.d.ts +1 -0
- package/dist/components/actorType/instanceStatus.d.ts +6 -0
- package/dist/components/actorType/instancesCard.d.ts +9 -0
- package/dist/components/actorType/liveDormantCard.d.ts +5 -0
- package/dist/components/actorType/residencyCard.d.ts +20 -0
- package/dist/components/actorType/timingCard.d.ts +14 -0
- package/dist/components/instance/connectionsCard.d.ts +14 -0
- package/dist/components/instance/instancePage.d.ts +1 -0
- package/dist/components/instance/memoryCard.d.ts +7 -0
- package/dist/components/instance/requestsCard.d.ts +8 -0
- package/dist/components/instance/storageCard.d.ts +8 -0
- package/dist/components/overview/activeActorsCard.d.ts +1 -0
- package/dist/components/overview/actorTypesCard.d.ts +1 -0
- package/dist/components/overview/overview.d.ts +1 -0
- package/dist/components/overview/requestRateCard.d.ts +10 -0
- package/dist/components/overview/socketsCard.d.ts +1 -0
- package/dist/components/overview/trendCard.d.ts +22 -0
- package/dist/components/timeRange/timeRangeControl.d.ts +1 -0
- package/dist/components/timeRange/timeRangePicker.d.ts +5 -0
- package/dist/components/ui/barChart.d.ts +9 -0
- package/dist/components/ui/button.d.ts +4 -4
- package/dist/components/ui/calendar.d.ts +5 -5
- package/dist/components/ui/delta.d.ts +5 -0
- package/dist/components/ui/expandFooter.d.ts +9 -0
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/pageHeader.d.ts +15 -0
- package/dist/components/ui/popover.d.ts +5 -9
- package/dist/components/ui/residencyBar.d.ts +15 -0
- package/dist/components/ui/sectionCard.d.ts +10 -0
- package/dist/components/ui/segmentedControl.d.ts +13 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/sparkline.d.ts +11 -0
- package/dist/components/ui/statCard.d.ts +15 -0
- package/dist/components/ui/timeline.d.ts +19 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/trendCard.d.ts +24 -0
- package/dist/format.d.ts +15 -0
- package/dist/hooks/useActors.d.ts +7 -0
- package/dist/hooks/useRequests.d.ts +8 -0
- package/dist/hooks/useResidency.d.ts +7 -0
- package/dist/hooks/useWebSockets.d.ts +7 -0
- package/dist/hooks/useWindowedSWR.d.ts +3 -0
- package/dist/index.d.ts +6 -39
- package/dist/index.js +2389 -4084
- package/dist/lib/actorTypes.d.ts +11 -0
- package/dist/lib/requestStats.d.ts +17 -0
- package/dist/lib/sockets.d.ts +3 -0
- package/dist/lib/timeRange.d.ts +17 -0
- package/dist/lib/trendWindow.d.ts +5 -0
- package/dist/mocks/instanceResources.d.ts +3 -0
- package/dist/routes.d.ts +1 -0
- package/dist/standalone/THIRD-PARTY-LICENSES.md +393 -45
- package/dist/standalone/app.css +1 -1
- package/dist/standalone/app.js +17 -41
- package/dist/standalone/index.html +1 -1
- package/dist/theme.css +2 -1
- package/dist/types/Actors.d.ts +27 -0
- package/dist/types/Overview.d.ts +17 -0
- package/dist/types/Requests.d.ts +24 -0
- package/dist/types/Residency.d.ts +11 -0
- package/dist/types/Resources.d.ts +14 -0
- package/dist/types/Sockets.d.ts +12 -0
- package/dist/types/TimeRange.d.ts +22 -0
- package/package.json +8 -5
- package/dist/ActorObserver.d.ts +0 -16
- package/dist/ConnectionInventoryNotice.d.ts +0 -4
- package/dist/ConsoleApp.d.ts +0 -6
- package/dist/FilterCombobox.d.ts +0 -19
- package/dist/InstanceTimeline.d.ts +0 -45
- package/dist/Overview.d.ts +0 -9
- package/dist/RequestObserver.d.ts +0 -16
- package/dist/RequestTimeline.d.ts +0 -9
- package/dist/ResidencyTimeline.d.ts +0 -11
- package/dist/SocketTimeline.d.ts +0 -28
- package/dist/StateInspector.d.ts +0 -13
- package/dist/TimeRangePicker.d.ts +0 -9
- package/dist/TimelineScroll.d.ts +0 -8
- package/dist/TimelineWheelZoom.d.ts +0 -3
- package/dist/TimelineZoom.d.ts +0 -20
- package/dist/WebSocketObserver.d.ts +0 -9
- package/dist/assets/state-diff.worker-ieZNeZXJ.js +0 -18
- package/dist/client.d.ts +0 -120
- package/dist/components/ui/badge.d.ts +0 -7
- package/dist/components/ui/command.d.ts +0 -11
- package/dist/components/ui/drawer.d.ts +0 -15
- package/dist/components/ui/native-select.d.ts +0 -7
- package/dist/components/ui/sheet.d.ts +0 -9
- package/dist/components/ui/table.d.ts +0 -12
- package/dist/observer-hooks.d.ts +0 -21
- package/dist/overview-data.d.ts +0 -15
- package/dist/overview-metrics.d.ts +0 -14
- package/dist/queue-wait-history.d.ts +0 -7
- package/dist/queue-wait.d.ts +0 -17
- package/dist/request-history.d.ts +0 -7
- package/dist/request-timeline.d.ts +0 -26
- package/dist/residency.d.ts +0 -18
- package/dist/socket-history.d.ts +0 -12
- package/dist/socket-sessions.d.ts +0 -38
- package/dist/standalone/assets/state-diff.worker-ieZNeZXJ.js +0 -18
- package/dist/state-data.d.ts +0 -30
- package/dist/state-diff.d.ts +0 -1
- package/dist/state-diff.worker.d.ts +0 -1
- package/dist/state-inspection.d.ts +0 -11
- package/dist/styles.css +0 -2
- package/dist/time-range.d.ts +0 -39
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ActorInventory } from "../types/Actors.js";
|
|
3
|
+
import type { RequestTrace } from "../types/Requests.js";
|
|
4
|
+
import type { SocketSession } from "../types/Sockets.js";
|
|
5
|
+
type DataContextType = {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
actorTypes: ActorInventory | null;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
requests: RequestTrace[] | null;
|
|
10
|
+
isRequestsError: boolean;
|
|
11
|
+
sessions: SocketSession[] | null;
|
|
12
|
+
isSocketsError: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const DataProvider: ({ baseUrl, children }: {
|
|
15
|
+
baseUrl?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}) => import("react").JSX.Element;
|
|
18
|
+
export declare const useData: () => DataContextType;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { TimeRange, TimeWindow } from "../types/TimeRange.js";
|
|
3
|
+
export declare function TimeRangeProvider({ initialRange, children }: {
|
|
4
|
+
initialRange?: TimeRange | (() => TimeRange);
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function useTimeWindow(): TimeWindow;
|
|
8
|
+
export declare function useSetTimeRange(): (range: TimeRange) => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const actorsKey: (baseUrl: string) => readonly ["actors", string];
|
|
2
|
+
export declare const actorEventsKey: (baseUrl: string) => readonly ["actors/events", string];
|
|
3
|
+
export declare const requestsKey: (baseUrl: string) => readonly ["requests", string];
|
|
4
|
+
export declare const requestEventsKey: (baseUrl: string, durationMs: number) => readonly ["requests/events", string, number];
|
|
5
|
+
export declare const residencyKey: (baseUrl: string, actorName: string) => readonly ["residency", string, string];
|
|
6
|
+
export declare const webSocketsKey: (baseUrl: string) => readonly ["websockets", string];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActorInventory } from "../types/Actors.js";
|
|
2
|
+
import type { RequestTracePage } from "../types/Requests.js";
|
|
3
|
+
import type { ResidencyHistory } from "../types/Residency.js";
|
|
4
|
+
import type { SocketSession } from "../types/Sockets.js";
|
|
5
|
+
import type { TimeBounds } from "../types/TimeRange.js";
|
|
6
|
+
export declare const defaultBaseUrl = "/api/observe";
|
|
7
|
+
export interface ObserverClient {
|
|
8
|
+
listActorTypes(): Promise<ActorInventory>;
|
|
9
|
+
listRequests(bounds: TimeBounds): Promise<RequestTracePage>;
|
|
10
|
+
listResidency(actorName: string, bounds: TimeBounds): Promise<ResidencyHistory>;
|
|
11
|
+
listWebSockets(): Promise<SocketSession[]>;
|
|
12
|
+
}
|
|
13
|
+
export declare class HttpObserverClient implements ObserverClient {
|
|
14
|
+
private readonly baseUrl;
|
|
15
|
+
constructor(baseUrl?: string);
|
|
16
|
+
listActorTypes(): Promise<ActorInventory>;
|
|
17
|
+
listRequests({ fromMs, toMs }: TimeBounds): Promise<RequestTracePage>;
|
|
18
|
+
listResidency(actorName: string, { fromMs, toMs }: TimeBounds): Promise<ResidencyHistory>;
|
|
19
|
+
listWebSockets(): Promise<SocketSession[]>;
|
|
20
|
+
private get;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ActorTypePage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ActorType } from "../../types/Actors.js";
|
|
2
|
+
import type { RequestTrace } from "../../types/Requests.js";
|
|
3
|
+
export type InstancesCardProps = {
|
|
4
|
+
actor: ActorType | null;
|
|
5
|
+
requests: RequestTrace[] | null;
|
|
6
|
+
failed: boolean;
|
|
7
|
+
now: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function InstancesCard({ actor, requests, failed, now }: InstancesCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ActorType } from "../../types/Actors.js";
|
|
2
|
+
import type { RequestTrace } from "../../types/Requests.js";
|
|
3
|
+
import type { ResidencyHistory, ResidencyPeriod } from "../../types/Residency.js";
|
|
4
|
+
import type { TimeWindow } from "../../types/TimeRange.js";
|
|
5
|
+
import { type TimelineSegment } from "../ui/timeline.js";
|
|
6
|
+
export type ResidencyCardProps = {
|
|
7
|
+
actor: ActorType | null;
|
|
8
|
+
history: ResidencyHistory | null;
|
|
9
|
+
requests: RequestTrace[] | null;
|
|
10
|
+
failed: boolean;
|
|
11
|
+
timeWindow: TimeWindow;
|
|
12
|
+
};
|
|
13
|
+
export declare function ResidencyCard({ actor, history, requests, failed, timeWindow }: ResidencyCardProps): import("react").JSX.Element;
|
|
14
|
+
export declare function groupLivePeriods({ periods }: ResidencyHistory): Map<string, ResidencyPeriod[]>;
|
|
15
|
+
export declare function liveDuration(segments: TimelineSegment[]): number;
|
|
16
|
+
export declare function ResidencyTrack({ segments, requests, label }: {
|
|
17
|
+
segments: TimelineSegment[];
|
|
18
|
+
requests: RequestTrace[] | null;
|
|
19
|
+
label: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TimingPick } from "../../lib/requestStats.js";
|
|
2
|
+
import type { RequestTrace } from "../../types/Requests.js";
|
|
3
|
+
import type { TimeWindow } from "../../types/TimeRange.js";
|
|
4
|
+
export type TimingCardProps = {
|
|
5
|
+
label: string;
|
|
6
|
+
window: string;
|
|
7
|
+
pick: TimingPick;
|
|
8
|
+
color: string;
|
|
9
|
+
chartLabel: string;
|
|
10
|
+
requests: RequestTrace[] | null;
|
|
11
|
+
failed: boolean;
|
|
12
|
+
timeWindow: TimeWindow;
|
|
13
|
+
};
|
|
14
|
+
export declare function TimingCard({ label, window, pick, color, chartLabel, requests, failed, timeWindow }: TimingCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ActorInstance } from "../../types/Actors.js";
|
|
2
|
+
import type { RequestTrace } from "../../types/Requests.js";
|
|
3
|
+
import type { ResidencyPeriod } from "../../types/Residency.js";
|
|
4
|
+
import type { SocketSession } from "../../types/Sockets.js";
|
|
5
|
+
import type { TimeWindow } from "../../types/TimeRange.js";
|
|
6
|
+
export type ConnectionsCardProps = {
|
|
7
|
+
instance: ActorInstance | null;
|
|
8
|
+
sessions: SocketSession[] | null;
|
|
9
|
+
livePeriods: ResidencyPeriod[] | null;
|
|
10
|
+
requests: RequestTrace[] | null;
|
|
11
|
+
failed: boolean;
|
|
12
|
+
timeWindow: TimeWindow;
|
|
13
|
+
};
|
|
14
|
+
export declare function ConnectionsCard({ instance, sessions, livePeriods, requests, failed, timeWindow }: ConnectionsCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InstancePage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MemoryUsage } from "../../types/Resources.js";
|
|
2
|
+
export type MemoryCardProps = {
|
|
3
|
+
memory: MemoryUsage | null;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
failed: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function MemoryCard({ memory, loading, failed }: MemoryCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RequestTrace } from "../../types/Requests.js";
|
|
2
|
+
import type { TimeWindow } from "../../types/TimeRange.js";
|
|
3
|
+
export type RequestsCardProps = {
|
|
4
|
+
requests: RequestTrace[] | null;
|
|
5
|
+
failed: boolean;
|
|
6
|
+
timeWindow: TimeWindow;
|
|
7
|
+
};
|
|
8
|
+
export declare function RequestsCard({ requests, failed, timeWindow }: RequestsCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StorageUsage } from "../../types/Resources.js";
|
|
2
|
+
export declare function StorageCard({ storage, failed }: {
|
|
3
|
+
storage: StorageUsage | null;
|
|
4
|
+
failed: boolean;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export declare function ResourceSkeleton({ failed }: {
|
|
7
|
+
failed: boolean;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ActiveActorsCard(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ActorTypesCard(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Overview(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RequestTrace } from "../../types/Requests.js";
|
|
2
|
+
import type { TimeWindow } from "../../types/TimeRange.js";
|
|
3
|
+
export declare function RequestRateCard(): import("react").JSX.Element;
|
|
4
|
+
export type RequestRateTrendProps = {
|
|
5
|
+
requests: RequestTrace[] | null;
|
|
6
|
+
failed: boolean;
|
|
7
|
+
timeWindow: TimeWindow;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function RequestRateTrend({ requests, failed, timeWindow, color }: RequestRateTrendProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SocketsCard(): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type TrendCardProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
window: string;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
unit: ReactNode;
|
|
7
|
+
busy?: boolean;
|
|
8
|
+
series: number[];
|
|
9
|
+
axis: string[];
|
|
10
|
+
color: string;
|
|
11
|
+
chartLabel: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export declare function TrendCard({ label, window, value, unit, busy, series, axis, color, chartLabel, children }: TrendCardProps): import("react").JSX.Element;
|
|
15
|
+
export declare function TrendStatsSkeleton({ failed }: {
|
|
16
|
+
failed: boolean;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function TrendStat({ label, value, suffix }: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
suffix?: string;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TimeRangeControl(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type BarChartProps = {
|
|
2
|
+
values: number[];
|
|
3
|
+
label: string;
|
|
4
|
+
highlighted?: number;
|
|
5
|
+
onSelect?: (index: number) => void;
|
|
6
|
+
barLabel?: (index: number) => string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function BarChart({ values, label, highlighted, onSelect, barLabel, className }: BarChartProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
declare function Button({ className, variant, size, asChild, ...props }:
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
10
|
export { Button, buttonVariants };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
import { type DayButton, DayPicker } from "react-day-picker";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }:
|
|
5
|
-
buttonVariant?:
|
|
6
|
-
}):
|
|
7
|
-
declare function CalendarDayButton({ className, day, modifiers, ...props }:
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: ComponentProps<typeof Button>["variant"];
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: ComponentProps<typeof DayButton>): import("react").JSX.Element;
|
|
8
8
|
export { Calendar, CalendarDayButton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ExpandFooterProps = {
|
|
2
|
+
shown: number;
|
|
3
|
+
total: number;
|
|
4
|
+
noun: string;
|
|
5
|
+
expandLabel: string;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
onToggle: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function ExpandFooter({ shown, total, noun, expandLabel, expanded, onToggle }: ExpandFooterProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
2
|
-
declare function Input({ className, type, ...props }:
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
declare function Input({ className, type, ...props }: ComponentProps<"input">): import("react").JSX.Element;
|
|
3
3
|
export { Input };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type RelativeRoutingType } from "react-router";
|
|
3
|
+
export type PageHeaderProps = {
|
|
4
|
+
titleId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
back: {
|
|
7
|
+
to: string;
|
|
8
|
+
label: string;
|
|
9
|
+
relative?: RelativeRoutingType;
|
|
10
|
+
};
|
|
11
|
+
badge?: ReactNode;
|
|
12
|
+
meta: ReactNode;
|
|
13
|
+
aside?: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export declare function PageHeader({ titleId, title, back, badge, meta, aside }: PageHeaderProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
-
declare function Popover(
|
|
4
|
-
declare function PopoverTrigger(
|
|
5
|
-
declare function PopoverContent({ className, align, sideOffset, ...props }:
|
|
6
|
-
|
|
7
|
-
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
-
declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
|
|
9
|
-
declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
10
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription };
|
|
3
|
+
declare function Popover(props: ComponentProps<typeof PopoverPrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
declare function PopoverTrigger(props: ComponentProps<typeof PopoverPrimitive.Trigger>): import("react").JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react").JSX.Element;
|
|
6
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export type ResidencyBarProps = {
|
|
3
|
+
liveShare: number;
|
|
4
|
+
label: string;
|
|
5
|
+
pulse?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
export declare function ResidencyBar({ liveShare, label, pulse, className, style }: ResidencyBarProps): import("react").JSX.Element;
|
|
10
|
+
export declare function ResidencyLegend({ live, dormant, showCounts }: {
|
|
11
|
+
live: number;
|
|
12
|
+
dormant: number;
|
|
13
|
+
showCounts?: boolean;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare function ResidencyBarSkeleton(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type SectionCardProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
aside?: ReactNode;
|
|
6
|
+
busy?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function SectionCard({ title, description, aside, busy, className, children }: SectionCardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type SegmentedOption<T extends string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
badge?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type SegmentedControlProps<T extends string> = {
|
|
8
|
+
label: string;
|
|
9
|
+
options: SegmentedOption<T>[];
|
|
10
|
+
value: T;
|
|
11
|
+
onChange: (value: T) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function SegmentedControl<T extends string>({ label, options, value, onChange }: SegmentedControlProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type PointDescription = {
|
|
2
|
+
at: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export type SparklineProps = {
|
|
6
|
+
values: number[];
|
|
7
|
+
color: string;
|
|
8
|
+
label: string;
|
|
9
|
+
describePoint?: (index: number) => PointDescription;
|
|
10
|
+
};
|
|
11
|
+
export declare function Sparkline({ values, color, label, describePoint }: SparklineProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type StatCardProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
aside?: ReactNode;
|
|
5
|
+
value?: ReactNode;
|
|
6
|
+
unit?: ReactNode;
|
|
7
|
+
busy?: boolean;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function StatCard({ label, aside, value, unit, busy, children }: StatCardProps): import("react").JSX.Element;
|
|
11
|
+
export declare function StatFigure({ value, unit, className }: {
|
|
12
|
+
value: ReactNode;
|
|
13
|
+
unit?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TimeSpan, TimeWindow } from "../../types/TimeRange.js";
|
|
3
|
+
export type TimelineSegment = TimeSpan & {
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
now: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type TimelineAxisProps = {
|
|
9
|
+
timeWindow: TimeWindow;
|
|
10
|
+
grid: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
trailing?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function TimelineAxis({ timeWindow, grid, label, trailing }: TimelineAxisProps): import("react").JSX.Element;
|
|
15
|
+
export declare function TimelineTrack({ label, children }: {
|
|
16
|
+
label: string;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
export declare function timelineSegments(spans: TimeSpan[], { fromMs: start, toMs: end }: TimeWindow, ongoing: boolean): TimelineSegment[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): import("react").JSX.Element;
|
|
4
|
+
declare function Tooltip(props: ComponentProps<typeof TooltipPrimitive.Root>): import("react").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: ComponentProps<typeof TooltipPrimitive.Content>): import("react").JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type PointDescription } from "./sparkline.js";
|
|
3
|
+
export type TrendCardProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
window: string;
|
|
6
|
+
value: ReactNode;
|
|
7
|
+
unit: ReactNode;
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
series: number[];
|
|
10
|
+
axis: string[];
|
|
11
|
+
color: string;
|
|
12
|
+
chartLabel: string;
|
|
13
|
+
describePoint: (index: number) => PointDescription;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export declare function TrendCard({ label, window, value, unit, busy, series, axis, color, chartLabel, describePoint, children }: TrendCardProps): import("react").JSX.Element;
|
|
17
|
+
export declare function TrendStatsSkeleton({ failed }: {
|
|
18
|
+
failed: boolean;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
export declare function TrendStat({ label, value, suffix }: {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
suffix?: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
package/dist/format.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const formatClock: (ms: number) => string;
|
|
2
|
+
export declare const formatPreciseClock: (ms: number) => string;
|
|
3
|
+
export declare const formatTick: (ms: number, spanMs: number) => string;
|
|
4
|
+
export declare const formatTimeSpan: (fromMs: number, toMs: number) => string;
|
|
5
|
+
export declare const formatPreciseTimeSpan: (fromMs: number, toMs: number) => string;
|
|
6
|
+
export declare const formatCount: (value: number) => string;
|
|
7
|
+
export declare const formatDecimal: (value: number) => string;
|
|
8
|
+
export declare const formatPercent: (ratio: number) => string;
|
|
9
|
+
export declare const formatSignedPercent: (ratio: number) => string;
|
|
10
|
+
export declare const formatMsValue: (ms: number) => string;
|
|
11
|
+
export declare const formatMs: (ms: number) => string;
|
|
12
|
+
export declare const formatMegabytes: (bytes: number) => string;
|
|
13
|
+
export declare const formatPlural: (value: number, noun: string) => string;
|
|
14
|
+
export declare function formatDuration(ms: number): string;
|
|
15
|
+
export declare function formatAgo(ms: number, now: number): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RequestTrace } from "../types/Requests.js";
|
|
2
|
+
import type { TimeWindow } from "../types/TimeRange.js";
|
|
3
|
+
export declare function useRequests(baseUrl: string, timeWindow: TimeWindow): {
|
|
4
|
+
requests: RequestTrace[] | null;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
error: any;
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TimeWindow } from "../types/TimeRange.js";
|
|
2
|
+
export declare function useResidency(actorName: string, timeWindow: TimeWindow): {
|
|
3
|
+
residency: import("../types/Residency.js").ResidencyHistory | null;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
isError: boolean;
|
|
6
|
+
error: any;
|
|
7
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type SWRConfiguration } from "swr";
|
|
2
|
+
import type { TimeBounds, TimeWindow } from "../types/TimeRange.js";
|
|
3
|
+
export declare function useWindowedSWR<T>(key: readonly unknown[], timeWindow: TimeWindow, fetch: (bounds: TimeBounds) => Promise<T>, config?: SWRConfiguration<T>): import("swr").SWRResponse<T, any, SWRConfiguration<T, any, import("swr").BareFetcher<T>> | undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export { Overview } from "./Overview.js";
|
|
8
|
-
export type { OverviewProps } from "./Overview.js";
|
|
9
|
-
export { RequestObserver } from "./RequestObserver.js";
|
|
10
|
-
export type { RequestObserverProps } from "./RequestObserver.js";
|
|
11
|
-
export { RequestTimeline } from "./RequestTimeline.js";
|
|
12
|
-
export type { RequestTimelineProps } from "./RequestTimeline.js";
|
|
13
|
-
export type { RequestTimelineLane } from "./request-timeline.js";
|
|
14
|
-
export { ResidencyTimeline } from "./ResidencyTimeline.js";
|
|
15
|
-
export type { ResidencyTimelineProps } from "./ResidencyTimeline.js";
|
|
16
|
-
export type { ResidencyHistory, ResidencyPeriod, ResidencyQuery } from "./residency.js";
|
|
17
|
-
export { SocketTimeline } from "./SocketTimeline.js";
|
|
18
|
-
export type { SocketTimelineProps } from "./SocketTimeline.js";
|
|
19
|
-
export { TimeRangePicker } from "./TimeRangePicker.js";
|
|
20
|
-
export type { TimeRangePickerProps } from "./TimeRangePicker.js";
|
|
21
|
-
export { WebSocketObserver } from "./WebSocketObserver.js";
|
|
22
|
-
export type { WebSocketObserverProps } from "./WebSocketObserver.js";
|
|
23
|
-
export { Badge, badgeVariants } from "./components/ui/badge.js";
|
|
24
|
-
export { Button, buttonVariants } from "./components/ui/button.js";
|
|
25
|
-
export { Calendar, CalendarDayButton } from "./components/ui/calendar.js";
|
|
26
|
-
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator } from "./components/ui/command.js";
|
|
27
|
-
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription } from "./components/ui/drawer.js";
|
|
28
|
-
export { Input } from "./components/ui/input.js";
|
|
29
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription } from "./components/ui/popover.js";
|
|
30
|
-
export { Sheet, SheetContent, SheetTitle, SheetDescription } from "./components/ui/sheet.js";
|
|
31
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption } from "./components/ui/table.js";
|
|
32
|
-
export { HttpObserverClient } from "./client.js";
|
|
33
|
-
export type { ActorConnection, ActorInstance, ActorInventory, ActorResidency, ObserverClient, RequestTrace, RequestTracePage, RequestHistoryQuery } from "./client.js";
|
|
34
|
-
export { defaultTimeRange, rangeLabel, resolveRange } from "./time-range.js";
|
|
35
|
-
export type { TimeRange, ResolvedRange } from "./time-range.js";
|
|
36
|
-
export type { OverviewMetrics, ClassMetrics } from "./overview-metrics.js";
|
|
37
|
-
export type { QueueWaitRow, QueueWaitStats } from "./queue-wait.js";
|
|
38
|
-
export type { SocketSession, SocketSessionRow, SocketSessionStatus } from "./socket-sessions.js";
|
|
39
|
-
export type { StateAttribution, StateRecord, StateSnapshot, StateQuery, StateResponse, StateHistoryPage } from "./state-data.js";
|
|
1
|
+
export { DataProvider } from "./client/DatatContext.js";
|
|
2
|
+
export { TimeRangeProvider } from "./client/TimeRangeContext.js";
|
|
3
|
+
export type { TimeRange } from "./types/TimeRange.js";
|
|
4
|
+
export { ActorTypePage } from "./components/actorType/actorTypePage.js";
|
|
5
|
+
export { Overview } from "./components/overview/overview.js";
|
|
6
|
+
export { ObserverRoutes } from "./routes.js";
|