windmill-components 1.542.5 → 1.550.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/package/common.d.ts +4 -1
- package/package/components/AIAgentLogViewer.svelte +1 -1
- package/package/components/ArgEnum.svelte +14 -5
- package/package/components/ArgInput.svelte +23 -15
- package/package/components/ArgInput.svelte.d.ts +1 -1
- package/package/components/ChannelSelector.svelte +92 -18
- package/package/components/ChannelSelector.svelte.d.ts +2 -0
- package/package/components/ConnectionSection.svelte +12 -1
- package/package/components/Dev.svelte +18 -5
- package/package/components/Dev.svelte.d.ts +23 -1
- package/package/components/DisplayResult.svelte +36 -23
- package/package/components/DropdownV2.svelte +8 -2
- package/package/components/DropdownV2.svelte.d.ts +1 -0
- package/package/components/DynamicInput.svelte +10 -10
- package/package/components/EditableSchemaForm.svelte +21 -7
- package/package/components/ErrorOrRecoveryHandler.svelte +14 -20
- package/package/components/FlowHistoryJobPicker.svelte +3 -0
- package/package/components/FlowHistoryJobPicker.svelte.d.ts +1 -0
- package/package/components/FlowJobResult.svelte +5 -5
- package/package/components/FlowLogRow.svelte +2 -2
- package/package/components/FlowLogViewer.svelte +228 -57
- package/package/components/FlowLogViewer.svelte.d.ts +16 -5
- package/package/components/FlowLogViewerWrapper.svelte +56 -3
- package/package/components/FlowLogViewerWrapper.svelte.d.ts +4 -3
- package/package/components/FlowLoopIterationPreview.svelte +4 -4
- package/package/components/FlowMetadata.svelte +3 -4
- package/package/components/FlowMetadata.svelte.d.ts +4 -18
- package/package/components/FlowPreviewContent.svelte +9 -3
- package/package/components/FlowPreviewContent.svelte.d.ts +1 -1
- package/package/components/FlowStatusViewer.svelte +62 -59
- package/package/components/FlowStatusViewer.svelte.d.ts +2 -2
- package/package/components/FlowStatusViewerInner.svelte +186 -94
- package/package/components/FlowStatusViewerInner.svelte.d.ts +10 -3
- package/package/components/FlowTimeline.svelte +110 -131
- package/package/components/FlowTimeline.svelte.d.ts +13 -4
- package/package/components/FlowTimelineBar.svelte +227 -0
- package/package/components/FlowTimelineBar.svelte.d.ts +24 -0
- package/package/components/InputTransformForm.svelte +119 -3
- package/package/components/InputTransformForm.svelte.d.ts +3 -0
- package/package/components/InputTransformSchemaForm.svelte +5 -1
- package/package/components/InputTransformSchemaForm.svelte.d.ts +2 -0
- package/package/components/InstanceSetting.svelte +17 -42
- package/package/components/InstanceSettings.svelte +12 -21
- package/package/components/JobArgs.svelte +15 -16
- package/package/components/JobArgs.svelte.d.ts +4 -18
- package/package/components/JobLoader.svelte +23 -42
- package/package/components/JobLoader.svelte.d.ts +2 -0
- package/package/components/JobStatus.svelte +1 -1
- package/package/components/JobStatus.svelte.d.ts +4 -18
- package/package/components/ModulePreviewResultViewer.svelte +1 -7
- package/package/components/NextcloudSetting.svelte +6 -1
- package/package/components/Password.svelte +7 -11
- package/package/components/Password.svelte.d.ts +5 -20
- package/package/components/PasswordArgInput.svelte +35 -15
- package/package/components/PasswordArgInput.svelte.d.ts +4 -18
- package/package/components/QueuePosition.svelte +6 -2
- package/package/components/RunForm.svelte +5 -14
- package/package/components/S3ArrayHelperButton.svelte +12 -0
- package/package/components/S3ArrayHelperButton.svelte.d.ts +8 -0
- package/package/components/ScriptEditor.svelte +5 -6
- package/package/components/StringTypeNarrowing.svelte +39 -24
- package/package/components/StringTypeNarrowing.svelte.d.ts +1 -1
- package/package/components/TeamSelector.svelte +83 -37
- package/package/components/TeamSelector.svelte.d.ts +0 -1
- package/package/components/apps/components/buttons/AppButton.svelte +11 -1
- package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte +13 -4
- package/package/components/apps/components/display/table/SyncColumnDefs.svelte +2 -2
- package/package/components/apps/components/display/table/utils.js +1 -1
- package/package/components/apps/components/helpers/RefreshButton.svelte +5 -1
- package/package/components/apps/components/helpers/RunnableComponent.svelte +0 -2
- package/package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +1 -0
- package/package/components/apps/components/layout/AppTabs.svelte +116 -71
- package/package/components/apps/components/layout/AppTabs.svelte.d.ts +1 -0
- package/package/components/apps/editor/component/ComponentInner.svelte +1 -0
- package/package/components/apps/editor/component/components.d.ts +16 -1
- package/package/components/apps/editor/component/components.js +22 -2
- package/package/components/apps/editor/settingsPanel/ComponentPanel.svelte +2 -0
- package/package/components/apps/editor/settingsPanel/GridTab.svelte +19 -1
- package/package/components/apps/editor/settingsPanel/GridTab.svelte.d.ts +3 -1
- package/package/components/apps/editor/settingsPanel/GridTabHidden.svelte +52 -0
- package/package/components/apps/editor/settingsPanel/GridTabHidden.svelte.d.ts +9 -0
- package/package/components/auditLogs/AuditLogsFilters.svelte +6 -0
- package/package/components/auditLogs/AuditLogsTable.svelte +17 -7
- package/package/components/auditLogs/AuditLogsTable.svelte.d.ts +1 -0
- package/package/components/common/CloseButton.svelte +2 -2
- package/package/components/common/CloseButton.svelte.d.ts +1 -0
- package/package/components/common/layout/List.svelte +3 -7
- package/package/components/common/layout/List.svelte.d.ts +7 -29
- package/package/components/common/popup/PopupV2.svelte +8 -25
- package/package/components/common/popup/PopupV2.svelte.d.ts +4 -2
- package/package/components/common/table/ScriptRow.svelte +22 -2
- package/package/components/copilot/FlowCopilotInputsModal.svelte +26 -23
- package/package/components/copilot/chat/AIChatManager.svelte.js +3 -2
- package/package/components/copilot/chat/ProviderModelSelector.svelte +1 -1
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +4 -2
- package/package/components/copilot/chat/script/core.d.ts +4 -4
- package/package/components/copilot/chat/script/core.js +93 -34
- package/package/components/copilot/lib.d.ts +1 -0
- package/package/components/copilot/lib.js +6 -3
- package/package/components/custom_ui.d.ts +1 -0
- package/package/components/flows/FlowProgressBar.svelte +16 -16
- package/package/components/flows/FlowProgressBar.svelte.d.ts +7 -22
- package/package/components/flows/content/FlowInputsQuick.svelte +3 -2
- package/package/components/flows/content/FlowInputsQuick.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowModuleComponent.svelte +24 -1
- package/package/components/flows/flowInfers.js +34 -8
- package/package/components/flows/flowStore.d.ts +4 -1
- package/package/components/flows/map/FlowJobsMenu.svelte +3 -3
- package/package/components/flows/map/FlowJobsMenu.svelte.d.ts +1 -1
- package/package/components/flows/map/InsertModuleButton.svelte +4 -14
- package/package/components/flows/map/InsertModuleButton.svelte.d.ts +0 -1
- package/package/components/flows/map/InsertModuleInner.svelte +17 -20
- package/package/components/flows/map/MapItem.svelte +1 -1
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +38 -52
- package/package/components/flows/pickers/PickHubScriptQuick.svelte.d.ts +1 -0
- package/package/components/flows/pickers/WorkspaceScriptPickerQuick.svelte +27 -15
- package/package/components/flows/pickers/WorkspaceScriptPickerQuick.svelte.d.ts +1 -0
- package/package/components/flows/propPicker/OutputPicker.svelte +2 -0
- package/package/components/git_sync/DetectionFlow.svelte +33 -44
- package/package/components/git_sync/DetectionFlow.svelte.d.ts +1 -0
- package/package/components/git_sync/GitSyncContext.svelte.d.ts +22 -0
- package/package/components/git_sync/GitSyncContext.svelte.js +145 -5
- package/package/components/git_sync/GitSyncModeDisplay.svelte +14 -0
- package/package/components/git_sync/GitSyncModeDisplay.svelte.d.ts +9 -0
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +365 -253
- package/package/components/git_sync/GitSyncRepositoryCard.svelte.d.ts +10 -1
- package/package/components/git_sync/GitSyncSection.svelte +134 -14
- package/package/components/git_sync/PullWorkspaceModal.svelte +24 -32
- package/package/components/git_sync/PushWorkspaceModal.svelte +24 -32
- package/package/components/graph/model.d.ts +5 -5
- package/package/components/graph/renderers/edges/EmptyEdge.svelte +3 -10
- package/package/components/graph/renderers/edges/EmptyEdge.svelte.d.ts +4 -18
- package/package/components/graph/renderers/nodes/AIToolNode.svelte +2 -2
- package/package/components/graph/renderers/nodes/NewAIToolNode.svelte +5 -10
- package/package/components/home/ItemsList.svelte +1 -1
- package/package/components/jobs/JobProgressBar.svelte +27 -21
- package/package/components/jobs/JobProgressBar.svelte.d.ts +9 -24
- package/package/components/meltComponents/MenuSingleItem.svelte +3 -8
- package/package/components/meltComponents/MenuSingleItem.svelte.d.ts +0 -3
- package/package/components/meltComponents/Popover.svelte +3 -2
- package/package/components/meltComponents/Popover.svelte.d.ts +1 -0
- package/package/components/meltComponents/Tooltip.svelte +1 -1
- package/package/components/progressBar/ProgressBar.svelte +39 -53
- package/package/components/progressBar/ProgressBar.svelte.d.ts +11 -26
- package/package/components/runs/JobsLoader.svelte +1 -1
- package/package/components/runs/NoWorkerWithTagWarning.svelte +3 -3
- package/package/components/runs/NoWorkerWithTagWarning.svelte.d.ts +1 -1
- package/package/components/schema/AddPropertyV2.svelte +7 -4
- package/package/components/schema/PropertyEditor.svelte.d.ts +1 -1
- package/package/components/select/MultiSelect.svelte +2 -2
- package/package/components/select/MultiSelect.svelte.d.ts +1 -0
- package/package/components/settings/WorkspaceUserSettings.svelte +92 -1
- package/package/components/sidebar/MenuLink.svelte +2 -1
- package/package/components/sidebar/MenuLink.svelte.d.ts +1 -0
- package/package/components/sidebar/SidebarContent.svelte +27 -27
- package/package/components/table/Cell.svelte +7 -14
- package/package/components/table/Cell.svelte.d.ts +13 -35
- package/package/components/triggers/AddTriggersButton.svelte +1 -0
- package/package/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte +1 -1
- package/package/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte.d.ts +2 -1
- package/package/components/triggers/gcp/GcpTriggerEditorInner.svelte +28 -5
- package/package/components/triggers/gcp/utils.js +1 -0
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +1 -0
- package/package/components/triggers/webhook/WebhooksConfigSection.svelte +143 -63
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +22 -0
- package/package/components/triggers/websocket/utils.js +1 -0
- package/package/components/workspaceSettings/AISettings.svelte +8 -2
- package/package/components/workspaceSettings/AISettings.svelte.d.ts +2 -1
- package/package/components/workspaceSettings/ModelTokenLimits.svelte +165 -0
- package/package/components/workspaceSettings/ModelTokenLimits.svelte.d.ts +8 -0
- package/package/components/workspaceSettings/StorageSettings.svelte +123 -51
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +141 -16
- package/package/gen/schemas.gen.js +144 -16
- package/package/gen/services.gen.d.ts +62 -42
- package/package/gen/services.gen.js +131 -82
- package/package/gen/types.gen.d.ts +218 -144
- package/package/hubPaths.json +2 -1
- package/package/services/JobManager.js +10 -7
- package/package/stores.d.ts +1 -0
- package/package/stores.js +6 -3
- package/package/timelineCompute.svelte.d.ts +21 -0
- package/package/timelineCompute.svelte.js +113 -0
- package/package/utils.d.ts +15 -8
- package/package/utils.js +62 -12
- package/package/workspace_settings.d.ts +13 -8
- package/package/workspace_settings.js +46 -11
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ import MultiSelect from './select/MultiSelect.svelte';
|
|
|
12
12
|
import { FlowService, JobService, ScriptService, WorkspaceService } from '../gen';
|
|
13
13
|
import { inferArgs } from '../infer';
|
|
14
14
|
import { hubBaseUrlStore } from '../stores';
|
|
15
|
-
import { CheckCircle2, Loader2, RotateCw, XCircle
|
|
15
|
+
import { CheckCircle2, Loader2, RotateCw, XCircle } from 'lucide-svelte';
|
|
16
16
|
import { hubPaths } from '../hub';
|
|
17
17
|
import { isCloudHosted } from '../cloud';
|
|
18
18
|
const slackRecoveryHandler = hubPaths.slackRecoveryHandler;
|
|
@@ -24,9 +24,8 @@ const teamsSuccessHandler = hubPaths.teamsSuccessHandler;
|
|
|
24
24
|
let { errorOrRecovery, isEditable, toggleText = 'Enable', showScriptHelpText = false, handlerSelected = $bindable('custom'), handlerPath = $bindable(), handlerExtraArgs = $bindable(), customScriptTemplate, customHandlerKind = $bindable('script'), customTabTooltip, } = $props();
|
|
25
25
|
let customHandlerSchema = $state();
|
|
26
26
|
let slackHandlerSchema = $state();
|
|
27
|
-
let isFetching = $state(false);
|
|
28
|
-
let teams_channels = $state([]);
|
|
29
27
|
let teams_team_name = $state(undefined);
|
|
28
|
+
let teams_team_id = $state(undefined);
|
|
30
29
|
let workspaceConnectedToSlack = $state(undefined);
|
|
31
30
|
let workspaceConnectedToTeams = $state(undefined);
|
|
32
31
|
let connectionTestJob = $state();
|
|
@@ -42,7 +41,6 @@ async function loadSlackResources() {
|
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
async function loadTeamsResources() {
|
|
45
|
-
isFetching = true;
|
|
46
44
|
const settings = await WorkspaceService.getSettings({ workspace: $workspaceStore });
|
|
47
45
|
if (!emptyString(settings.teams_team_name) && !emptyString(settings.teams_team_id)) {
|
|
48
46
|
workspaceConnectedToTeams = true;
|
|
@@ -52,11 +50,8 @@ async function loadTeamsResources() {
|
|
|
52
50
|
}
|
|
53
51
|
if (workspaceConnectedToTeams) {
|
|
54
52
|
teams_team_name = settings.teams_team_name;
|
|
55
|
-
|
|
56
|
-
workspace: $workspaceStore
|
|
57
|
-
});
|
|
53
|
+
teams_team_id = settings.teams_team_id;
|
|
58
54
|
}
|
|
59
|
-
isFetching = false;
|
|
60
55
|
}
|
|
61
56
|
async function sendMessage(channel, platform) {
|
|
62
57
|
const testJobFunction = platform === 'slack'
|
|
@@ -447,24 +442,23 @@ $effect(() => {
|
|
|
447
442
|
<ChannelSelector
|
|
448
443
|
containerClass="flex-grow"
|
|
449
444
|
minWidth="200px"
|
|
450
|
-
placeholder="
|
|
451
|
-
|
|
445
|
+
placeholder="Search Teams channels"
|
|
446
|
+
teamId={teams_team_id}
|
|
452
447
|
bind:selectedChannel={
|
|
453
448
|
() =>
|
|
454
449
|
handlerExtraArgs['channel']
|
|
455
|
-
?
|
|
450
|
+
? {
|
|
451
|
+
channel_id: handlerExtraArgs['channel'],
|
|
452
|
+
channel_name: handlerExtraArgs['channel_name']
|
|
453
|
+
}
|
|
456
454
|
: undefined,
|
|
457
|
-
(channel) =>
|
|
455
|
+
(channel) => {
|
|
456
|
+
handlerExtraArgs['channel'] = channel?.channel_id;
|
|
457
|
+
handlerExtraArgs['channel_name'] = channel?.channel_name;
|
|
458
|
+
}
|
|
458
459
|
}
|
|
460
|
+
onError={(e) => sendUserToast('Failed to load channels: ' + e.message, true)}
|
|
459
461
|
/>
|
|
460
|
-
<div class="flex-shrink-0">
|
|
461
|
-
<button
|
|
462
|
-
onclick={loadTeamsResources}
|
|
463
|
-
class="flex items-center gap-1 p-1.5 rounded hover:bg-surface-hover focus:bg-surface-hover"
|
|
464
|
-
>
|
|
465
|
-
<RefreshCcw size={16} class={isFetching ? 'animate-spin' : ''} />
|
|
466
|
-
</button>
|
|
467
|
-
</div>
|
|
468
462
|
</div>
|
|
469
463
|
</div>
|
|
470
464
|
<div class="flex flex-row gap-2 pb-4">
|
|
@@ -7,8 +7,10 @@ import { JobService } from '../gen';
|
|
|
7
7
|
export let path;
|
|
8
8
|
export let selected = undefined;
|
|
9
9
|
export let selectInitial = false;
|
|
10
|
+
export let loading = false;
|
|
10
11
|
const dispatch = createEventDispatcher();
|
|
11
12
|
async function loadInitial() {
|
|
13
|
+
loading = true;
|
|
12
14
|
let jobs = await JobService.listJobs({
|
|
13
15
|
workspace: $workspaceStore,
|
|
14
16
|
scriptPathExact: path,
|
|
@@ -24,6 +26,7 @@ async function loadInitial() {
|
|
|
24
26
|
else {
|
|
25
27
|
dispatch('nohistory');
|
|
26
28
|
}
|
|
29
|
+
loading = false;
|
|
27
30
|
}
|
|
28
31
|
$: $workspaceStore && loadInitial();
|
|
29
32
|
</script>
|
|
@@ -7,11 +7,11 @@ let { waitingForExecutor = false, result, result_stream, logs, col = false, noBo
|
|
|
7
7
|
|
|
8
8
|
<div
|
|
9
9
|
class:border={!noBorder}
|
|
10
|
-
class="
|
|
11
|
-
? 'grid-cols-2'
|
|
12
|
-
: '
|
|
10
|
+
class="{!col
|
|
11
|
+
? 'grid grid-cols-2'
|
|
12
|
+
: 'flex flex-col max-h-screen gap-4'} shadow border border-tertiary-inverse grow overflow-hidden"
|
|
13
13
|
>
|
|
14
|
-
<div class="bg-surface {col ? '' : 'max-h-80'} p-1 overflow-auto relative">
|
|
14
|
+
<div class="bg-surface {col ? 'max-h-1/2 grow' : 'max-h-80'} p-1 overflow-auto relative">
|
|
15
15
|
<span class="text-tertiary">Result</span>
|
|
16
16
|
{#if result !== undefined || result_stream !== undefined}
|
|
17
17
|
<DisplayResult {workspaceId} {jobId} {filename} {result} {result_stream} growVertical />
|
|
@@ -21,7 +21,7 @@ let { waitingForExecutor = false, result, result_stream, logs, col = false, noBo
|
|
|
21
21
|
<div class="text-gray-400">No result (result is undefined)</div>
|
|
22
22
|
{/if}
|
|
23
23
|
</div>
|
|
24
|
-
<div class="overflow-auto {col ? '' : 'max-h-80'} relative">
|
|
24
|
+
<div class="overflow-auto {col ? 'grow' : 'max-h-80'} relative">
|
|
25
25
|
{#if aiAgentStatus}
|
|
26
26
|
<AiAgentLogViewer {...aiAgentStatus} {workspaceId} />
|
|
27
27
|
{:else}
|
|
@@ -17,7 +17,7 @@ function handleClick() {
|
|
|
17
17
|
>
|
|
18
18
|
<button
|
|
19
19
|
class={twMerge(
|
|
20
|
-
'py-1 leading-tight w-full flex items-center justify-left text-xs text-tertiary hover:text-primary ',
|
|
20
|
+
'py-1 leading-tight w-full flex items-center justify-left text-xs text-tertiary hover:text-primary hover:bg-surface-hover ',
|
|
21
21
|
isCurrent(id) ? 'bg-surface-hover text-primary' : '',
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
@@ -44,7 +44,7 @@ function handleClick() {
|
|
|
44
44
|
</div>
|
|
45
45
|
</button>
|
|
46
46
|
|
|
47
|
-
{#if isExpanded(id) || !isCollapsible}
|
|
47
|
+
{#if isExpanded(id, isRunning) || !isCollapsible}
|
|
48
48
|
<div class="my-1 transition-all duration-200 ease-in-out">
|
|
49
49
|
<div class="pl-4">
|
|
50
50
|
{@render children()}
|
|
@@ -10,7 +10,8 @@ import BarsStaggered from './icons/BarsStaggered.svelte';
|
|
|
10
10
|
import { updateLinks } from '../keyboardChain';
|
|
11
11
|
import FlowLogRow from './FlowLogRow.svelte';
|
|
12
12
|
import { Tooltip } from './meltComponents';
|
|
13
|
-
|
|
13
|
+
import FlowTimelineBar from './FlowTimelineBar.svelte';
|
|
14
|
+
let { modules, localModuleStates, rootJob, expandedRows, allExpanded, showResultsInputs, toggleExpanded, toggleExpandAll, workspaceId, render, level = 0, flowId = 'root', onSelectedIteration, getSelectedIteration, flowSummary, mode = 'flow', currentId, navigationChain = $bindable(), select, timelineMin: timelineMinAbsolute, timelineTotal: timelineTotalAbsolute, timelineItems, timelineNow, timelineAvailableWidths = $bindable(), timelinelWidth, showTimeline = true } = $props();
|
|
14
15
|
function getJobLink(jobId) {
|
|
15
16
|
if (!jobId)
|
|
16
17
|
return '';
|
|
@@ -28,6 +29,8 @@ function getStatusColor(status) {
|
|
|
28
29
|
return status ? statusColors[status] : 'text-gray-400';
|
|
29
30
|
}
|
|
30
31
|
function getFlowStatus(job) {
|
|
32
|
+
if (!job)
|
|
33
|
+
return undefined;
|
|
31
34
|
if (job.type === 'CompletedJob') {
|
|
32
35
|
return job.success ? 'Success' : 'Failure';
|
|
33
36
|
}
|
|
@@ -39,7 +42,7 @@ function getFlowStatus(job) {
|
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
function getStepProgress(job, totalSteps) {
|
|
42
|
-
if (totalSteps === 0)
|
|
45
|
+
if (!job || totalSteps === 0)
|
|
43
46
|
return '';
|
|
44
47
|
const stepWord = mode === 'aiagent' ? 'action' : 'step';
|
|
45
48
|
// If flow is completed, show total steps
|
|
@@ -122,6 +125,8 @@ function findParentsOfErrors(modules) {
|
|
|
122
125
|
}
|
|
123
126
|
// Get flow info for display
|
|
124
127
|
const flowInfo = $derived.by(() => {
|
|
128
|
+
if (!rootJob)
|
|
129
|
+
return undefined;
|
|
125
130
|
const parentsWithErrors = findParentsOfErrors(modules);
|
|
126
131
|
return {
|
|
127
132
|
jobId: rootJob.id,
|
|
@@ -135,6 +140,7 @@ const flowInfo = $derived.by(() => {
|
|
|
135
140
|
};
|
|
136
141
|
});
|
|
137
142
|
let subloopNavigationChains = $state({});
|
|
143
|
+
let useRelativeTimeline = $state(false);
|
|
138
144
|
function buildNavigationLinks() {
|
|
139
145
|
const items = [];
|
|
140
146
|
// Flow header (always first)
|
|
@@ -143,7 +149,10 @@ function buildNavigationLinks() {
|
|
|
143
149
|
return { [`flow-${flowId}`]: { upId: null, downId: null } };
|
|
144
150
|
}
|
|
145
151
|
// Flow input (if exists and shown)
|
|
146
|
-
if (showResultsInputs &&
|
|
152
|
+
if (showResultsInputs &&
|
|
153
|
+
flowInfo &&
|
|
154
|
+
flowInfo.inputs &&
|
|
155
|
+
Object.keys(flowInfo.inputs).length > 0) {
|
|
147
156
|
items.push(`flow-${flowId}-input`);
|
|
148
157
|
}
|
|
149
158
|
// Add modules in order
|
|
@@ -176,7 +185,10 @@ function buildNavigationLinks() {
|
|
|
176
185
|
}
|
|
177
186
|
});
|
|
178
187
|
// Flow result (if exists and shown)
|
|
179
|
-
if (showResultsInputs &&
|
|
188
|
+
if (showResultsInputs &&
|
|
189
|
+
flowInfo &&
|
|
190
|
+
flowInfo.result !== undefined &&
|
|
191
|
+
rootJob?.type === 'CompletedJob') {
|
|
180
192
|
items.push(`flow-${flowId}-result`);
|
|
181
193
|
}
|
|
182
194
|
// Convert items to navigation links
|
|
@@ -227,6 +239,14 @@ function getSubflows(module) {
|
|
|
227
239
|
});
|
|
228
240
|
}
|
|
229
241
|
else if (module.value.type === 'branchall' || module.value.type === 'branchone') {
|
|
242
|
+
// Add default branch for branchone
|
|
243
|
+
if (module.value.type === 'branchone') {
|
|
244
|
+
subflows.push({
|
|
245
|
+
modules: module.value.default,
|
|
246
|
+
label: 'default',
|
|
247
|
+
flowId: `${module.id}-subflow-default`
|
|
248
|
+
});
|
|
249
|
+
}
|
|
230
250
|
// Add all branches
|
|
231
251
|
for (let i = 0; i < module.value.branches.length; i++) {
|
|
232
252
|
const branch = module.value.branches[i];
|
|
@@ -236,17 +256,75 @@ function getSubflows(module) {
|
|
|
236
256
|
flowId: `${module.id}-subflow-${i}`
|
|
237
257
|
});
|
|
238
258
|
}
|
|
239
|
-
// Add default branch for branchone
|
|
240
|
-
if (module.value.type === 'branchone') {
|
|
241
|
-
subflows.push({
|
|
242
|
-
modules: module.value.default,
|
|
243
|
-
label: 'default',
|
|
244
|
-
flowId: `${module.id}-subflow-default`
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
259
|
}
|
|
248
260
|
return subflows;
|
|
249
261
|
}
|
|
262
|
+
const { timelineMin, timelineTotal } = $derived({
|
|
263
|
+
timelineMin: useRelativeTimeline && rootJob?.started_at
|
|
264
|
+
? new Date(rootJob.started_at).getTime()
|
|
265
|
+
: timelineMinAbsolute,
|
|
266
|
+
timelineTotal: useRelativeTimeline && rootJob?.['duration_ms']
|
|
267
|
+
? rootJob['duration_ms']
|
|
268
|
+
: timelineTotalAbsolute
|
|
269
|
+
});
|
|
270
|
+
function getSubflowJob(moduleId, idx, branchChosen, moduleType) {
|
|
271
|
+
// if a branch is chosen, ignore the other branches
|
|
272
|
+
if (branchChosen !== undefined && branchChosen !== idx) {
|
|
273
|
+
return undefined;
|
|
274
|
+
}
|
|
275
|
+
const jobType = localModuleStates[moduleId]?.type === 'Failure' ||
|
|
276
|
+
localModuleStates[moduleId]?.type === 'Success'
|
|
277
|
+
? 'CompletedJob'
|
|
278
|
+
: 'QueuedJob';
|
|
279
|
+
let jobId = localModuleStates[moduleId]?.job_id;
|
|
280
|
+
let timelineItem = timelineItems?.[moduleId]?.find((item) => item.id === jobId);
|
|
281
|
+
let success = localModuleStates[moduleId]?.type === 'Success';
|
|
282
|
+
let result = localModuleStates[moduleId]?.result;
|
|
283
|
+
// if the subflow is part of a loop or branchAll
|
|
284
|
+
if (localModuleStates[moduleId]?.flow_jobs) {
|
|
285
|
+
const index = moduleType === 'forloopflow' || moduleType === 'whileloopflow'
|
|
286
|
+
? (localModuleStates[moduleId]?.selectedForloopIndex ?? idx)
|
|
287
|
+
: idx;
|
|
288
|
+
jobId = localModuleStates[moduleId]?.flow_jobs[index];
|
|
289
|
+
timelineItem = timelineItems?.[moduleId]?.find((item) => item.id === jobId);
|
|
290
|
+
result = localModuleStates[moduleId]?.flow_jobs_results?.[index];
|
|
291
|
+
success = localModuleStates[moduleId]?.flow_jobs_success?.[index] ?? false;
|
|
292
|
+
}
|
|
293
|
+
return {
|
|
294
|
+
id: jobId,
|
|
295
|
+
type: jobType,
|
|
296
|
+
logs: localModuleStates[moduleId]?.logs,
|
|
297
|
+
result: result,
|
|
298
|
+
args: localModuleStates[moduleId]?.args,
|
|
299
|
+
success: success,
|
|
300
|
+
started_at: timelineItem?.started_at,
|
|
301
|
+
created_at: timelineItem?.created_at,
|
|
302
|
+
duration_ms: timelineItem?.duration_ms
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function getSelectedIndex(moduleId, moduleItems) {
|
|
306
|
+
if (!moduleItems || !localModuleStates[moduleId])
|
|
307
|
+
return undefined;
|
|
308
|
+
const idToFind = localModuleStates[moduleId].selectedForloop ?? localModuleStates[moduleId].job_id;
|
|
309
|
+
const index = moduleItems?.findIndex((item) => item.id === idToFind);
|
|
310
|
+
if (index === -1) {
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
313
|
+
return index;
|
|
314
|
+
}
|
|
315
|
+
function isJobFailure(jobId, moduleId) {
|
|
316
|
+
if (!moduleId) {
|
|
317
|
+
return rootJob?.type === 'CompletedJob' && rootJob?.['success'] === false;
|
|
318
|
+
}
|
|
319
|
+
// if a jobId is provided, check the flow_jobs_success array for a specific job
|
|
320
|
+
if (localModuleStates[moduleId]?.flow_jobs_success && !!jobId) {
|
|
321
|
+
const index = localModuleStates[moduleId]?.flow_jobs?.indexOf(jobId);
|
|
322
|
+
if (index !== undefined && index >= 0) {
|
|
323
|
+
return localModuleStates[moduleId]?.flow_jobs_success?.[index] === false;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return localModuleStates[moduleId]?.type === 'Failure';
|
|
327
|
+
}
|
|
250
328
|
</script>
|
|
251
329
|
|
|
252
330
|
{#if render}
|
|
@@ -258,6 +336,20 @@ function getSubflows(module) {
|
|
|
258
336
|
{/snippet}
|
|
259
337
|
<Keyboard size={16} class="text-tertiary" />
|
|
260
338
|
</Tooltip>
|
|
339
|
+
<div class="flex items-center gap-2 whitespace-nowrap">
|
|
340
|
+
<label for="showTimeline" class="text-xs text-tertiary hover:text-primary transition-colors"
|
|
341
|
+
>Show timeline</label
|
|
342
|
+
>
|
|
343
|
+
<div class="flex-shrink-0">
|
|
344
|
+
<input
|
|
345
|
+
type="checkbox"
|
|
346
|
+
name="showTimeline"
|
|
347
|
+
id="showTimeline"
|
|
348
|
+
bind:checked={showTimeline}
|
|
349
|
+
class="w-3 h-4 accent-primary -my-1"
|
|
350
|
+
/>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
261
353
|
<div class="flex items-center gap-2 whitespace-nowrap">
|
|
262
354
|
<label
|
|
263
355
|
for="showResultsInputs"
|
|
@@ -292,27 +384,60 @@ function getSubflows(module) {
|
|
|
292
384
|
<FlowLogRow
|
|
293
385
|
id={`flow-${flowId}`}
|
|
294
386
|
isCollapsible={level > 0}
|
|
295
|
-
isRunning={rootJob
|
|
387
|
+
isRunning={rootJob?.type === 'QueuedJob'}
|
|
296
388
|
{isCurrent}
|
|
297
389
|
{isExpanded}
|
|
298
390
|
{toggleExpanded}
|
|
299
|
-
class={rootJob
|
|
391
|
+
class={rootJob?.type === undefined ? 'opacity-50' : ''}
|
|
300
392
|
{select}
|
|
301
393
|
>
|
|
302
394
|
{#snippet label()}
|
|
303
395
|
<div class="flex items-center gap-2">
|
|
304
396
|
<!-- Flow icon -->
|
|
305
|
-
{@render flowIcon(
|
|
397
|
+
{@render flowIcon(getFlowStatus(rootJob), flowInfo?.hasErrors)}
|
|
306
398
|
|
|
307
|
-
<div class="text-xs text-left font-mono
|
|
399
|
+
<div class="text-xs text-left font-mono">
|
|
308
400
|
{mode === 'aiagent' ? 'AI Agent' : level == 0 ? 'Flow' : 'Subflow'}
|
|
309
|
-
{#if flowInfo
|
|
401
|
+
{#if flowInfo?.label}
|
|
310
402
|
: {flowInfo.label}
|
|
311
403
|
{/if}
|
|
312
404
|
<span class="text-tertiary">{getStepProgress(rootJob, modules.length)}</span>
|
|
313
405
|
</div>
|
|
314
406
|
|
|
315
|
-
|
|
407
|
+
<div
|
|
408
|
+
class="min-w-min grow group"
|
|
409
|
+
bind:clientWidth={
|
|
410
|
+
() => timelineAvailableWidths[flowId] ?? 0,
|
|
411
|
+
(v) => (timelineAvailableWidths[flowId] = v)
|
|
412
|
+
}
|
|
413
|
+
>
|
|
414
|
+
{#if timelineItems && showTimeline && timelineMin != undefined && timelineTotal}
|
|
415
|
+
{@const moduleItems = [
|
|
416
|
+
{
|
|
417
|
+
started_at: rootJob?.started_at
|
|
418
|
+
? new Date(rootJob.started_at).getTime()
|
|
419
|
+
: undefined,
|
|
420
|
+
duration_ms: rootJob?.['duration_ms'] ?? timelineTotal,
|
|
421
|
+
id: flowId
|
|
422
|
+
}
|
|
423
|
+
]}
|
|
424
|
+
<FlowTimelineBar
|
|
425
|
+
total={timelineTotal}
|
|
426
|
+
min={timelineMin}
|
|
427
|
+
items={moduleItems}
|
|
428
|
+
now={timelineNow}
|
|
429
|
+
{timelinelWidth}
|
|
430
|
+
showZoomButtons={level > 0 && isExpanded(`flow-${flowId}`)}
|
|
431
|
+
onZoom={() => {
|
|
432
|
+
useRelativeTimeline = !useRelativeTimeline
|
|
433
|
+
}}
|
|
434
|
+
zoom={useRelativeTimeline ? 'in' : 'out'}
|
|
435
|
+
isJobFailure={(id) => isJobFailure(id)}
|
|
436
|
+
/>
|
|
437
|
+
{/if}
|
|
438
|
+
</div>
|
|
439
|
+
|
|
440
|
+
{#if flowInfo?.jobId}
|
|
316
441
|
<a
|
|
317
442
|
href={getJobLink(flowInfo.jobId)}
|
|
318
443
|
class="text-xs text-gray-400 hover:text-primary pl-1"
|
|
@@ -326,10 +451,10 @@ function getSubflows(module) {
|
|
|
326
451
|
</div>
|
|
327
452
|
{/snippet}
|
|
328
453
|
|
|
329
|
-
{#if level === 0 || isExpanded(`flow-${flowId}`, rootJob
|
|
454
|
+
{#if level === 0 || isExpanded(`flow-${flowId}`, rootJob?.type === 'QueuedJob')}
|
|
330
455
|
<div class="mb-2 transition-all duration-200 ease-in-out w-full">
|
|
331
456
|
<!-- Flow logs -->
|
|
332
|
-
{#if flowInfo
|
|
457
|
+
{#if flowInfo?.logs}
|
|
333
458
|
<LogViewer
|
|
334
459
|
content={flowInfo.logs}
|
|
335
460
|
jobId={flowInfo.jobId}
|
|
@@ -346,7 +471,7 @@ function getSubflows(module) {
|
|
|
346
471
|
<!-- Flow steps - nested as children -->
|
|
347
472
|
<ul class="w-full font-mono text-xs bg-surface-secondary list-none border-l">
|
|
348
473
|
<!-- Flow inputs as first row entry -->
|
|
349
|
-
{#if showResultsInputs && flowInfo
|
|
474
|
+
{#if showResultsInputs && flowInfo?.inputs && Object.keys(flowInfo.inputs).length > 0}
|
|
350
475
|
<FlowLogRow
|
|
351
476
|
id={`flow-${flowId}-input`}
|
|
352
477
|
isCollapsible={true}
|
|
@@ -379,6 +504,12 @@ function getSubflows(module) {
|
|
|
379
504
|
{@const isRunning = status === 'InProgress' || status === 'WaitingForExecutor'}
|
|
380
505
|
{@const hasEmptySubflowValue = hasEmptySubflow(module.id, module.value.type)}
|
|
381
506
|
{@const isCollapsible = !hasEmptySubflowValue}
|
|
507
|
+
{@const jobId = localModuleStates[module.id]?.job_id}
|
|
508
|
+
{@const moduleItems = timelineItems?.[module.id]}
|
|
509
|
+
{@const branchChosen =
|
|
510
|
+
module.value.type === 'branchone'
|
|
511
|
+
? (localModuleStates[module.id]?.branchChosen ?? 0)
|
|
512
|
+
: undefined}
|
|
382
513
|
<FlowLogRow
|
|
383
514
|
id={module.id}
|
|
384
515
|
{isCollapsible}
|
|
@@ -400,12 +531,12 @@ function getSubflows(module) {
|
|
|
400
531
|
: ''
|
|
401
532
|
)}
|
|
402
533
|
>
|
|
403
|
-
<div class="flex items-center gap-2
|
|
534
|
+
<div class="flex items-center gap-2">
|
|
404
535
|
<!-- Step icon -->
|
|
405
536
|
{@render stepIcon(
|
|
406
537
|
module.value.type,
|
|
407
538
|
status as FlowStatusModule['type'],
|
|
408
|
-
flowInfo
|
|
539
|
+
flowInfo?.parentsWithErrors.has(module.id)
|
|
409
540
|
)}
|
|
410
541
|
|
|
411
542
|
<div class="flex items-center gap-2">
|
|
@@ -447,7 +578,7 @@ function getSubflows(module) {
|
|
|
447
578
|
</span>
|
|
448
579
|
{#if !hasEmptySubflowValue && localModuleStates[module.id]?.flow_jobs && (module.value.type === 'forloopflow' || module.value.type === 'whileloopflow')}
|
|
449
580
|
<span
|
|
450
|
-
class="text-xs font-mono font-medium inline-flex items-center
|
|
581
|
+
class="text-xs font-mono font-medium inline-flex items-center -my-2"
|
|
451
582
|
>
|
|
452
583
|
<button onclick={(e) => e.stopPropagation()}>
|
|
453
584
|
<FlowJobsMenu
|
|
@@ -470,49 +601,78 @@ function getSubflows(module) {
|
|
|
470
601
|
</div>
|
|
471
602
|
</div>
|
|
472
603
|
|
|
473
|
-
|
|
474
|
-
{
|
|
475
|
-
{
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
604
|
+
<div
|
|
605
|
+
class="min-w-min grow {isLeafStep ? 'mr-2' : 'mr-6'} min-h-2"
|
|
606
|
+
bind:clientWidth={
|
|
607
|
+
() => timelineAvailableWidths[module.id] ?? 0,
|
|
608
|
+
(v) => (timelineAvailableWidths[module.id] = v)
|
|
609
|
+
}
|
|
610
|
+
>
|
|
611
|
+
{#if timelineMin != undefined && timelineTotal && moduleItems && showTimeline}
|
|
612
|
+
<FlowTimelineBar
|
|
613
|
+
total={timelineTotal}
|
|
614
|
+
min={timelineMin}
|
|
615
|
+
items={moduleItems ?? []}
|
|
616
|
+
now={timelineNow}
|
|
617
|
+
{timelinelWidth}
|
|
618
|
+
onSelectIteration={(id) => {
|
|
619
|
+
if (
|
|
620
|
+
module.value.type !== 'forloopflow' &&
|
|
621
|
+
module.value.type !== 'whileloopflow'
|
|
622
|
+
) {
|
|
623
|
+
return
|
|
624
|
+
}
|
|
625
|
+
const index =
|
|
626
|
+
localModuleStates[module.id]?.flow_jobs?.indexOf(id) ?? undefined
|
|
627
|
+
if (index !== undefined) {
|
|
628
|
+
onSelectedIteration?.({
|
|
629
|
+
id,
|
|
630
|
+
index,
|
|
631
|
+
manuallySet: true,
|
|
632
|
+
moduleId: module.id
|
|
633
|
+
})
|
|
634
|
+
}
|
|
635
|
+
}}
|
|
636
|
+
showIterations={localModuleStates[module.id]?.flow_jobs}
|
|
637
|
+
selectedIndex={getSelectedIndex(module.id, moduleItems)}
|
|
638
|
+
idToIterationIndex={(id) => {
|
|
639
|
+
return localModuleStates[module.id]?.flow_jobs?.indexOf(id)
|
|
640
|
+
}}
|
|
641
|
+
isJobFailure={() => isJobFailure(undefined, module.id)}
|
|
642
|
+
/>
|
|
484
643
|
{/if}
|
|
644
|
+
</div>
|
|
645
|
+
|
|
646
|
+
{#if isLeafStep && jobId}
|
|
647
|
+
<a
|
|
648
|
+
href={getJobLink(jobId ?? '')}
|
|
649
|
+
class="text-xs text-gray-400 hover:text-primary pl-1"
|
|
650
|
+
target="_blank"
|
|
651
|
+
rel="noopener noreferrer"
|
|
652
|
+
>
|
|
653
|
+
<ExternalLink size={12} />
|
|
654
|
+
</a>
|
|
485
655
|
{/if}
|
|
486
656
|
</div>
|
|
487
657
|
{/snippet}
|
|
488
658
|
|
|
489
659
|
{#if isCollapsible && isExpanded(module.id, isRunning)}
|
|
490
|
-
{@const
|
|
491
|
-
{@const logs = localModuleStates[module.id]?.logs}
|
|
492
|
-
{@const result = localModuleStates[module.id]?.result}
|
|
493
|
-
{@const jobId = localModuleStates[module.id]?.job_id}
|
|
660
|
+
{@const subflows = getSubflows(module)}
|
|
494
661
|
<div class="my-1 transition-all duration-200 ease-in-out border-l">
|
|
495
662
|
<!-- Show child steps if they exist -->
|
|
496
|
-
{#each
|
|
497
|
-
{@const subflowJob =
|
|
498
|
-
id
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
: ('QueuedJob' as Job['type']),
|
|
504
|
-
logs,
|
|
505
|
-
result,
|
|
506
|
-
args,
|
|
507
|
-
success: localModuleStates[module.id]?.type === 'Success'
|
|
508
|
-
}}
|
|
663
|
+
{#each subflows as subflow, idx}
|
|
664
|
+
{@const subflowJob = getSubflowJob(
|
|
665
|
+
module.id,
|
|
666
|
+
idx,
|
|
667
|
+
branchChosen,
|
|
668
|
+
module.value.type
|
|
669
|
+
)}
|
|
509
670
|
<div class="border-l mb-2">
|
|
510
671
|
<!-- Recursively render child steps using FlowLogViewer -->
|
|
511
672
|
<FlowLogViewer
|
|
512
673
|
modules={subflow.modules}
|
|
513
674
|
{localModuleStates}
|
|
514
675
|
rootJob={subflowJob}
|
|
515
|
-
flowStatus={localModuleStates[module.id]?.type}
|
|
516
676
|
{expandedRows}
|
|
517
677
|
{allExpanded}
|
|
518
678
|
{showResultsInputs}
|
|
@@ -528,11 +688,22 @@ function getSubflows(module) {
|
|
|
528
688
|
{currentId}
|
|
529
689
|
bind:navigationChain={subloopNavigationChains[subflow.flowId]}
|
|
530
690
|
{select}
|
|
691
|
+
{timelineNow}
|
|
692
|
+
{timelineMin}
|
|
693
|
+
{timelineTotal}
|
|
694
|
+
{timelineItems}
|
|
695
|
+
bind:timelineAvailableWidths
|
|
696
|
+
{timelinelWidth}
|
|
697
|
+
{showTimeline}
|
|
531
698
|
/>
|
|
532
699
|
</div>
|
|
533
700
|
{/each}
|
|
534
701
|
|
|
535
|
-
{#if
|
|
702
|
+
{#if subflows.length === 0}
|
|
703
|
+
{@const args = localModuleStates[module.id]?.args}
|
|
704
|
+
{@const logs = localModuleStates[module.id]?.logs}
|
|
705
|
+
{@const result = localModuleStates[module.id]?.result}
|
|
706
|
+
{@const jobId = localModuleStates[module.id]?.job_id}
|
|
536
707
|
<!-- Show input arguments -->
|
|
537
708
|
{#if showResultsInputs && isLeafStep && args && Object.keys(args).length > 0}
|
|
538
709
|
<FlowLogRow
|
|
@@ -626,7 +797,7 @@ function getSubflows(module) {
|
|
|
626
797
|
{/if}
|
|
627
798
|
|
|
628
799
|
<!-- Flow result as last row entry -->
|
|
629
|
-
{#if showResultsInputs && flowInfo
|
|
800
|
+
{#if showResultsInputs && flowInfo?.result !== undefined && rootJob?.type === 'CompletedJob'}
|
|
630
801
|
<FlowLogRow
|
|
631
802
|
id={`flow-${flowId}-result`}
|
|
632
803
|
isCollapsible={true}
|
|
@@ -652,7 +823,7 @@ function getSubflows(module) {
|
|
|
652
823
|
</ul>
|
|
653
824
|
{/if}
|
|
654
825
|
|
|
655
|
-
{#snippet flowIcon(status: FlowStatusModule['type'] | undefined, hasErrors: boolean)}
|
|
826
|
+
{#snippet flowIcon(status: FlowStatusModule['type'] | undefined, hasErrors: boolean | undefined)}
|
|
656
827
|
{@const colorClass = getStatusColor(status)}
|
|
657
828
|
<div class="relative flex items-center">
|
|
658
829
|
<BarsStaggered
|
|
@@ -671,7 +842,7 @@ function getSubflows(module) {
|
|
|
671
842
|
{#snippet stepIcon(
|
|
672
843
|
stepType: string | undefined,
|
|
673
844
|
status: FlowStatusModule['type'] | undefined,
|
|
674
|
-
hasErrors: boolean
|
|
845
|
+
hasErrors: boolean | undefined
|
|
675
846
|
)}
|
|
676
847
|
{@const colorClass = getStatusColor(status)}
|
|
677
848
|
{@const animationClass = status === 'InProgress' ? 'animate-pulse' : ''}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import FlowLogViewer from './FlowLogViewer.svelte';
|
|
2
|
-
import type { FlowModule,
|
|
2
|
+
import type { FlowModule, Job } from '../gen';
|
|
3
3
|
import type { GraphModuleState } from './graph/model';
|
|
4
4
|
import type { NavigationChain } from '../keyboardChain';
|
|
5
5
|
type RootJobData = Partial<Job>;
|
|
6
6
|
interface Props {
|
|
7
7
|
modules: FlowModule[];
|
|
8
8
|
localModuleStates: Record<string, GraphModuleState>;
|
|
9
|
-
rootJob: RootJobData;
|
|
10
|
-
flowStatus: FlowStatusModule['type'] | undefined;
|
|
9
|
+
rootJob: RootJobData | undefined;
|
|
11
10
|
expandedRows: Record<string, boolean>;
|
|
12
11
|
allExpanded?: boolean;
|
|
13
12
|
showResultsInputs?: boolean;
|
|
@@ -17,7 +16,7 @@ interface Props {
|
|
|
17
16
|
render: boolean;
|
|
18
17
|
level?: number;
|
|
19
18
|
flowId: string;
|
|
20
|
-
onSelectedIteration
|
|
19
|
+
onSelectedIteration?: (detail: {
|
|
21
20
|
id: string;
|
|
22
21
|
index: number;
|
|
23
22
|
manuallySet: true;
|
|
@@ -32,7 +31,19 @@ interface Props {
|
|
|
32
31
|
currentId?: string | null;
|
|
33
32
|
navigationChain?: NavigationChain;
|
|
34
33
|
select: (id: string) => void;
|
|
34
|
+
timelineMin?: number;
|
|
35
|
+
timelineTotal?: number;
|
|
36
|
+
timelineItems?: Record<string, Array<{
|
|
37
|
+
created_at?: number;
|
|
38
|
+
started_at?: number;
|
|
39
|
+
duration_ms?: number;
|
|
40
|
+
id: string;
|
|
41
|
+
}>>;
|
|
42
|
+
timelineNow: number;
|
|
43
|
+
timelineAvailableWidths: Record<string, number>;
|
|
44
|
+
timelinelWidth: number;
|
|
45
|
+
showTimeline?: boolean;
|
|
35
46
|
}
|
|
36
|
-
declare const FlowLogViewer: import("svelte").Component<Props, {}, "navigationChain">;
|
|
47
|
+
declare const FlowLogViewer: import("svelte").Component<Props, {}, "navigationChain" | "timelineAvailableWidths">;
|
|
37
48
|
type FlowLogViewer = ReturnType<typeof FlowLogViewer>;
|
|
38
49
|
export default FlowLogViewer;
|