@elevasis/ui 2.74.0 → 2.76.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/api/index.js +3 -3
- package/dist/app/index.d.ts +277 -249
- package/dist/app/index.js +12 -11
- package/dist/auth/index.js +6 -7
- package/dist/charts/index.js +6 -7
- package/dist/{chunk-GO4XJ5D4.js → chunk-2GIHWU5O.js} +4 -3
- package/dist/chunk-2Y6AKWGU.js +42 -0
- package/dist/chunk-3QYRZSHP.js +854 -0
- package/dist/{chunk-CRA7WQZH.js → chunk-3RK2NNJX.js} +1 -1
- package/dist/{chunk-R6NMRXNO.js → chunk-4WLAVUPS.js} +1 -1
- package/dist/{chunk-GPQQGQGT.js → chunk-5R4I2PAN.js} +9 -43
- package/dist/{chunk-R5UGIFYU.js → chunk-5ZK7K7YP.js} +25 -1
- package/dist/chunk-6B4ZPBQJ.js +7 -0
- package/dist/{chunk-ARAFQBNI.js → chunk-73G3I5HJ.js} +160 -160
- package/dist/{chunk-ZWI62BQ6.js → chunk-BFLYDVEN.js} +32 -42
- package/dist/{chunk-W2QRBQQA.js → chunk-BG6PWDJ3.js} +381 -381
- package/dist/{chunk-7ARBBELS.js → chunk-BV2RNLPP.js} +1 -1
- package/dist/{chunk-FA7LMNQO.js → chunk-CTT4RDXE.js} +150 -151
- package/dist/chunk-E2LJ3FRA.js +237 -0
- package/dist/{chunk-E6YGA5WH.js → chunk-EFQLXRYT.js} +1 -2
- package/dist/{chunk-FZSG6M6W.js → chunk-EVNLJHDD.js} +3 -3
- package/dist/{chunk-ZYNVCWDZ.js → chunk-GDQQX5SL.js} +4 -42
- package/dist/{chunk-DCQKTDIG.js → chunk-GFSOQH3N.js} +1 -1
- package/dist/{chunk-3LOKYZJC.js → chunk-H5AEYSVX.js} +164 -3
- package/dist/{chunk-ZFISGKYW.js → chunk-IIEZXXDD.js} +1 -1
- package/dist/{chunk-3QHX4ZKV.js → chunk-INCEZAM3.js} +1 -1
- package/dist/{chunk-O32UQ26A.js → chunk-JZQNUQE4.js} +1 -1
- package/dist/{chunk-6JN2TLV2.js → chunk-K55TU6CC.js} +2023 -1700
- package/dist/chunk-KB5CAN5D.js +33 -0
- package/dist/{chunk-2MRRDF32.js → chunk-KMA4FOSV.js} +5682 -5675
- package/dist/{chunk-HYQOGRWG.js → chunk-KXNRTJAE.js} +1 -1
- package/dist/{chunk-7RJ7P6S6.js → chunk-MGAELVTZ.js} +12 -12
- package/dist/chunk-MKH2KOAO.js +39 -0
- package/dist/{chunk-4MXNHJTA.js → chunk-NAPXMYFW.js} +939 -1570
- package/dist/{chunk-CQPULKKL.js → chunk-OGG3QJYW.js} +14 -5
- package/dist/{chunk-4M2BSHVT.js → chunk-P6HHXMLJ.js} +1 -1
- package/dist/{chunk-WZU3MCKI.js → chunk-QAILYRC2.js} +1 -1
- package/dist/{chunk-RBGVNPA6.js → chunk-RXZ3XDBM.js} +1 -1
- package/dist/{chunk-BA3AZJUR.js → chunk-SPW6UA6B.js} +1 -1
- package/dist/{chunk-RFNJ2PTO.js → chunk-SVZR4GYA.js} +1 -1
- package/dist/{chunk-5A6KCFS5.js → chunk-UEY4AB3R.js} +789 -66
- package/dist/{chunk-LN4UW6S4.js → chunk-UL6MPMKY.js} +1 -1
- package/dist/{chunk-ZFA56VSR.js → chunk-WELN7DDV.js} +2 -2
- package/dist/{chunk-43LC6XAX.js → chunk-WJN2VVVJ.js} +1 -1
- package/dist/{chunk-BRTGCFBH.js → chunk-XODQUPFW.js} +11 -11
- package/dist/components/index.d.ts +181 -34
- package/dist/components/index.js +2249 -1804
- package/dist/components/navigation/index.js +7 -8
- package/dist/features/auth/index.d.ts +35 -3716
- package/dist/features/auth/index.js +9 -10
- package/dist/features/clients/index.js +18 -12
- package/dist/features/content/index.js +34 -31
- package/dist/features/crm/index.css +59 -59
- package/dist/features/crm/index.d.ts +18 -1
- package/dist/features/crm/index.js +13 -11
- package/dist/features/dashboard/index.css +59 -59
- package/dist/features/dashboard/index.js +8 -9
- package/dist/features/delivery/index.d.ts +3 -0
- package/dist/features/delivery/index.js +21 -20
- package/dist/features/knowledge/index.js +6 -7
- package/dist/features/lead-gen/index.css +59 -59
- package/dist/features/lead-gen/index.d.ts +3903 -2
- package/dist/features/lead-gen/index.js +15 -13
- package/dist/features/monitoring/index.js +10 -11
- package/dist/features/monitoring/requests/index.css +59 -59
- package/dist/features/monitoring/requests/index.js +8 -9
- package/dist/features/notes/index.js +4 -4
- package/dist/features/operations/index.css +59 -59
- package/dist/features/operations/index.js +13 -15
- package/dist/features/seo/index.css +659 -0
- package/dist/features/seo/index.d.ts +3962 -1
- package/dist/features/seo/index.js +31 -2
- package/dist/features/settings/index.css +59 -59
- package/dist/features/settings/index.d.ts +87 -3745
- package/dist/features/settings/index.js +10 -12
- package/dist/hooks/access/index.js +6 -7
- package/dist/hooks/delivery/index.css +59 -59
- package/dist/hooks/delivery/index.d.ts +13 -4
- package/dist/hooks/delivery/index.js +3 -3
- package/dist/hooks/published.d.ts +69 -27
- package/dist/hooks/published.js +19 -19
- package/dist/initialization/index.d.ts +35 -3716
- package/dist/knowledge/index.js +11 -11
- package/dist/layout/index.d.ts +55 -2
- package/dist/layout/index.js +10 -10
- package/dist/organization/index.css +59 -59
- package/dist/profile/index.d.ts +64 -3716
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.js +6 -7
- package/dist/provider/published.d.ts +3 -0
- package/dist/provider/published.js +6 -7
- package/dist/test-utils/index.js +3 -3
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/index.js +1 -1
- package/dist/types/index.d.ts +312 -251
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +9 -9
- package/src/hooks/README.md +22 -23
- package/dist/chunk-6ZAP3FOA.js +0 -93
- package/dist/chunk-AH52XQB7.js +0 -1
- package/dist/chunk-GDOR57D7.js +0 -165
- package/dist/chunk-MISHPEJX.js +0 -244
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -879
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +0 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useScheduledTasks } from './chunk-N6K2Q5BM.js';
|
|
2
2
|
import { ZodFormRenderer } from './chunk-3MEXPLWT.js';
|
|
3
3
|
import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
|
|
4
|
+
import { AppShellCenteredContainer, AppShellLoader } from './chunk-EFQLXRYT.js';
|
|
4
5
|
import { useTimeRangeDates } from './chunk-YQQ5GRUR.js';
|
|
5
6
|
import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-HENXLGVD.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { glassBase } from './chunk-R6NMRXNO.js';
|
|
7
|
+
import { useCyberColors, GlowDot, JsonViewer, useExecuteResource, EmptyState, useDashboardMetrics, useResources, useUnresolvedErrors, useRecentExecutionsByResource, PageTitleCaption, HeroStatsRow, useCommandQueue, TabCountBadge, useResourcesHealth, TERMINAL_EXECUTION_STATUSES } from './chunk-K55TU6CC.js';
|
|
8
|
+
import { glassBase } from './chunk-4WLAVUPS.js';
|
|
9
9
|
import { CardHeader } from './chunk-62GVNH5U.js';
|
|
10
10
|
import { useInitialization } from './chunk-P45GQ3ZW.js';
|
|
11
11
|
import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-BLXJEIQS.js';
|
|
12
|
-
import { formatTimeAgo, formatRelativeTime } from './chunk-
|
|
12
|
+
import { formatTimeAgo, formatRelativeTime } from './chunk-5ZK7K7YP.js';
|
|
13
13
|
import { getTimeRangeDates } from './chunk-Y6I3IC45.js';
|
|
14
14
|
import { ResourceStatusColors } from './chunk-6SSQGWK7.js';
|
|
15
15
|
import { memo, useMemo, useEffect, useState, useCallback, Fragment } from 'react';
|
|
16
|
-
import { Paper, Stack, Text, Group, Badge, Box, useComputedColorScheme, Card, ActionIcon,
|
|
16
|
+
import { Paper, Stack, Text, Group, Badge, Box, useComputedColorScheme, Loader, Card, ActionIcon, SegmentedControl, Collapse, Button, Modal, Center, SimpleGrid, Title, Tabs, Grid, ThemeIcon } from '@mantine/core';
|
|
17
17
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
18
18
|
import { Position, Handle, getSmoothStepPath, BaseEdge as BaseEdge$1, EdgeLabelRenderer, Panel, useReactFlow, Controls, ReactFlowProvider, ReactFlow } from '@xyflow/react';
|
|
19
19
|
import { IconPlayerPlay, IconPlayerStop, IconArrowsSplit, IconSquare, IconFocus2, IconChevronRight, IconArrowUpRight, IconLayoutDashboard, IconActivity, IconAlertTriangle, IconHandStop, IconCalendarEvent, IconCircleCheck, IconBrain, IconGitBranch, IconTool, IconWand, IconCheck, IconAlertCircle } from '@tabler/icons-react';
|
|
@@ -22,126 +22,405 @@ import { z } from 'zod';
|
|
|
22
22
|
import { notifications } from '@mantine/notifications';
|
|
23
23
|
import '@mantine/charts/styles.css';
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
() => ({
|
|
43
|
-
primary: fill(DOMAIN_COLORS.primary, isDark),
|
|
44
|
-
primaryGlow: glow(DOMAIN_COLORS.primary),
|
|
45
|
-
agent: fill(DOMAIN_COLORS.agent, isDark),
|
|
46
|
-
workflow: fill(DOMAIN_COLORS.workflow, isDark),
|
|
47
|
-
trigger: fill(DOMAIN_COLORS.trigger, isDark),
|
|
48
|
-
integration: fill(DOMAIN_COLORS.integration, isDark),
|
|
49
|
-
approval: fill(DOMAIN_COLORS.approval, isDark),
|
|
50
|
-
agentGlow: glow(DOMAIN_COLORS.agent),
|
|
51
|
-
workflowGlow: glow(DOMAIN_COLORS.workflow),
|
|
52
|
-
triggerGlow: glow(DOMAIN_COLORS.trigger),
|
|
53
|
-
integrationGlow: glow(DOMAIN_COLORS.integration),
|
|
54
|
-
approvalGlow: glow(DOMAIN_COLORS.approval),
|
|
55
|
-
edgeTriggers: fill(DOMAIN_COLORS.workflow, isDark),
|
|
56
|
-
edgeUses: fill(DOMAIN_COLORS.integration, isDark),
|
|
57
|
-
edgeApproval: fill(DOMAIN_COLORS.approval, isDark),
|
|
58
|
-
edgeTriggersGlow: glow(DOMAIN_COLORS.workflow),
|
|
59
|
-
edgeUsesGlow: glow(DOMAIN_COLORS.integration),
|
|
60
|
-
edgeApprovalGlow: glow(DOMAIN_COLORS.approval)
|
|
61
|
-
}),
|
|
62
|
-
[isDark]
|
|
25
|
+
function ExecutionStatusBadge({
|
|
26
|
+
status,
|
|
27
|
+
size = "sm",
|
|
28
|
+
variant = "light",
|
|
29
|
+
showLoader = true
|
|
30
|
+
}) {
|
|
31
|
+
const statusColors = STATUS_COLORS[status];
|
|
32
|
+
const isRunning = status === "running" && showLoader;
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
Badge,
|
|
35
|
+
{
|
|
36
|
+
color: statusColors.badge,
|
|
37
|
+
size,
|
|
38
|
+
variant,
|
|
39
|
+
leftSection: isRunning ? /* @__PURE__ */ jsx(Loader, { size: 10, color: statusColors.badge }) : void 0,
|
|
40
|
+
children: status.charAt(0).toUpperCase() + status.slice(1)
|
|
41
|
+
}
|
|
63
42
|
);
|
|
64
43
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
backgroundImage: `
|
|
71
|
-
linear-gradient(${mix(pct)} 1px, transparent 1px),
|
|
72
|
-
linear-gradient(90deg, ${mix(pct)} 1px, transparent 1px),
|
|
73
|
-
radial-gradient(ellipse at 50% 50%, ${mix(glowPct)} 0%, transparent 70%)
|
|
74
|
-
`,
|
|
75
|
-
backgroundColor: "color-mix(in srgb, var(--color-background) 50%, var(--glass-background))",
|
|
76
|
-
backdropFilter: "var(--glass-blur)",
|
|
77
|
-
backgroundSize: "40px 40px, 40px 40px, 100% 100%"
|
|
78
|
-
};
|
|
44
|
+
function getRateColor(rate) {
|
|
45
|
+
if (rate >= 95) return "var(--color-success)";
|
|
46
|
+
if (rate >= 80) return "var(--color-warning)";
|
|
47
|
+
return "var(--color-error)";
|
|
79
48
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
|
|
49
|
+
function getMantineRateColor(rate) {
|
|
50
|
+
if (rate >= 95) return "green";
|
|
51
|
+
if (rate >= 80) return "yellow";
|
|
52
|
+
return "red";
|
|
83
53
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
54
|
+
function ExecutionStats({
|
|
55
|
+
totalExecutions,
|
|
56
|
+
successCount,
|
|
57
|
+
failureCount,
|
|
58
|
+
warningCount,
|
|
59
|
+
successRate,
|
|
60
|
+
align = "flex-end",
|
|
61
|
+
compact = false
|
|
62
|
+
}) {
|
|
63
|
+
const cyberColors = useCyberColors();
|
|
64
|
+
if (totalExecutions === 0 && !compact) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
if (compact && totalExecutions === 0) {
|
|
68
|
+
return /* @__PURE__ */ jsxs(Group, { gap: 10, wrap: "nowrap", style: { width: "100%" }, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Text, { size: "md", fw: 700, ff: "monospace", c: "dimmed", style: { minWidth: 42 }, children: "\u2014" }),
|
|
70
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: "No recent executions" })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
if (compact) {
|
|
74
|
+
return /* @__PURE__ */ jsxs(Group, { gap: 10, wrap: "nowrap", style: { width: "100%" }, children: [
|
|
75
|
+
/* @__PURE__ */ jsxs(Group, { gap: 8, wrap: "nowrap", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs(Text, { size: "md", fw: 700, ff: "monospace", style: { color: getRateColor(successRate), minWidth: 42 }, children: [
|
|
77
|
+
successRate,
|
|
78
|
+
"%"
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", children: [
|
|
81
|
+
/* @__PURE__ */ jsx(GlowDot, { size: "sm", color: cyberColors.green }),
|
|
82
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, c: "green", children: successCount })
|
|
83
|
+
] }),
|
|
84
|
+
failureCount > 0 && /* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", children: [
|
|
85
|
+
/* @__PURE__ */ jsx(GlowDot, { size: "sm", color: cyberColors.red }),
|
|
86
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, c: "red", children: failureCount })
|
|
87
|
+
] })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: [
|
|
90
|
+
totalExecutions,
|
|
91
|
+
" ",
|
|
92
|
+
totalExecutions === 1 ? "run" : "runs"
|
|
93
|
+
] })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 2, align, style: { whiteSpace: "nowrap" }, children: [
|
|
97
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "blue", children: [
|
|
98
|
+
totalExecutions,
|
|
99
|
+
" ",
|
|
100
|
+
totalExecutions === 1 ? "execution" : "executions"
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "green", children: [
|
|
103
|
+
successCount,
|
|
104
|
+
" success"
|
|
105
|
+
] }),
|
|
106
|
+
warningCount != null && warningCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "yellow", children: [
|
|
107
|
+
warningCount,
|
|
108
|
+
" warning"
|
|
109
|
+
] }),
|
|
110
|
+
failureCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "red", children: [
|
|
111
|
+
failureCount,
|
|
112
|
+
" failed"
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxs(Text, { size: "xs", fw: 600, c: getMantineRateColor(successRate), children: [
|
|
115
|
+
successRate,
|
|
116
|
+
"% Success Rate"
|
|
117
|
+
] })
|
|
118
|
+
] });
|
|
119
|
+
}
|
|
120
|
+
function TimelineAxis({ totalDuration }) {
|
|
121
|
+
const markers = [
|
|
122
|
+
{ position: 0, time: 0 },
|
|
123
|
+
{ position: 25, time: totalDuration * 0.25 },
|
|
124
|
+
{ position: 50, time: totalDuration * 0.5 },
|
|
125
|
+
{ position: 75, time: totalDuration * 0.75 },
|
|
126
|
+
{ position: 100, time: totalDuration }
|
|
127
|
+
];
|
|
86
128
|
return /* @__PURE__ */ jsx(
|
|
87
129
|
Box,
|
|
88
130
|
{
|
|
89
131
|
style: {
|
|
90
|
-
width: "100%",
|
|
91
|
-
height,
|
|
92
|
-
border: "1px solid var(--color-border)",
|
|
93
|
-
borderRadius: "var(--mantine-radius-md)",
|
|
94
|
-
overflow: "hidden",
|
|
95
132
|
position: "relative",
|
|
96
|
-
|
|
133
|
+
height: 20
|
|
97
134
|
},
|
|
98
|
-
children
|
|
135
|
+
children: markers.map((marker, idx) => /* @__PURE__ */ jsx(
|
|
136
|
+
Box,
|
|
137
|
+
{
|
|
138
|
+
style: {
|
|
139
|
+
position: "absolute",
|
|
140
|
+
left: `${marker.position}%`,
|
|
141
|
+
transform: marker.position === 100 ? "translateX(-100%)" : marker.position === 0 ? "none" : "translateX(-50%)",
|
|
142
|
+
top: 4
|
|
143
|
+
},
|
|
144
|
+
children: /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: formatDuration(marker.time) })
|
|
145
|
+
},
|
|
146
|
+
idx
|
|
147
|
+
))
|
|
99
148
|
}
|
|
100
149
|
);
|
|
101
150
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
function LegendDot({ color }) {
|
|
106
|
-
return /* @__PURE__ */ jsx(
|
|
151
|
+
function TimelineContainer({ executionStart, executionEnd, children }) {
|
|
152
|
+
const totalDuration = executionEnd - executionStart;
|
|
153
|
+
return /* @__PURE__ */ jsxs(
|
|
107
154
|
Box,
|
|
108
155
|
{
|
|
109
156
|
style: {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
157
|
+
borderBottom: "1px solid var(--color-border)",
|
|
158
|
+
backgroundColor: "var(--color-background)",
|
|
159
|
+
padding: "var(--mantine-spacing-xs)"
|
|
160
|
+
},
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
Box,
|
|
164
|
+
{
|
|
165
|
+
style: {
|
|
166
|
+
position: "relative"
|
|
167
|
+
},
|
|
168
|
+
children: /* @__PURE__ */ jsx(Box, { style: { position: "relative", zIndex: 1 }, children })
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ jsx(Box, { style: { paddingLeft: TIMELINE_CONSTANTS.LABEL_WIDTH + 12, paddingRight: 16 }, children: /* @__PURE__ */ jsx(TimelineAxis, { totalDuration }) })
|
|
172
|
+
]
|
|
115
173
|
}
|
|
116
174
|
);
|
|
117
175
|
}
|
|
118
|
-
function
|
|
176
|
+
function TimelineBar({
|
|
177
|
+
startTime,
|
|
178
|
+
endTime,
|
|
179
|
+
executionStart,
|
|
180
|
+
executionEnd,
|
|
181
|
+
status,
|
|
182
|
+
label,
|
|
183
|
+
onClick,
|
|
184
|
+
isSelected = false,
|
|
185
|
+
hasSelection = false
|
|
186
|
+
}) {
|
|
187
|
+
const colors = getStatusColors(status);
|
|
188
|
+
const { left, width } = calculateBarPosition(startTime, endTime, executionStart, executionEnd);
|
|
189
|
+
const opacity = hasSelection && !isSelected ? 0.5 : 1;
|
|
119
190
|
return /* @__PURE__ */ jsx(
|
|
120
191
|
Box,
|
|
121
192
|
{
|
|
122
193
|
style: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
194
|
+
position: "absolute",
|
|
195
|
+
left: `${left}%`,
|
|
196
|
+
width: `${width}%`,
|
|
197
|
+
top: 4,
|
|
198
|
+
height: TIMELINE_CONSTANTS.BAR_HEIGHT / 2,
|
|
199
|
+
backgroundColor: colors.color,
|
|
200
|
+
opacity,
|
|
201
|
+
borderRadius: 4,
|
|
202
|
+
cursor: onClick ? "pointer" : "default",
|
|
203
|
+
display: "flex",
|
|
204
|
+
alignItems: "center",
|
|
205
|
+
justifyContent: "center",
|
|
206
|
+
overflow: "hidden"
|
|
207
|
+
},
|
|
208
|
+
onClick,
|
|
209
|
+
children: label && /* @__PURE__ */ jsx(Text, { size: "xs", c: "white", style: { whiteSpace: "nowrap" }, children: label })
|
|
128
210
|
}
|
|
129
211
|
);
|
|
130
212
|
}
|
|
131
|
-
function
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
213
|
+
function TimelineRow({
|
|
214
|
+
label,
|
|
215
|
+
bars,
|
|
216
|
+
executionStart,
|
|
217
|
+
executionEnd,
|
|
218
|
+
indent = 0,
|
|
219
|
+
selectedNodeId
|
|
220
|
+
}) {
|
|
221
|
+
const labelMatch = label.match(/^(.+?)\s*\((.+?)\)$/);
|
|
222
|
+
const labelName = labelMatch ? labelMatch[1] : label;
|
|
223
|
+
const labelDuration = labelMatch ? labelMatch[2] : null;
|
|
224
|
+
const statusColor = bars.length > 0 ? getStatusColors(bars[0].status).color : "var(--color-text-dimmed)";
|
|
225
|
+
const hasSelection = selectedNodeId !== null && selectedNodeId !== void 0;
|
|
226
|
+
return /* @__PURE__ */ jsxs(
|
|
227
|
+
Box,
|
|
228
|
+
{
|
|
229
|
+
style: {
|
|
230
|
+
display: "flex",
|
|
231
|
+
gap: 0,
|
|
232
|
+
height: TIMELINE_CONSTANTS.BAR_HEIGHT
|
|
233
|
+
// paddingLeft: indent * TIMELINE_CONSTANTS.INDENT_SIZE
|
|
234
|
+
},
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ jsxs(
|
|
237
|
+
Box,
|
|
238
|
+
{
|
|
239
|
+
style: {
|
|
240
|
+
height: TIMELINE_CONSTANTS.BAR_HEIGHT,
|
|
241
|
+
width: TIMELINE_CONSTANTS.LABEL_WIDTH,
|
|
242
|
+
flexShrink: 0,
|
|
243
|
+
display: "flex",
|
|
244
|
+
alignItems: "center",
|
|
245
|
+
gap: 6,
|
|
246
|
+
paddingRight: 12,
|
|
247
|
+
paddingLeft: 8 + indent * TIMELINE_CONSTANTS.INDENT_SIZE,
|
|
248
|
+
// Indent only the label, not the timeline bars
|
|
249
|
+
overflow: "hidden"
|
|
250
|
+
},
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ jsx(
|
|
253
|
+
Box,
|
|
254
|
+
{
|
|
255
|
+
style: {
|
|
256
|
+
width: 6,
|
|
257
|
+
height: 6,
|
|
258
|
+
borderRadius: "50%",
|
|
259
|
+
backgroundColor: statusColor,
|
|
260
|
+
flexShrink: 0
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
),
|
|
264
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", truncate: true, style: { flexShrink: 1, minWidth: 0 }, children: labelName }),
|
|
265
|
+
labelDuration && /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", ff: "monospace", style: { flexShrink: 0 }, children: [
|
|
266
|
+
"(",
|
|
267
|
+
labelDuration,
|
|
268
|
+
")"
|
|
269
|
+
] })
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
),
|
|
273
|
+
/* @__PURE__ */ jsx(
|
|
274
|
+
Box,
|
|
275
|
+
{
|
|
276
|
+
style: {
|
|
277
|
+
position: "relative",
|
|
278
|
+
flex: 1,
|
|
279
|
+
height: TIMELINE_CONSTANTS.BAR_HEIGHT,
|
|
280
|
+
marginLeft: 12,
|
|
281
|
+
marginRight: 16
|
|
282
|
+
// Right margin to match grid padding
|
|
283
|
+
},
|
|
284
|
+
children: bars.map((bar, idx) => {
|
|
285
|
+
const isSelected = bar.nodeId !== void 0 && bar.nodeId === selectedNodeId;
|
|
286
|
+
return /* @__PURE__ */ jsx(
|
|
287
|
+
TimelineBar,
|
|
288
|
+
{
|
|
289
|
+
...bar,
|
|
290
|
+
executionStart,
|
|
291
|
+
executionEnd,
|
|
292
|
+
isSelected,
|
|
293
|
+
hasSelection
|
|
294
|
+
},
|
|
295
|
+
idx
|
|
296
|
+
);
|
|
297
|
+
})
|
|
298
|
+
}
|
|
299
|
+
)
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
var DOMAIN_COLORS = {
|
|
305
|
+
primary: "var(--color-primary)",
|
|
306
|
+
agent: "#8b5cf6",
|
|
307
|
+
workflow: "#3b82f6",
|
|
308
|
+
trigger: "#f97316",
|
|
309
|
+
integration: "#14b8a6",
|
|
310
|
+
approval: "#f59e0b"
|
|
311
|
+
};
|
|
312
|
+
function fill(color, isDark) {
|
|
313
|
+
return isDark ? `color-mix(in srgb, ${color} 80%, black)` : `color-mix(in srgb, ${color} 60%, white)`;
|
|
314
|
+
}
|
|
315
|
+
function glow(color) {
|
|
316
|
+
return `color-mix(in srgb, ${color} 40%, transparent)`;
|
|
317
|
+
}
|
|
318
|
+
function useGraphTheme() {
|
|
319
|
+
const isDark = useComputedColorScheme("dark") === "dark";
|
|
320
|
+
return useMemo(
|
|
321
|
+
() => ({
|
|
322
|
+
primary: fill(DOMAIN_COLORS.primary, isDark),
|
|
323
|
+
primaryGlow: glow(DOMAIN_COLORS.primary),
|
|
324
|
+
agent: fill(DOMAIN_COLORS.agent, isDark),
|
|
325
|
+
workflow: fill(DOMAIN_COLORS.workflow, isDark),
|
|
326
|
+
trigger: fill(DOMAIN_COLORS.trigger, isDark),
|
|
327
|
+
integration: fill(DOMAIN_COLORS.integration, isDark),
|
|
328
|
+
approval: fill(DOMAIN_COLORS.approval, isDark),
|
|
329
|
+
agentGlow: glow(DOMAIN_COLORS.agent),
|
|
330
|
+
workflowGlow: glow(DOMAIN_COLORS.workflow),
|
|
331
|
+
triggerGlow: glow(DOMAIN_COLORS.trigger),
|
|
332
|
+
integrationGlow: glow(DOMAIN_COLORS.integration),
|
|
333
|
+
approvalGlow: glow(DOMAIN_COLORS.approval),
|
|
334
|
+
edgeTriggers: fill(DOMAIN_COLORS.workflow, isDark),
|
|
335
|
+
edgeUses: fill(DOMAIN_COLORS.integration, isDark),
|
|
336
|
+
edgeApproval: fill(DOMAIN_COLORS.approval, isDark),
|
|
337
|
+
edgeTriggersGlow: glow(DOMAIN_COLORS.workflow),
|
|
338
|
+
edgeUsesGlow: glow(DOMAIN_COLORS.integration),
|
|
339
|
+
edgeApprovalGlow: glow(DOMAIN_COLORS.approval)
|
|
340
|
+
}),
|
|
341
|
+
[isDark]
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function getGraphBackgroundStyles(isDark) {
|
|
345
|
+
const pct = isDark ? 5 : 3;
|
|
346
|
+
const glowPct = isDark ? 8 : 5;
|
|
347
|
+
const mix = (percent) => `color-mix(in srgb, var(--color-primary) ${percent}%, transparent)`;
|
|
348
|
+
return {
|
|
349
|
+
backgroundImage: `
|
|
350
|
+
linear-gradient(${mix(pct)} 1px, transparent 1px),
|
|
351
|
+
linear-gradient(90deg, ${mix(pct)} 1px, transparent 1px),
|
|
352
|
+
radial-gradient(ellipse at 50% 50%, ${mix(glowPct)} 0%, transparent 70%)
|
|
353
|
+
`,
|
|
354
|
+
backgroundColor: "color-mix(in srgb, var(--color-background) 50%, var(--glass-background))",
|
|
355
|
+
backdropFilter: "var(--glass-blur)",
|
|
356
|
+
backgroundSize: "40px 40px, 40px 40px, 100% 100%"
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
function useGraphBackgroundStyles() {
|
|
360
|
+
const isDark = useComputedColorScheme("dark") === "dark";
|
|
361
|
+
return useMemo(() => getGraphBackgroundStyles(isDark), [isDark]);
|
|
362
|
+
}
|
|
363
|
+
function GraphContainer({ children, height = 600 }) {
|
|
364
|
+
const backgroundStyles = useGraphBackgroundStyles();
|
|
365
|
+
return /* @__PURE__ */ jsx(
|
|
366
|
+
Box,
|
|
367
|
+
{
|
|
368
|
+
style: {
|
|
369
|
+
width: "100%",
|
|
370
|
+
height,
|
|
371
|
+
border: "1px solid var(--color-border)",
|
|
372
|
+
borderRadius: "var(--mantine-radius-md)",
|
|
373
|
+
overflow: "hidden",
|
|
374
|
+
position: "relative",
|
|
375
|
+
...backgroundStyles
|
|
376
|
+
},
|
|
377
|
+
children
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
function GraphBackground() {
|
|
382
|
+
return null;
|
|
383
|
+
}
|
|
384
|
+
function LegendDot({ color }) {
|
|
385
|
+
return /* @__PURE__ */ jsx(
|
|
386
|
+
Box,
|
|
387
|
+
{
|
|
388
|
+
style: {
|
|
389
|
+
width: 10,
|
|
390
|
+
height: 10,
|
|
391
|
+
borderRadius: "50%",
|
|
392
|
+
backgroundColor: `var(--mantine-color-${color}-5)`
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
function LegendLine({ color }) {
|
|
398
|
+
return /* @__PURE__ */ jsx(
|
|
399
|
+
Box,
|
|
400
|
+
{
|
|
401
|
+
style: {
|
|
402
|
+
width: 20,
|
|
403
|
+
height: 3,
|
|
404
|
+
borderRadius: 2,
|
|
405
|
+
background: `linear-gradient(90deg, var(--mantine-color-${color}-5), var(--mantine-color-${color}-6))`
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
function GraphLegend({ title = "Legend", items, position = "bottom-right" }) {
|
|
411
|
+
const margins = {
|
|
412
|
+
marginBottom: position.includes("bottom") ? 12 : void 0,
|
|
413
|
+
marginTop: position.includes("top") ? 12 : void 0,
|
|
414
|
+
marginRight: position.includes("right") ? 60 : 12,
|
|
415
|
+
marginLeft: position.includes("left") ? 12 : void 0
|
|
416
|
+
};
|
|
417
|
+
return /* @__PURE__ */ jsx(Panel, { position, style: margins, children: /* @__PURE__ */ jsx(Card, { p: "xs", className: Graph_module_css_default.legend, children: /* @__PURE__ */ jsxs(Group, { children: [
|
|
418
|
+
/* @__PURE__ */ jsx(
|
|
419
|
+
Text,
|
|
420
|
+
{
|
|
421
|
+
size: "xs",
|
|
422
|
+
fw: 600,
|
|
423
|
+
style: {
|
|
145
424
|
letterSpacing: "0.5px",
|
|
146
425
|
textTransform: "uppercase",
|
|
147
426
|
fontFamily: "var(--mantine-font-family-headings)"
|
|
@@ -358,285 +637,6 @@ var BaseEdge = memo(function BaseEdge2({
|
|
|
358
637
|
) })
|
|
359
638
|
] });
|
|
360
639
|
});
|
|
361
|
-
function ExecutionStatusBadge({
|
|
362
|
-
status,
|
|
363
|
-
size = "sm",
|
|
364
|
-
variant = "light",
|
|
365
|
-
showLoader = true
|
|
366
|
-
}) {
|
|
367
|
-
const statusColors = STATUS_COLORS[status];
|
|
368
|
-
const isRunning = status === "running" && showLoader;
|
|
369
|
-
return /* @__PURE__ */ jsx(
|
|
370
|
-
Badge,
|
|
371
|
-
{
|
|
372
|
-
color: statusColors.badge,
|
|
373
|
-
size,
|
|
374
|
-
variant,
|
|
375
|
-
leftSection: isRunning ? /* @__PURE__ */ jsx(Loader, { size: 10, color: statusColors.badge }) : void 0,
|
|
376
|
-
children: status.charAt(0).toUpperCase() + status.slice(1)
|
|
377
|
-
}
|
|
378
|
-
);
|
|
379
|
-
}
|
|
380
|
-
function getRateColor(rate) {
|
|
381
|
-
if (rate >= 95) return "var(--color-success)";
|
|
382
|
-
if (rate >= 80) return "var(--color-warning)";
|
|
383
|
-
return "var(--color-error)";
|
|
384
|
-
}
|
|
385
|
-
function getMantineRateColor(rate) {
|
|
386
|
-
if (rate >= 95) return "green";
|
|
387
|
-
if (rate >= 80) return "yellow";
|
|
388
|
-
return "red";
|
|
389
|
-
}
|
|
390
|
-
function ExecutionStats({
|
|
391
|
-
totalExecutions,
|
|
392
|
-
successCount,
|
|
393
|
-
failureCount,
|
|
394
|
-
warningCount,
|
|
395
|
-
successRate,
|
|
396
|
-
align = "flex-end",
|
|
397
|
-
compact = false
|
|
398
|
-
}) {
|
|
399
|
-
const cyberColors = useCyberColors();
|
|
400
|
-
if (totalExecutions === 0 && !compact) {
|
|
401
|
-
return null;
|
|
402
|
-
}
|
|
403
|
-
if (compact && totalExecutions === 0) {
|
|
404
|
-
return /* @__PURE__ */ jsxs(Group, { gap: 10, wrap: "nowrap", style: { width: "100%" }, children: [
|
|
405
|
-
/* @__PURE__ */ jsx(Text, { size: "md", fw: 700, ff: "monospace", c: "dimmed", style: { minWidth: 42 }, children: "\u2014" }),
|
|
406
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: "No recent executions" })
|
|
407
|
-
] });
|
|
408
|
-
}
|
|
409
|
-
if (compact) {
|
|
410
|
-
return /* @__PURE__ */ jsxs(Group, { gap: 10, wrap: "nowrap", style: { width: "100%" }, children: [
|
|
411
|
-
/* @__PURE__ */ jsxs(Group, { gap: 8, wrap: "nowrap", children: [
|
|
412
|
-
/* @__PURE__ */ jsxs(Text, { size: "md", fw: 700, ff: "monospace", style: { color: getRateColor(successRate), minWidth: 42 }, children: [
|
|
413
|
-
successRate,
|
|
414
|
-
"%"
|
|
415
|
-
] }),
|
|
416
|
-
/* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", children: [
|
|
417
|
-
/* @__PURE__ */ jsx(GlowDot, { size: "sm", color: cyberColors.green }),
|
|
418
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, c: "green", children: successCount })
|
|
419
|
-
] }),
|
|
420
|
-
failureCount > 0 && /* @__PURE__ */ jsxs(Group, { gap: 5, wrap: "nowrap", children: [
|
|
421
|
-
/* @__PURE__ */ jsx(GlowDot, { size: "sm", color: cyberColors.red }),
|
|
422
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, c: "red", children: failureCount })
|
|
423
|
-
] })
|
|
424
|
-
] }),
|
|
425
|
-
/* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: [
|
|
426
|
-
totalExecutions,
|
|
427
|
-
" ",
|
|
428
|
-
totalExecutions === 1 ? "run" : "runs"
|
|
429
|
-
] })
|
|
430
|
-
] });
|
|
431
|
-
}
|
|
432
|
-
return /* @__PURE__ */ jsxs(Stack, { gap: 2, align, style: { whiteSpace: "nowrap" }, children: [
|
|
433
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "blue", children: [
|
|
434
|
-
totalExecutions,
|
|
435
|
-
" ",
|
|
436
|
-
totalExecutions === 1 ? "execution" : "executions"
|
|
437
|
-
] }),
|
|
438
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", c: "green", children: [
|
|
439
|
-
successCount,
|
|
440
|
-
" success"
|
|
441
|
-
] }),
|
|
442
|
-
warningCount != null && warningCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "yellow", children: [
|
|
443
|
-
warningCount,
|
|
444
|
-
" warning"
|
|
445
|
-
] }),
|
|
446
|
-
failureCount > 0 && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "red", children: [
|
|
447
|
-
failureCount,
|
|
448
|
-
" failed"
|
|
449
|
-
] }),
|
|
450
|
-
/* @__PURE__ */ jsxs(Text, { size: "xs", fw: 600, c: getMantineRateColor(successRate), children: [
|
|
451
|
-
successRate,
|
|
452
|
-
"% Success Rate"
|
|
453
|
-
] })
|
|
454
|
-
] });
|
|
455
|
-
}
|
|
456
|
-
function TimelineAxis({ totalDuration }) {
|
|
457
|
-
const markers = [
|
|
458
|
-
{ position: 0, time: 0 },
|
|
459
|
-
{ position: 25, time: totalDuration * 0.25 },
|
|
460
|
-
{ position: 50, time: totalDuration * 0.5 },
|
|
461
|
-
{ position: 75, time: totalDuration * 0.75 },
|
|
462
|
-
{ position: 100, time: totalDuration }
|
|
463
|
-
];
|
|
464
|
-
return /* @__PURE__ */ jsx(
|
|
465
|
-
Box,
|
|
466
|
-
{
|
|
467
|
-
style: {
|
|
468
|
-
position: "relative",
|
|
469
|
-
height: 20
|
|
470
|
-
},
|
|
471
|
-
children: markers.map((marker, idx) => /* @__PURE__ */ jsx(
|
|
472
|
-
Box,
|
|
473
|
-
{
|
|
474
|
-
style: {
|
|
475
|
-
position: "absolute",
|
|
476
|
-
left: `${marker.position}%`,
|
|
477
|
-
transform: marker.position === 100 ? "translateX(-100%)" : marker.position === 0 ? "none" : "translateX(-50%)",
|
|
478
|
-
top: 4
|
|
479
|
-
},
|
|
480
|
-
children: /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: formatDuration(marker.time) })
|
|
481
|
-
},
|
|
482
|
-
idx
|
|
483
|
-
))
|
|
484
|
-
}
|
|
485
|
-
);
|
|
486
|
-
}
|
|
487
|
-
function TimelineContainer({ executionStart, executionEnd, children }) {
|
|
488
|
-
const totalDuration = executionEnd - executionStart;
|
|
489
|
-
return /* @__PURE__ */ jsxs(
|
|
490
|
-
Box,
|
|
491
|
-
{
|
|
492
|
-
style: {
|
|
493
|
-
borderBottom: "1px solid var(--color-border)",
|
|
494
|
-
backgroundColor: "var(--color-background)",
|
|
495
|
-
padding: "var(--mantine-spacing-xs)"
|
|
496
|
-
},
|
|
497
|
-
children: [
|
|
498
|
-
/* @__PURE__ */ jsx(
|
|
499
|
-
Box,
|
|
500
|
-
{
|
|
501
|
-
style: {
|
|
502
|
-
position: "relative"
|
|
503
|
-
},
|
|
504
|
-
children: /* @__PURE__ */ jsx(Box, { style: { position: "relative", zIndex: 1 }, children })
|
|
505
|
-
}
|
|
506
|
-
),
|
|
507
|
-
/* @__PURE__ */ jsx(Box, { style: { paddingLeft: TIMELINE_CONSTANTS.LABEL_WIDTH + 12, paddingRight: 16 }, children: /* @__PURE__ */ jsx(TimelineAxis, { totalDuration }) })
|
|
508
|
-
]
|
|
509
|
-
}
|
|
510
|
-
);
|
|
511
|
-
}
|
|
512
|
-
function TimelineBar({
|
|
513
|
-
startTime,
|
|
514
|
-
endTime,
|
|
515
|
-
executionStart,
|
|
516
|
-
executionEnd,
|
|
517
|
-
status,
|
|
518
|
-
label,
|
|
519
|
-
onClick,
|
|
520
|
-
isSelected = false,
|
|
521
|
-
hasSelection = false
|
|
522
|
-
}) {
|
|
523
|
-
const colors = getStatusColors(status);
|
|
524
|
-
const { left, width } = calculateBarPosition(startTime, endTime, executionStart, executionEnd);
|
|
525
|
-
const opacity = hasSelection && !isSelected ? 0.5 : 1;
|
|
526
|
-
return /* @__PURE__ */ jsx(
|
|
527
|
-
Box,
|
|
528
|
-
{
|
|
529
|
-
style: {
|
|
530
|
-
position: "absolute",
|
|
531
|
-
left: `${left}%`,
|
|
532
|
-
width: `${width}%`,
|
|
533
|
-
top: 4,
|
|
534
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT / 2,
|
|
535
|
-
backgroundColor: colors.color,
|
|
536
|
-
opacity,
|
|
537
|
-
borderRadius: 4,
|
|
538
|
-
cursor: onClick ? "pointer" : "default",
|
|
539
|
-
display: "flex",
|
|
540
|
-
alignItems: "center",
|
|
541
|
-
justifyContent: "center",
|
|
542
|
-
overflow: "hidden"
|
|
543
|
-
},
|
|
544
|
-
onClick,
|
|
545
|
-
children: label && /* @__PURE__ */ jsx(Text, { size: "xs", c: "white", style: { whiteSpace: "nowrap" }, children: label })
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
function TimelineRow({
|
|
550
|
-
label,
|
|
551
|
-
bars,
|
|
552
|
-
executionStart,
|
|
553
|
-
executionEnd,
|
|
554
|
-
indent = 0,
|
|
555
|
-
selectedNodeId
|
|
556
|
-
}) {
|
|
557
|
-
const labelMatch = label.match(/^(.+?)\s*\((.+?)\)$/);
|
|
558
|
-
const labelName = labelMatch ? labelMatch[1] : label;
|
|
559
|
-
const labelDuration = labelMatch ? labelMatch[2] : null;
|
|
560
|
-
const statusColor = bars.length > 0 ? getStatusColors(bars[0].status).color : "var(--color-text-dimmed)";
|
|
561
|
-
const hasSelection = selectedNodeId !== null && selectedNodeId !== void 0;
|
|
562
|
-
return /* @__PURE__ */ jsxs(
|
|
563
|
-
Box,
|
|
564
|
-
{
|
|
565
|
-
style: {
|
|
566
|
-
display: "flex",
|
|
567
|
-
gap: 0,
|
|
568
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT
|
|
569
|
-
// paddingLeft: indent * TIMELINE_CONSTANTS.INDENT_SIZE
|
|
570
|
-
},
|
|
571
|
-
children: [
|
|
572
|
-
/* @__PURE__ */ jsxs(
|
|
573
|
-
Box,
|
|
574
|
-
{
|
|
575
|
-
style: {
|
|
576
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT,
|
|
577
|
-
width: TIMELINE_CONSTANTS.LABEL_WIDTH,
|
|
578
|
-
flexShrink: 0,
|
|
579
|
-
display: "flex",
|
|
580
|
-
alignItems: "center",
|
|
581
|
-
gap: 6,
|
|
582
|
-
paddingRight: 12,
|
|
583
|
-
paddingLeft: 8 + indent * TIMELINE_CONSTANTS.INDENT_SIZE,
|
|
584
|
-
// Indent only the label, not the timeline bars
|
|
585
|
-
overflow: "hidden"
|
|
586
|
-
},
|
|
587
|
-
children: [
|
|
588
|
-
/* @__PURE__ */ jsx(
|
|
589
|
-
Box,
|
|
590
|
-
{
|
|
591
|
-
style: {
|
|
592
|
-
width: 6,
|
|
593
|
-
height: 6,
|
|
594
|
-
borderRadius: "50%",
|
|
595
|
-
backgroundColor: statusColor,
|
|
596
|
-
flexShrink: 0
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
),
|
|
600
|
-
/* @__PURE__ */ jsx(Text, { size: "sm", truncate: true, style: { flexShrink: 1, minWidth: 0 }, children: labelName }),
|
|
601
|
-
labelDuration && /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", ff: "monospace", style: { flexShrink: 0 }, children: [
|
|
602
|
-
"(",
|
|
603
|
-
labelDuration,
|
|
604
|
-
")"
|
|
605
|
-
] })
|
|
606
|
-
]
|
|
607
|
-
}
|
|
608
|
-
),
|
|
609
|
-
/* @__PURE__ */ jsx(
|
|
610
|
-
Box,
|
|
611
|
-
{
|
|
612
|
-
style: {
|
|
613
|
-
position: "relative",
|
|
614
|
-
flex: 1,
|
|
615
|
-
height: TIMELINE_CONSTANTS.BAR_HEIGHT,
|
|
616
|
-
marginLeft: 12,
|
|
617
|
-
marginRight: 16
|
|
618
|
-
// Right margin to match grid padding
|
|
619
|
-
},
|
|
620
|
-
children: bars.map((bar, idx) => {
|
|
621
|
-
const isSelected = bar.nodeId !== void 0 && bar.nodeId === selectedNodeId;
|
|
622
|
-
return /* @__PURE__ */ jsx(
|
|
623
|
-
TimelineBar,
|
|
624
|
-
{
|
|
625
|
-
...bar,
|
|
626
|
-
executionStart,
|
|
627
|
-
executionEnd,
|
|
628
|
-
isSelected,
|
|
629
|
-
hasSelection
|
|
630
|
-
},
|
|
631
|
-
idx
|
|
632
|
-
);
|
|
633
|
-
})
|
|
634
|
-
}
|
|
635
|
-
)
|
|
636
|
-
]
|
|
637
|
-
}
|
|
638
|
-
);
|
|
639
|
-
}
|
|
640
640
|
var VisualizerContainer = ({ children, handleContainerClick, height }) => {
|
|
641
641
|
const containerHeight = height ?? CONTAINER_CONSTANTS.CONTAINER_HEIGHT;
|
|
642
642
|
return /* @__PURE__ */ jsx(Box, { onClick: handleContainerClick, children: /* @__PURE__ */ jsx(
|
|
@@ -1072,7 +1072,7 @@ var nodeTypes2 = {
|
|
|
1072
1072
|
var edgeTypes2 = {
|
|
1073
1073
|
agentIteration: AgentIterationEdge
|
|
1074
1074
|
};
|
|
1075
|
-
var
|
|
1075
|
+
var isTerminal = (status) => TERMINAL_EXECUTION_STATUSES.includes(status);
|
|
1076
1076
|
function hasAgentLifecycleLogs(execution) {
|
|
1077
1077
|
return Boolean(
|
|
1078
1078
|
execution?.executionLogs?.some((log) => {
|
|
@@ -1088,10 +1088,10 @@ function getUnavailableTraceMessage(execution, selectedExecutionId) {
|
|
|
1088
1088
|
if (execution?.isArchived) {
|
|
1089
1089
|
return "Detailed trace unavailable for archived execution. Raw logs can be loaded below, but graph and detail rendering do not hydrate archived logs yet.";
|
|
1090
1090
|
}
|
|
1091
|
-
if (execution && execution.executionLogs.length === 0 &&
|
|
1091
|
+
if (execution && execution.executionLogs.length === 0 && isTerminal(execution.status)) {
|
|
1092
1092
|
return "Detailed trace unavailable. This terminal execution has no lifecycle logs available for graph rendering.";
|
|
1093
1093
|
}
|
|
1094
|
-
if (execution &&
|
|
1094
|
+
if (execution && isTerminal(execution.status) && !hasAgentLifecycleLogs(execution)) {
|
|
1095
1095
|
return "Detailed trace unavailable. This run has no agent lifecycle context, so raw logs are shown below instead.";
|
|
1096
1096
|
}
|
|
1097
1097
|
return null;
|