From ec29928b28b0d2b7979ea994ea67927afa3d1c28 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 6 Aug 2024 09:44:17 -0700 Subject: [PATCH] Fix QA run downloads as a single WACZ (#1993) Follow up to #1412, fix QA run downloads as a single (multi) WACZ, containing other WACZ files from all workers. --- .../pages/org/archived-item-detail/ui/qa.ts | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/frontend/src/pages/org/archived-item-detail/ui/qa.ts b/frontend/src/pages/org/archived-item-detail/ui/qa.ts index 3e931b43..bb450a02 100644 --- a/frontend/src/pages/org/archived-item-detail/ui/qa.ts +++ b/frontend/src/pages/org/archived-item-detail/ui/qa.ts @@ -1,10 +1,6 @@ import { localized, msg, str } from "@lit/localize"; import { Task } from "@lit/task"; -import type { - SlChangeEvent, - SlSelect, - SlShowEvent, -} from "@shoelace-style/shoelace"; +import type { SlChangeEvent, SlSelect } from "@shoelace-style/shoelace"; import { css, html, @@ -21,8 +17,6 @@ import { QA_RUNNING_STATES } from "../archived-item-detail"; import { TailwindElement } from "@/classes/TailwindElement"; import { type Dialog } from "@/components/ui/dialog"; -import type { MenuItemLink } from "@/components/ui/menu-item-link"; -import type { OverflowDropdown } from "@/components/ui/overflow-dropdown"; import type { PageChangeEvent } from "@/components/ui/pagination"; import { APIController } from "@/controllers/api"; import { NavigateController } from "@/controllers/navigate"; @@ -353,6 +347,7 @@ export class ArchivedItemDetailQA extends TailwindElement { `; } + const authToken = this.authState!.headers.Authorization.split(" ")[1]; return qaRuns.map( (run, idx) => html` 0 ? "border-t" : ""}> @@ -391,28 +386,15 @@ export class ArchivedItemDetailQA extends TailwindElement { ${run.userName}
- { - const dropdown = e.currentTarget as OverflowDropdown; - const downloadLink = dropdown.querySelector( - "btrix-menu-item-link", - ); - - if (!downloadLink) { - console.debug("no download link"); - return; - } - - downloadLink.loading = true; - downloadLink.disabled = false; - downloadLink.href = `/orgs/${this.orgId}/crawls/${this.crawlId}/qa/${run.id}/download`; - }} - > + ${run.state === "canceled" ? nothing : html` - +