diff --git a/frontend/src/pages/org/workflow-detail.ts b/frontend/src/pages/org/workflow-detail.ts
index b1531df8..eb9885f4 100644
--- a/frontend/src/pages/org/workflow-detail.ts
+++ b/frontend/src/pages/org/workflow-detail.ts
@@ -1,6 +1,6 @@
import { localized, msg, str } from "@lit/localize";
import type { SlSelect } from "@shoelace-style/shoelace";
-import { html, type PropertyValues, type TemplateResult } from "lit";
+import { html, nothing, type PropertyValues, type TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators.js";
import { choose } from "lit/directives/choose.js";
import { ifDefined } from "lit/directives/if-defined.js";
@@ -646,25 +646,7 @@ export class WorkflowDetail extends BtrixElement {
`,
- () => html`
-
- void this.runNow()}
- >
-
- ${msg("Run Crawl")}
-
-
- `,
+ this.renderRunNowButton,
)}
@@ -1097,23 +1079,25 @@ export class WorkflowDetail extends BtrixElement {
>
${msg("Replay Latest Crawl")}
+
+ ${when(
+ this.isCrawler,
+ () =>
+ html`
+
+ ${msg("QA Latest Crawl")}
+ `,
+ )}
`,
- )}
- ${when(
- this.isCrawler && this.workflow,
- (workflow) =>
- html`
-
- ${msg("QA Latest Crawl")}
- `,
+ () => (this.isCrawler ? this.renderRunNowButton() : nothing),
)}
@@ -1161,6 +1145,27 @@ export class WorkflowDetail extends BtrixElement {
`;
}
+ private readonly renderRunNowButton = () => {
+ return html`
+
+ void this.runNow()}
+ >
+
+ ${msg("Run Crawl")}
+
+
+ `;
+ };
+
private renderNoCrawlLogs() {
return html`
${msg("Logs will show here after you run a crawl.")}
-
-
- void this.runNow()}
- >
-
- ${msg("Run Crawl")}
-
-
-
+ ${when(
+ this.isCrawler,
+ () => html` ${this.renderRunNowButton()}
`,
+ )}
`;
}