Skip to content

Commit 18cf857

Browse files
authored
Add back relationship badge count in tab (#2498)
* Add back relationship badge count in tab * Update playwright * Use single quotes
1 parent ab55531 commit 18cf857

File tree

4 files changed

+43
-22
lines changed

4 files changed

+43
-22
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"@babel/preset-typescript": "^7.18.6",
121121
"@chromatic-com/storybook": "^1.5.0",
122122
"@grpc/grpc-js": "^1.8.22",
123-
"@playwright/test": "^1.44.1",
123+
"@playwright/test": "^1.49.1",
124124
"@storybook/addon-a11y": "^8.1.10",
125125
"@storybook/addon-essentials": "^8.1.10",
126126
"@storybook/addon-interactions": "^8.1.10",

Diff for: pnpm-lock.yaml

+28-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/lib/layouts/workflow-header.svelte

+12-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
import Tabs from '$lib/holocene/tab/tabs.svelte';
2020
import { translate } from '$lib/i18n/translate';
2121
import { fullEventHistory } from '$lib/stores/events';
22+
import { namespaces } from '$lib/stores/namespaces';
2223
import { resetWorkflows } from '$lib/stores/reset-workflows';
2324
import { workflowRun } from '$lib/stores/workflow-run';
2425
import { workflowsSearchParams } from '$lib/stores/workflows';
2526
import { isCancelInProgress } from '$lib/utilities/cancel-in-progress';
27+
import { getWorkflowRelationships } from '$lib/utilities/get-workflow-relationships';
2628
import { has } from '$lib/utilities/has';
2729
import { pathMatches } from '$lib/utilities/path-matches';
2830
import {
@@ -57,6 +59,11 @@
5759
$: workflowUsesVersioning =
5860
workflow?.assignedBuildId ??
5961
workflow?.mostRecentWorkerVersionStamp?.useVersioning;
62+
$: workflowRelationships = getWorkflowRelationships(
63+
workflow,
64+
$fullEventHistory,
65+
$namespaces,
66+
);
6067
6168
$: summary = $workflowRun?.userMetadata?.summary;
6269
$: details = $workflowRun?.userMetadata?.details;
@@ -223,7 +230,11 @@
223230
$page.url.pathname,
224231
routeForRelationships(routeParameters),
225232
)}
226-
></Tab>
233+
>
234+
<Badge type="primary" class="px-2 py-0">
235+
{workflowRelationships.relationshipCount}
236+
</Badge></Tab
237+
>
227238
<Tab
228239
label={translate('workflows.workers-tab')}
229240
id="workers-tab"

Diff for: src/lib/services/workflow-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,9 @@ export async function fetchAllRootWorkflows(
710710
rootWorkflowId: string,
711711
rootRunId?: string,
712712
): Promise<RootNode | undefined> {
713-
let query = `RootWorkflowId = "${rootWorkflowId}"`;
713+
let query = `RootWorkflowId = '${rootWorkflowId}'`;
714714
if (rootRunId) {
715-
query += ` AND RootRunId = "${rootRunId}"`;
715+
query += ` AND RootRunId = '${rootRunId}'`;
716716
}
717717

718718
const root = await fetchWorkflow({

0 commit comments

Comments
 (0)