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

Current Details #2466

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/lib/holocene/accordion/accordion-light.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
id="{id}-trigger"
aria-expanded={open}
aria-controls="{id}-content"
class="w-full cursor-pointer hover:bg-interactive-secondary-hover focus-visible:bg-interactive focus-visible:outline-none"
class="focus-visible:outline-interactive w-full cursor-pointer hover:bg-interactive-secondary-hover"
type="button"
on:click={toggleAccordion}
>
Expand Down
1 change: 1 addition & 0 deletions src/lib/i18n/locales/en/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export const Strings = {
summary: 'Summary',
details: 'Details',
'summary-and-details': 'Summary & Details',
'current-details': 'Current Details',
'maximum-attempts': 'Maximum Attempts',
'retry-expiration': 'Retry Expiration',
state: 'State',
Expand Down
38 changes: 26 additions & 12 deletions src/lib/layouts/workflow-header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@
routeForWorkflows,
} from '$lib/utilities/route-for';

export let namespace: string;

$: ({ namespace, workflow: workflowId, run: runId, id } = $page.params);
$: ({ workflow, workers } = $workflowRun);
$: id = $page.params.id;

$: routeParameters = {
namespace,
workflow: workflow?.id,
run: workflow?.runId,
workflow: workflowId,
run: runId,
};

$: isRunning = $workflowRun?.workflow?.isRunning;
Expand All @@ -57,7 +55,7 @@
$workflowRun?.workflow?.status,
$fullEventHistory,
);
$: workflowHasBeenReset = has($resetWorkflows, $workflowRun?.workflow?.runId);
$: workflowHasBeenReset = has($resetWorkflows, runId);
$: workflowUsesVersioning =
workflow?.assignedBuildId ??
workflow?.mostRecentWorkerVersionStamp?.useVersioning;
Expand All @@ -70,6 +68,7 @@
$: summary = $workflowRun?.userMetadata?.summary;
$: details = $workflowRun?.userMetadata?.details;
$: hasUserMetadata = summary || details;
$: currentDetails = $workflowRun?.metadata?.currentDetails;
</script>

<div class="flex items-center justify-between pb-4">
Expand Down Expand Up @@ -124,13 +123,10 @@
</div>
{#if hasUserMetadata}
<AccordionLight let:open>
<div
slot="title"
class="flex w-full items-center gap-2 rounded p-2 text-xl"
>
<div slot="title" class="flex w-full items-center gap-2 p-2 text-xl">
<Icon
name="flag"
class="text-indigo-600/80"
name="info"
class="text-brand"
width={32}
height={32}
/>{translate('workflows.summary-and-details')}
Expand All @@ -145,6 +141,24 @@
{/if}
</AccordionLight>
{/if}
{#if currentDetails}
<AccordionLight let:open>
<div
slot="title"
class="flex w-full items-center gap-2 rounded p-2 text-xl"
Alex-Tideman marked this conversation as resolved.
Show resolved Hide resolved
>
<Icon
name="flag"
class="text-indigo-600/80"
Alex-Tideman marked this conversation as resolved.
Show resolved Hide resolved
width={32}
height={32}
/>{translate('workflows.current-details')}
</div>
{#if open}
<Markdown content={currentDetails} />
{/if}
</AccordionLight>
{/if}
<WorkflowDetails />
{#if cancelInProgress}
<div in:fly={{ duration: 200, delay: 100 }}>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/layouts/workflow-run-layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
<Loading class="pt-24" />
{:else}
<div class="border-b border-subtle px-4 pt-8 md:pt-20 xl:px-8">
<WorkflowHeader namespace={$page.params.namespace} />
<WorkflowHeader />
</div>
<slot />
{/if}
Expand Down
7 changes: 3 additions & 4 deletions src/lib/pages/workflow-query.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@
$: edited = initialQueryType !== queryType || input !== initialInput;

$: metadataError = $workflowRun.metadata?.error?.message;
$: queryTypes = $workflowRun?.metadata?.definition?.queryDefinitions?.filter(
(query) => {
$: queryTypes =
$workflowRun?.metadata?.definition?.queryDefinitions?.filter((query) => {
return query?.name !== '__stack_trace';
},
);
}) || [];

$: queryType = queryType || queryTypes?.[0]?.name;

Expand Down
Loading