${this.renderPanel(msg("Overview"), this.renderOverview(), {
"p-4": true,
"rounded-lg": true,
border: true,
})}
${this.renderPanel(
html`
${this.renderTitle(msg("Metadata"))}
${when(
this.isCrawler,
() => html`
`
)}
`,
this.renderMetadata(),
{
"p-4": true,
"rounded-lg": true,
border: true,
}
)}
`;
break;
}
let label = "Back";
if (this.workflowId) {
label = msg("Back to Crawl Workflow");
} else if (this.collectionId) {
label = msg("Back to Collection");
} else if (this.crawl) {
if (this.crawl.type === "upload") {
label = msg("Back to All Uploads");
} else if (this.crawl.type === "crawl") {
label = msg("Back to All Crawls");
} else {
label = msg("Back to Archived Items");
}
}
return html`
${this.isActive
? msg("No files yet.")
: msg("No files to replay.")}
`
}
`;
}
private renderOverview() {
return html`
${this.crawl!.resources!.map(
(file) => html`
-
${when(
file.numReplicas > 0,
() =>
html`
`
)}
`
)}
`
: html`
${this.isActive
? msg("No files yet.")
: msg("No files to download.")}
`}
`;
}
private renderLogs() {
return html`
${when(
this.crawl && this.seeds && (!this.workflowId || this.workflow),
() => html`
`,
this.renderLoading
)}
`;
}
private renderLoading = () =>
html`