@industry-theme/principal-view-panels 0.8.6 → 0.9.0
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/components/TraceDetails.d.ts +18 -0
- package/dist/components/TraceDetails.d.ts.map +1 -0
- package/dist/components/TraceDetails.stories.d.ts +38 -0
- package/dist/components/TraceDetails.stories.d.ts.map +1 -0
- package/dist/components/TraceList.d.ts +23 -0
- package/dist/components/TraceList.d.ts.map +1 -0
- package/dist/components/TraceList.stories.d.ts +63 -0
- package/dist/components/TraceList.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/mocks/otelMocks.d.ts +76 -0
- package/dist/mocks/otelMocks.d.ts.map +1 -0
- package/dist/panels/TraceDetailsPanel.d.ts +25 -0
- package/dist/panels/TraceDetailsPanel.d.ts.map +1 -0
- package/dist/panels/TraceDetailsPanel.stories.d.ts +36 -0
- package/dist/panels/TraceDetailsPanel.stories.d.ts.map +1 -0
- package/dist/panels/TraceListPanel.d.ts +15 -0
- package/dist/panels/TraceListPanel.d.ts.map +1 -0
- package/dist/panels/TraceListPanel.stories.d.ts +27 -0
- package/dist/panels/TraceListPanel.stories.d.ts.map +1 -0
- package/dist/panels/TraceViewerIntegration.stories.d.ts +28 -0
- package/dist/panels/TraceViewerIntegration.stories.d.ts.map +1 -0
- package/dist/panels.bundle.js +4581 -3318
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/otel.d.ts +97 -0
- package/dist/types/otel.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '@principal-ade/industry-theme';
|
|
3
|
+
import type { OtelSpan } from '../types/otel';
|
|
4
|
+
export interface TraceDetailsProps {
|
|
5
|
+
spans: OtelSpan[];
|
|
6
|
+
theme: Theme;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* TraceDetails - Simple view of trace spans
|
|
10
|
+
*
|
|
11
|
+
* Shows spans in a tree structure with key information:
|
|
12
|
+
* - Span name
|
|
13
|
+
* - Duration
|
|
14
|
+
* - Status (success/error)
|
|
15
|
+
* - Attributes (expandable)
|
|
16
|
+
*/
|
|
17
|
+
export declare const TraceDetails: React.FC<TraceDetailsProps>;
|
|
18
|
+
//# sourceMappingURL=TraceDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceDetails.d.ts","sourceRoot":"","sources":["../../src/components/TraceDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;CACd;AAQD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwTpD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./TraceDetails").TraceDetailsProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
16
|
+
spans: import("../types/otel").OtelSpan[];
|
|
17
|
+
theme: import("@principal-ade/industry-theme").Theme;
|
|
18
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
/**
|
|
23
|
+
* Simple trace with API -> DB
|
|
24
|
+
*/
|
|
25
|
+
export declare const SimpleTrace: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Error trace with exception
|
|
28
|
+
*/
|
|
29
|
+
export declare const ErrorTrace: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Complex multi-service trace
|
|
32
|
+
*/
|
|
33
|
+
export declare const ComplexTrace: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Empty state
|
|
36
|
+
*/
|
|
37
|
+
export declare const Empty: Story;
|
|
38
|
+
//# sourceMappingURL=TraceDetails.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceDetails.stories.d.ts","sourceRoot":"","sources":["../../src/components/TraceDetails.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAwB2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAUzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAU1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Theme } from '@principal-ade/industry-theme';
|
|
3
|
+
import type { TraceInfo } from '../types/otel';
|
|
4
|
+
export interface TraceListProps {
|
|
5
|
+
traces: TraceInfo[];
|
|
6
|
+
theme: Theme;
|
|
7
|
+
onTraceClick?: (trace: TraceInfo) => void;
|
|
8
|
+
selectedTraceId?: string;
|
|
9
|
+
showSearch?: boolean;
|
|
10
|
+
emptyMessage?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* TraceList - Displays a list of OpenTelemetry traces
|
|
14
|
+
*
|
|
15
|
+
* Features:
|
|
16
|
+
* - Displays trace metadata (ID, service, duration, span count, status)
|
|
17
|
+
* - Search/filter functionality
|
|
18
|
+
* - Click to select traces
|
|
19
|
+
* - Visual indicators for errors
|
|
20
|
+
* - Responsive layout
|
|
21
|
+
*/
|
|
22
|
+
export declare const TraceList: React.FC<TraceListProps>;
|
|
23
|
+
//# sourceMappingURL=TraceList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceList.d.ts","sourceRoot":"","sources":["../../src/components/TraceList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqa9C,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { TraceInfo } from '../types/otel';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("./TraceList").TraceListProps>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
tags: string[];
|
|
16
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
17
|
+
traces: TraceInfo[];
|
|
18
|
+
theme: import("@principal-ade/industry-theme").Theme;
|
|
19
|
+
onTraceClick?: ((trace: TraceInfo) => void) | undefined;
|
|
20
|
+
selectedTraceId?: string | undefined;
|
|
21
|
+
showSearch?: boolean | undefined;
|
|
22
|
+
emptyMessage?: string | undefined;
|
|
23
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/**
|
|
28
|
+
* Default story with a few example traces
|
|
29
|
+
*/
|
|
30
|
+
export declare const Default: Story;
|
|
31
|
+
/**
|
|
32
|
+
* Empty state with no traces
|
|
33
|
+
*/
|
|
34
|
+
export declare const Empty: Story;
|
|
35
|
+
/**
|
|
36
|
+
* Large list with many traces to test scrolling and search
|
|
37
|
+
*/
|
|
38
|
+
export declare const ManyTraces: Story;
|
|
39
|
+
/**
|
|
40
|
+
* Only error traces
|
|
41
|
+
*/
|
|
42
|
+
export declare const ErrorTraces: Story;
|
|
43
|
+
/**
|
|
44
|
+
* Complex multi-service traces
|
|
45
|
+
*/
|
|
46
|
+
export declare const ComplexTraces: Story;
|
|
47
|
+
/**
|
|
48
|
+
* Without search functionality
|
|
49
|
+
*/
|
|
50
|
+
export declare const NoSearch: Story;
|
|
51
|
+
/**
|
|
52
|
+
* With custom empty message
|
|
53
|
+
*/
|
|
54
|
+
export declare const CustomEmptyMessage: Story;
|
|
55
|
+
/**
|
|
56
|
+
* Mix of matched and unmatched traces
|
|
57
|
+
*/
|
|
58
|
+
export declare const MixedMatching: Story;
|
|
59
|
+
/**
|
|
60
|
+
* Live updating simulation - traces appear over time
|
|
61
|
+
*/
|
|
62
|
+
export declare const LiveUpdating: Story;
|
|
63
|
+
//# sourceMappingURL=TraceList.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceList.stories.d.ts","sourceRoot":"","sources":["../../src/components/TraceList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAQ/C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;CAsBwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAwBnC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAmBrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAkBzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAkB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAahC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAqB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KA2B1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type { CanvasEditorPanelProps } from './panels/CanvasEditorPanel';
|
|
|
6
6
|
export { WorkflowScenariosPanel } from './panels/WorkflowScenariosPanel';
|
|
7
7
|
export type { WorkflowScenariosPanelProps } from './panels/WorkflowScenariosPanel';
|
|
8
8
|
export { StoryboardListPanel } from './panels/StoryboardListPanel';
|
|
9
|
+
export { TraceListPanel } from './panels/TraceListPanel';
|
|
10
|
+
export { TraceDetailsPanel } from './panels/TraceDetailsPanel';
|
|
9
11
|
export { LibraryAnchoringExplainerPanel } from './panels/LibraryAnchoringExplainerPanel';
|
|
10
12
|
export type { LibraryAnchoringExplainerPanelProps } from './panels/LibraryAnchoringExplainerPanel';
|
|
11
13
|
export { WorkflowExplainerPanel } from './panels/WorkflowExplainerPanel';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAIlE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,yBAAyB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,YAAY,EAAE,sBAAsB,EAAE,MAAM,4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Attribute, OtelSpanKind } from '../types/otel';
|
|
2
|
+
/**
|
|
3
|
+
* Create an OTEL attribute
|
|
4
|
+
*/
|
|
5
|
+
export declare function createAttribute(key: string, value: string | number | boolean): OtelAttribute;
|
|
6
|
+
/**
|
|
7
|
+
* Create a mock resource
|
|
8
|
+
*/
|
|
9
|
+
export declare function createMockResource(serviceName: string, additionalAttrs?: Record<string, string>): OtelResource;
|
|
10
|
+
/**
|
|
11
|
+
* Generate a random trace ID (Base64)
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateTraceId(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Generate a random span ID (Base64)
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateSpanId(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get current time in nanoseconds (as string)
|
|
20
|
+
*/
|
|
21
|
+
export declare function getCurrentNanoTime(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Create a mock span
|
|
24
|
+
*/
|
|
25
|
+
export declare function createMockSpan(params: {
|
|
26
|
+
name: string;
|
|
27
|
+
kind?: OtelSpanKind;
|
|
28
|
+
attributes?: Record<string, string | number | boolean>;
|
|
29
|
+
durationMs?: number;
|
|
30
|
+
traceId?: string;
|
|
31
|
+
spanId?: string;
|
|
32
|
+
parentSpanId?: string;
|
|
33
|
+
hasError?: boolean;
|
|
34
|
+
}): OtelSpan;
|
|
35
|
+
/**
|
|
36
|
+
* Create a mock ResourceSpans structure
|
|
37
|
+
*/
|
|
38
|
+
export declare function createMockResourceSpans(serviceName: string, spans: OtelSpan[]): OtelResourceSpans;
|
|
39
|
+
/**
|
|
40
|
+
* Create a mock user interaction span (click)
|
|
41
|
+
*/
|
|
42
|
+
export declare function createMockClickSpan(targetElement?: string): OtelSpan;
|
|
43
|
+
/**
|
|
44
|
+
* Create a mock API request span
|
|
45
|
+
*/
|
|
46
|
+
export declare function createMockAPISpan(params: {
|
|
47
|
+
method: string;
|
|
48
|
+
route: string;
|
|
49
|
+
statusCode?: number;
|
|
50
|
+
durationMs?: number;
|
|
51
|
+
}): OtelSpan;
|
|
52
|
+
/**
|
|
53
|
+
* Create a mock database query span
|
|
54
|
+
*/
|
|
55
|
+
export declare function createMockDBSpan(params: {
|
|
56
|
+
operation: string;
|
|
57
|
+
table: string;
|
|
58
|
+
durationMs?: number;
|
|
59
|
+
}): OtelSpan;
|
|
60
|
+
/**
|
|
61
|
+
* Generate a realistic trace (API -> DB)
|
|
62
|
+
*/
|
|
63
|
+
export declare function generateCheckoutTrace(includeWorkflowMatch?: boolean): OtelResourceSpans;
|
|
64
|
+
/**
|
|
65
|
+
* Generate a realistic authentication trace (with error)
|
|
66
|
+
*/
|
|
67
|
+
export declare function generateAuthErrorTrace(includeWorkflowMatch?: boolean): OtelResourceSpans;
|
|
68
|
+
/**
|
|
69
|
+
* Generate a complex multi-service trace
|
|
70
|
+
*/
|
|
71
|
+
export declare function generateComplexTrace(includeWorkflowMatch?: boolean): OtelResourceSpans;
|
|
72
|
+
/**
|
|
73
|
+
* Generate multiple random traces for testing
|
|
74
|
+
*/
|
|
75
|
+
export declare function generateRandomTraces(count: number): OtelResourceSpans;
|
|
76
|
+
//# sourceMappingURL=otelMocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otelMocks.d.ts","sourceRoot":"","sources":["../../src/mocks/otelMocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAC/B,aAAa,CAQf;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,eAAe,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAC3C,YAAY,CAUd;AAED;;GAEG;AACH,wBAAgB,eA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oBAAoB,GAAE,OAAe,GAAG,iBAAiB,CAwB/F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,oBAAoB,GAAE,OAAe,GAAG,iBAAiB,CA2E7F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAqDrE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
3
|
+
import type { TraceInfo } from '../types/otel';
|
|
4
|
+
export interface TraceDetailsPanelProps extends PanelComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Optional trace to display.
|
|
7
|
+
* If provided, this takes precedence over context/event-driven modes.
|
|
8
|
+
* This allows the host to control panel state via props instead of events.
|
|
9
|
+
*/
|
|
10
|
+
selectedTrace?: TraceInfo | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* TraceDetailsPanel - Panel for displaying detailed trace information
|
|
14
|
+
*
|
|
15
|
+
* This panel shows:
|
|
16
|
+
* - Detailed span tree for a selected trace
|
|
17
|
+
* - Span attributes and events
|
|
18
|
+
* - Expandable/collapsible spans
|
|
19
|
+
*
|
|
20
|
+
* Prop-controlled mode (recommended):
|
|
21
|
+
* - Pass `selectedTrace` prop to control what trace is displayed
|
|
22
|
+
* - Panel content loads immediately when prop changes
|
|
23
|
+
*/
|
|
24
|
+
export declare const TraceDetailsPanel: React.FC<TraceDetailsPanelProps>;
|
|
25
|
+
//# sourceMappingURL=TraceDetailsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceDetailsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceDetailsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAI/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAClC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+E9D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./TraceDetailsPanel").TraceDetailsPanelProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
16
|
+
selectedTrace?: (import("../types/otel").TraceInfo | null) | undefined;
|
|
17
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
18
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
19
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
20
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
/**
|
|
25
|
+
* Empty state - no trace selected
|
|
26
|
+
*/
|
|
27
|
+
export declare const Empty: Story;
|
|
28
|
+
/**
|
|
29
|
+
* With a simple trace selected
|
|
30
|
+
*/
|
|
31
|
+
export declare const WithSimpleTrace: Story;
|
|
32
|
+
/**
|
|
33
|
+
* With a complex multi-service trace
|
|
34
|
+
*/
|
|
35
|
+
export declare const WithComplexTrace: Story;
|
|
36
|
+
//# sourceMappingURL=TraceDetailsPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceDetailsPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/TraceDetailsPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAsBgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAY7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAY9B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PanelComponentProps } from '@principal-ade/panel-framework-core';
|
|
3
|
+
/**
|
|
4
|
+
* TraceListPanel - Panel for displaying OpenTelemetry traces
|
|
5
|
+
*
|
|
6
|
+
* This panel shows:
|
|
7
|
+
* - List of traces with metadata
|
|
8
|
+
* - Search/filter functionality
|
|
9
|
+
* - Click to select and emit events for trace details
|
|
10
|
+
*
|
|
11
|
+
* Events emitted:
|
|
12
|
+
* - 'custom' with action 'selectTrace' when a trace is clicked
|
|
13
|
+
*/
|
|
14
|
+
export declare const TraceListPanel: React.FC<PanelComponentProps>;
|
|
15
|
+
//# sourceMappingURL=TraceListPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceListPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAQ/E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwExD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
tags: string[];
|
|
15
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
16
|
+
context: import("@principal-ade/panel-framework-core").PanelContextValue;
|
|
17
|
+
actions: import("@principal-ade/panel-framework-core").PanelActions;
|
|
18
|
+
events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
|
|
19
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
/**
|
|
24
|
+
* Default trace list panel with mock data
|
|
25
|
+
*/
|
|
26
|
+
export declare const Default: Story;
|
|
27
|
+
//# sourceMappingURL=TraceListPanel.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceListPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/TraceListPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAsB6B,CAAC;AAExC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
tags: string[];
|
|
13
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
/**
|
|
20
|
+
* Side-by-side layout showing trace list and trace details
|
|
21
|
+
* Click a trace in the list to see its details
|
|
22
|
+
*/
|
|
23
|
+
export declare const SideBySide: Story;
|
|
24
|
+
/**
|
|
25
|
+
* Vertical stack layout
|
|
26
|
+
*/
|
|
27
|
+
export declare const Stacked: Story;
|
|
28
|
+
//# sourceMappingURL=TraceViewerIntegration.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TraceViewerIntegration.stories.d.ts","sourceRoot":"","sources":["../../src/panels/TraceViewerIntegration.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAU5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAqBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAyCnC;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|