Skip to content

Commit 53c36de

Browse files
committed
refactor: remove URL display sections from ECCClientGa4ghTrsTool component and enhance workflow type version handling in ECCClientGa4ghWesRunCreate component
1 parent 52da905 commit 53c36de

2 files changed

Lines changed: 18 additions & 31 deletions

File tree

  • packages
    • ecc-client-ga4gh-trs/src/components/tool
    • ecc-client-ga4gh-wes/src/components/run-create

packages/ecc-client-ga4gh-trs/src/components/tool/tool.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -628,20 +628,6 @@ export class ECCClientGa4ghTrsTool extends LitElement {
628628
<dd>${this.tool.organization || "Not specified"}</dd>
629629
</div>
630630
<ecc-utils-design-separator></ecc-utils-design-separator>
631-
<div class="flex flex-row gap-2 w-full justify-between">
632-
<dt class="text-muted-foreground">URL</dt>
633-
<dd>
634-
<a
635-
href="${this.tool.url}"
636-
target="_blank"
637-
rel="noopener noreferrer"
638-
class="text-primary hover:underline break-all"
639-
>
640-
${this.tool.url}
641-
</a>
642-
</dd>
643-
</div>
644-
<ecc-utils-design-separator></ecc-utils-design-separator>
645631
646632
<div class="flex flex-row gap-2 w-full justify-between">
647633
<dt class="text-muted-foreground">Checker Workflow</dt>
@@ -728,21 +714,6 @@ export class ECCClientGa4ghTrsTool extends LitElement {
728714
729715
<ecc-utils-design-separator></ecc-utils-design-separator>
730716
731-
<div class="flex flex-row gap-2 w-full justify-between">
732-
<dt class="text-muted-foreground">URL</dt>
733-
<dd>
734-
<a
735-
href="${version.url}"
736-
target="_blank"
737-
rel="noopener noreferrer"
738-
class="text-primary hover:underline break-all"
739-
>
740-
${version.url}
741-
</a>
742-
</dd>
743-
</div>
744-
<ecc-utils-design-separator></ecc-utils-design-separator>
745-
746717
<div class="flex flex-row gap-2 w-full justify-between">
747718
<dt class="text-muted-foreground">Status</dt>
748719
<dd class="flex items-center">

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,25 @@ export class ECCClientGa4ghWesRunCreate extends LitElement {
142142

143143
try {
144144
this.serviceInfo = await this._provider.getServiceInfo();
145+
const workflowTypes = Object.keys(
146+
this.serviceInfo.workflow_type_versions
147+
);
145148

146-
// Set default workflow type version if available
147-
if (this.serviceInfo.workflow_type_versions[this.formData.workflowType]) {
149+
if (workflowTypes.length === 1) {
150+
const soleWorkflowType = workflowTypes[0] as WorkflowType;
151+
const versions =
152+
this.serviceInfo.workflow_type_versions[soleWorkflowType]
153+
?.workflow_type_version || [];
154+
155+
this.formData = {
156+
...this.formData,
157+
workflowType: soleWorkflowType,
158+
workflowTypeVersion: versions.length > 0 ? versions[0] : "",
159+
};
160+
} else if (
161+
this.serviceInfo.workflow_type_versions[this.formData.workflowType]
162+
) {
163+
// Set default workflow type version if available
148164
const versions =
149165
this.serviceInfo.workflow_type_versions[this.formData.workflowType]
150166
.workflow_type_version;

0 commit comments

Comments
 (0)