Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow Relationship Tree #2487

Merged
merged 72 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
68a514d
Accordion component updates (#2316)
laurakwhit Sep 12, 2024
bd34e6e
Highlight active link in nav bar (#2324)
laurakwhit Sep 12, 2024
0ea3d60
Add workflow electron
Alex-Tideman Sep 17, 2024
8e76540
Add http api port and async update flag (#2314)
Alex-Tideman Sep 17, 2024
d496841
Show all possible failures for WorkflowTaskError (#2328)
Alex-Tideman Sep 17, 2024
d57594a
Add border
Alex-Tideman Sep 18, 2024
b03b7eb
Merge branch 'main' into codefreeze-09.12.24
Alex-Tideman Sep 18, 2024
4f68115
Merge branch 'codefreeze-09.12.24' into workflow-electron
Alex-Tideman Sep 18, 2024
6bed6a0
WIP: filter
Alex-Tideman Sep 18, 2024
cff5fdc
Bump express from 4.19.2 to 4.20.0 (#2323)
dependabot[bot] Sep 18, 2024
cd3b18a
Bump vite from 5.0.13 to 5.2.14 (#2329)
dependabot[bot] Sep 18, 2024
37f142c
Fix the go things
Alex-Tideman Sep 18, 2024
0335adf
MVP of electron. Needs some performance tweaks and to add links to ea…
Alex-Tideman Sep 18, 2024
2b649ed
Add icons, clean up
Alex-Tideman Sep 19, 2024
5ccc8f9
Remove commented out code
Alex-Tideman Sep 19, 2024
3a42b2c
Update snapshots
Alex-Tideman Sep 19, 2024
f70fe35
Update go to 1.22.6 (#2334)
Alex-Tideman Sep 19, 2024
ade48fe
Fix merge conflict
Alex-Tideman Sep 19, 2024
b001988
Merge branch 'main' into workflow-electron
Alex-Tideman Sep 24, 2024
5ac9b2e
Small UI fixes (#2345)
laurakwhit Sep 24, 2024
62944b9
2.31.1 (#2346)
temporal-cicd[bot] Sep 24, 2024
e4e2453
Update version.go to v2.31.0 (#2347)
Alex-Tideman Sep 25, 2024
1e0cdf5
Use go 1.23.0 (#2348)
Alex-Tideman Sep 25, 2024
2943464
Use 1.23 (#2349)
Alex-Tideman Sep 25, 2024
412abee
Update go version to 1.23 in update ui-server (#2351)
Alex-Tideman Sep 26, 2024
df9be0c
Add breadcrumbs for nodes
Alex-Tideman Sep 30, 2024
c89e663
Add hover/click state with opacity
Alex-Tideman Sep 30, 2024
5617b14
Add back child table
Alex-Tideman Sep 30, 2024
c5b094e
Fix overfetching issue
Alex-Tideman Oct 1, 2024
d8416b0
Fix merge conflicts
Alex-Tideman Oct 10, 2024
46b9fac
Fix icon type
Alex-Tideman Oct 10, 2024
06de6e4
WIP Family Tree
Alex-Tideman Oct 14, 2024
5118b2e
Merge branch 'main' into workflow-electron-with-family-tree
Alex-Tideman Oct 14, 2024
37bbbdc
Get math right for tree positions
Alex-Tideman Oct 14, 2024
3d2d3ad
I did things but can't remember what
Alex-Tideman Oct 16, 2024
46f15f6
Merge branch 'main' into workflow-electron-with-family-tree
Alex-Tideman Oct 22, 2024
5c85a10
Remove electron stuff
Alex-Tideman Oct 22, 2024
e21a9d0
Fix merge conflicts
Alex-Tideman Dec 5, 2024
ae3d0c6
Get rid of pane
Alex-Tideman Dec 5, 2024
71d39da
Merge branch 'main' into workflow-family-tree
Alex-Tideman Dec 12, 2024
854096e
Add side panel descriptions
Alex-Tideman Dec 16, 2024
63d3b50
Better styles and status color
Alex-Tideman Dec 16, 2024
ee7e50d
Better side nav buttons. Better lines to dots. Need to fix the tree n…
Alex-Tideman Dec 18, 2024
78afaed
Add link, needs a better place
Alex-Tideman Dec 18, 2024
62f5eed
Better styles on description, add links, fix opening nodes
Alex-Tideman Dec 18, 2024
ab3a14e
Add table of info and link vis/sidenav with open/close
Alex-Tideman Dec 18, 2024
d90e081
Merge branch 'main' into workflow-family-tree
Alex-Tideman Dec 18, 2024
d52d923
Merge branch 'main' into workflow-family-tree
Alex-Tideman Dec 18, 2024
809006f
Add table
Alex-Tideman Dec 18, 2024
09a553d
Better description
Alex-Tideman Dec 18, 2024
5066cba
fix lines
Alex-Tideman Dec 18, 2024
e048ffa
Better isActive, isCurrent checks
Alex-Tideman Dec 19, 2024
5a6e2fe
isCurrent check
Alex-Tideman Dec 19, 2024
f89b546
Make split 50/50
Alex-Tideman Dec 19, 2024
7355f8c
Fix types
Alex-Tideman Jan 6, 2025
09d246d
Better styles for active, better borders.
Alex-Tideman Jan 6, 2025
78009c4
Refactor to include root, clean up styles, better basis widths
Alex-Tideman Jan 7, 2025
35a578e
Add root child count on node tree
Alex-Tideman Jan 7, 2025
b068d26
Make tree sticky on lg screens
Alex-Tideman Jan 7, 2025
9234a06
Add CaN tree
Alex-Tideman Jan 7, 2025
236803d
Add schedule tree
Alex-Tideman Jan 7, 2025
99de548
Delete all unused tables
Alex-Tideman Jan 7, 2025
bed6fa1
Delete breadcrumbs
Alex-Tideman Jan 7, 2025
fb76b4a
Use justify-end to move links to far right
Alex-Tideman Jan 7, 2025
0559a08
Fix sm screen layout
Alex-Tideman Jan 7, 2025
7d251c3
Make visual a little shorter at 240px, hide times if small screen
Alex-Tideman Jan 7, 2025
701de7c
Add dash and min-w for end time, py-1
Alex-Tideman Jan 7, 2025
a83055d
Fix root node click and accessibility issues
Alex-Tideman Jan 7, 2025
ed8e10c
Bump maxZoomOut for a lot of children
Alex-Tideman Jan 7, 2025
3185c6f
Add back old tables in case api not supported or if we wanna go labs …
Alex-Tideman Jan 8, 2025
c1d55a2
Small style updates based on feedback, better responsive padding
Alex-Tideman Jan 8, 2025
6b45e13
Better count placement
Alex-Tideman Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions src/lib/components/event/payload-decoder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { page } from '$app/stores';

import { authUser } from '$lib/stores/auth-user';
import type { Memo } from '$lib/types';
import type { EventAttribute, WorkflowEvent } from '$lib/types/events';
import {
cloneAllPotentialPayloadsWithCodec,
Expand All @@ -15,7 +16,11 @@
} from '$lib/utilities/get-codec';
import { stringifyWithBigInt } from '$lib/utilities/parse-with-big-int';

export let value: PotentiallyDecodable | EventAttribute | WorkflowEvent;
export let value:
| PotentiallyDecodable
| EventAttribute
| WorkflowEvent
| Memo;
export let key = '';
export let onDecode: (decodedValue: string) => void | undefined = undefined;

Expand All @@ -36,7 +41,7 @@
};

const decodePayloads = async (
_value: PotentiallyDecodable | EventAttribute | WorkflowEvent,
_value: PotentiallyDecodable | EventAttribute | WorkflowEvent | Memo,
) => {
try {
const convertedAttributes = await cloneAllPotentialPayloadsWithCodec(
Expand Down
6 changes: 4 additions & 2 deletions src/lib/components/lines-and-dots/workflow-details.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { translate } from '$lib/i18n/translate';
import { relativeTime, timeFormat } from '$lib/stores/time-format';
import { workflowRun } from '$lib/stores/workflow-run';
import type { WorkflowExecution } from '$lib/types/workflows';
import { formatDate } from '$lib/utilities/format-date';
import { formatDistanceAbbreviated } from '$lib/utilities/format-time';
import {
Expand All @@ -14,8 +14,10 @@

import WorkflowDetail from './workflow-detail.svelte';

export let workflow: WorkflowExecution;

$: ({ namespace } = $page.params);
$: ({ workflow } = $workflowRun);

$: elapsedTime = formatDistanceAbbreviated({
start: workflow?.startTime,
end: workflow?.endTime || Date.now(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script lang="ts">
import type { IconName } from '$lib/holocene/icon';
import Icon from '$lib/holocene/icon/icon.svelte';
import Link from '$lib/holocene/link.svelte';

export let label: string;
export let value: string;
export let href: string | undefined = undefined;
export let icon: IconName | undefined = undefined;
export let current = false;
</script>

<div
class="flex w-full flex-col items-center gap-2 border border-subtle px-1 py-4 text-center text-xs transition-all lg:text-base {current &&
'bg-subtle'} max-w-md"
>
{#if icon}
<Icon name={icon} />
{/if}
<p class="font-mono">{label}</p>
<div class="px-1 lg:px-2">
{#if href}
<Link {href}>
{value}
</Link>
{:else}
<p>{value}</p>
{/if}
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<script lang="ts">
import { translate } from '$lib/i18n/translate';
import { routeForRelationships } from '$lib/utilities/route-for';

import ContinueAsNewNode from './continue-as-new-node.svelte';

export let namespace: string;
export let workflowId: string;
export let first: string;
export let previous: string;
export let current: string;
export let next: string;
</script>

<div
class="flex w-full items-center justify-between overflow-auto bg-primary px-8 py-16 lg:py-36 xl:px-32"
>
{#if first}
<ContinueAsNewNode
label={translate('workflows.first-execution')}
value={first}
href={routeForRelationships({
namespace,
workflow: workflowId,
run: first,
})}
/>
<div
class="border-top border-1 w-full border border-dashed border-subtle"
></div>
{/if}
{#if previous}
<ContinueAsNewNode
label={translate('workflows.previous-execution')}
value={first}
href={routeForRelationships({
namespace,
workflow: workflowId,
run: previous,
})}
/>
<div class="border-top border-1 w-full border border-subtle"></div>
{/if}
<ContinueAsNewNode
label={translate('workflows.current-execution')}
value={current}
href={routeForRelationships({
namespace,
workflow: workflowId,
run: current,
})}
current
/>
{#if next}
<div class="border-top border-1 w-full border border-subtle"></div>
<ContinueAsNewNode
label={translate('workflows.next-execution')}
value={next}
href={routeForRelationships({
namespace,
workflow: workflowId,
run: next,
})}
/>
{/if}
</div>
39 changes: 39 additions & 0 deletions src/lib/components/workflow/relationships/schedule-tree.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script lang="ts">
import { translate } from '$lib/i18n/translate';
import {
routeForRelationships,
routeForSchedule,
} from '$lib/utilities/route-for';

import ContinueAsNewNode from './continue-as-new-node.svelte';

export let namespace: string;
export let workflowId: string;
export let scheduleId: string;
export let current: string;
</script>

<div
class="flex w-full flex-col items-center justify-between gap-4 bg-primary px-8 py-12 xl:px-32"
>
<ContinueAsNewNode
label="Schedule"
value={scheduleId}
icon="schedules"
href={routeForSchedule({
namespace: namespace,
scheduleId,
})}
/>
<div class="border-top border-1 h-24 w-0.5 bg-subtle" />
<ContinueAsNewNode
label={translate('workflows.current-execution')}
value={current}
href={routeForRelationships({
namespace,
workflow: workflowId,
run: current,
})}
current
/>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<script lang="ts">
import WorkflowStatus from '$lib/components/workflow-status.svelte';
import Icon from '$lib/holocene/icon/icon.svelte';
import { translate } from '$lib/i18n/translate';
import { relativeTime, timeFormat } from '$lib/stores/time-format';
import type { WorkflowExecution } from '$lib/types/workflows';
import { formatDate } from '$lib/utilities/format-date';
import { formatDistanceAbbreviated } from '$lib/utilities/format-time';

export let workflow: WorkflowExecution;
export let isRootWorkflow = false;

$: elapsedTime = formatDistanceAbbreviated({
start: workflow?.startTime,
end: workflow?.endTime || Date.now(),
includeMilliseconds: true,
});
</script>

<div
class="flex w-full flex-col gap-2 p-1 text-left text-sm lg:flex-row lg:items-center"
>
<div class="flex items-center gap-2 lg:basis-96">
<div class="w-32 leading-3">
<WorkflowStatus status={workflow.status} />
</div>
<div class="w-full leading-3">
{#if isRootWorkflow}
<p class="font-mono text-xs">{translate('common.type')}</p>
{/if}
<p>{workflow.name}</p>
</div>
</div>
<div class="leading-3 lg:basis-[800px]">
{#if isRootWorkflow}
<p class="font-mono text-xs">{translate('common.id')}</p>
{/if}
<p>{workflow.id}</p>
</div>
<div class="hidden items-center gap-4 lg:flex lg:basis-5/12">
<div class="leading-3">
{#if isRootWorkflow}
<p class="font-mono text-xs">
{translate('common.start')}
</p>
{/if}
<p>
{formatDate(workflow?.startTime, $timeFormat, {
relative: $relativeTime,
})}
</p>
</div>
<div class="leading-3">
{#if isRootWorkflow}
<p class="min-w-12 font-mono text-xs">{translate('common.end')}</p>
{/if}
<p>
{formatDate(workflow?.endTime, $timeFormat, {
relative: $relativeTime,
}) || '-'}
</p>
</div>
<div class="leading-3">
{#if isRootWorkflow}
<Icon name="clock" class="h-4 w-3" />
{/if}
<p>{elapsedTime}</p>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
import type { RootNode } from '$lib/services/workflow-service';
import type { WorkflowExecution } from '$lib/types/workflows';

import WorkflowFamilyNodeDescription from './workflow-family-node-description.svelte';

export let root: RootNode;
export let expandAll: boolean;
export let onNodeClick: (node: RootNode, generation: number) => void;
export let activeWorkflow: WorkflowExecution | undefined = undefined;
export let generation = 1;
export let openRuns: Map<number, string>;
</script>

{#each root?.children as child}
<WorkflowFamilyNodeDescription
root={child}
{expandAll}
{onNodeClick}
{activeWorkflow}
{generation}
{openRuns}
/>
{/each}
Loading
Loading