Skip to content

Commit 65280d9

Browse files
committed
fix: runs
1 parent e6d687d commit 65280d9

File tree

2 files changed

+51
-41
lines changed

2 files changed

+51
-41
lines changed

packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class ECCClientGa4ghWesRunCreate extends LitElement {
164164
}
165165
}
166166

167-
private handleInputChange(
167+
public handleInputChange(
168168
field: keyof typeof this.formData,
169169
value: string
170170
): void {
@@ -416,21 +416,23 @@ export class ECCClientGa4ghWesRunCreate extends LitElement {
416416
<div class="grid gap-4">
417417
<!-- Workflow URL spans full width -->
418418
<div class="grid gap-2">
419-
<ecc-utils-design-label
420-
for="workflow-url"
421-
class="text-sm font-medium"
422-
>
423-
Workflow URL <span class="text-destructive">*</span>
424-
</ecc-utils-design-label>
425-
<ecc-utils-design-input
426-
id="workflow-url"
427-
.value=${this.formData.workflowUrl}
428-
@ecc-input-changed=${(e: CustomEvent) =>
429-
this.handleInputChange("workflowUrl", e.detail.value)}
430-
placeholder="https://example.com/workflow.cwl"
431-
required
432-
class="h-10"
433-
></ecc-utils-design-input>
419+
<slot name="workflow-url">
420+
<ecc-utils-design-label
421+
for="workflow-url"
422+
class="text-sm font-medium"
423+
>
424+
Workflow URL <span class="text-destructive">*</span>
425+
</ecc-utils-design-label>
426+
<ecc-utils-design-input
427+
id="workflow-url"
428+
.value=${this.formData.workflowUrl}
429+
@ecc-input-changed=${(e: CustomEvent) =>
430+
this.handleInputChange("workflowUrl", e.detail.value)}
431+
placeholder="https://example.com/workflow.cwl"
432+
required
433+
class="h-10"
434+
></ecc-utils-design-input>
435+
</slot>
434436
</div>
435437
436438
<!-- Workflow Type and Version in same row -->
@@ -441,11 +443,6 @@ export class ECCClientGa4ghWesRunCreate extends LitElement {
441443
class="text-sm font-medium"
442444
>
443445
Workflow Type <span class="text-destructive">*</span>
444-
${this.loading
445-
? html`<span class="text-xs text-muted-foreground ml-2"
446-
>(Loading...)</span
447-
>`
448-
: ""}
449446
</ecc-utils-design-label>
450447
<ecc-utils-design-select
451448
id="workflow-type"
@@ -474,11 +471,6 @@ export class ECCClientGa4ghWesRunCreate extends LitElement {
474471
class="text-sm font-medium"
475472
>
476473
Workflow Type Version <span class="text-destructive">*</span>
477-
${this.loading
478-
? html`<span class="text-xs text-muted-foreground ml-2"
479-
>(Loading...)</span
480-
>`
481-
: ""}
482474
</ecc-utils-design-label>
483475
<ecc-utils-design-select
484476
id="workflow-version"

packages/ecc-client-ga4gh-wes/src/components/run/run.ts

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -440,20 +440,37 @@ export class ECCClientGa4ghWesRun extends LitElement {
440440
441441
<!-- Tags Section -->
442442
${request.tags
443-
? html`
444-
<div class="flex flex-col gap-3">
445-
<div class="font-bold text-base">Tags</div>
446-
<div class="flex flex-wrap gap-2">
447-
${Object.entries(request.tags).map(
448-
([key, value]) => html`
449-
<ecc-utils-design-badge variant="outline"
450-
>${key}: ${value}</ecc-utils-design-badge
451-
>
452-
`
453-
)}
454-
</div>
455-
</div>
456-
`
443+
? (() => {
444+
let tagsObj: Record<string, string> | null = null;
445+
if (typeof request.tags === "string") {
446+
try {
447+
tagsObj = JSON.parse(request.tags);
448+
} catch {
449+
tagsObj = null;
450+
}
451+
} else if (
452+
typeof request.tags === "object" &&
453+
request.tags !== null
454+
) {
455+
tagsObj = request.tags;
456+
}
457+
return tagsObj
458+
? html`
459+
<div class="flex flex-col gap-3">
460+
<div class="font-bold text-base">Tags</div>
461+
<div class="flex flex-wrap gap-2">
462+
${Object.entries(tagsObj).map(
463+
([key, value]) => html`
464+
<ecc-utils-design-badge variant="outline"
465+
>${key}: ${value}</ecc-utils-design-badge
466+
>
467+
`
468+
)}
469+
</div>
470+
</div>
471+
`
472+
: "";
473+
})()
457474
: ""}
458475
</div>
459476
</div>
@@ -510,6 +527,7 @@ export class ECCClientGa4ghWesRun extends LitElement {
510527
value=${log.cmd.join(" ")}
511528
extension="sh"
512529
disabled
530+
class="part:h-[40px]"
513531
></ecc-utils-design-code>
514532
</div>
515533
`
@@ -664,7 +682,7 @@ export class ECCClientGa4ghWesRun extends LitElement {
664682

665683
return html`
666684
<div class="space-y-4">
667-
${this.renderRunHeader()}
685+
<slot name="header">${this.renderRunHeader()}</slot>
668686
669687
<ecc-utils-design-tabs
670688
default-value="overview"

0 commit comments

Comments
 (0)