${this.renderPanel(msg("Overview"), this.renderOverview(), {
"p-4": true,
"rounded-lg": true,
border: true,
})}
${this.renderPanel(
html`
${msg("Metadata")}
${when(
this.isCrawler,
() => html`
`
)}
`,
this.renderMetadata(),
{
"p-4": true,
"rounded-lg": true,
border: true,
}
)}
`;
break;
}
// TODO abstract into breadcrumbs
const isWorkflowArtifact = this.crawlsBaseUrl.includes("/workflows/");
return html`
- ${msg("Status")}
-
${this.crawl
? html`
`
: html``}
- ${msg("Pages Crawled")}
-
${this.crawl?.stats
? html`
${this.numberFormatter.format(+this.crawl.stats.done)}
/
${this.numberFormatter.format(+this.crawl.stats.found)}
`
: this.crawl
? html` ${msg("Unknown")} `
: html``}
- ${msg("Run Duration")}
-
${this.crawl
? html`
${this.crawl.finished
? html`${RelativeDuration.humanize(
new Date(`${this.crawl.finished}Z`).valueOf() -
new Date(`${this.crawl.started}Z`).valueOf()
)}`
: html`
`}
`
: html``}
- ${msg("Crawler Instances")}
-
${this.crawl
? this.crawl?.scale
: html``}
`;
}
private renderReplay() {
//const replaySource = `/api/orgs/${this.crawl?.oid}/crawls/${this.crawlId}/replay.json?auth_bearer=${bearer}`;
const replaySource = `/api/orgs/${this.crawl?.oid}/crawls/${this.crawlId}/replay.json`;
const headers = this.authState?.headers;
const config = JSON.stringify({headers});
const canReplay = replaySource && this.hasFiles;
return html`
${
canReplay
? html`
${this.isActive
? msg("No files yet.")
: msg("No files to replay.")}
`
}
`;
}
private renderOverview() {
return html`
${this.isActive
? msg("No files yet.")
: msg("No files to download.")}
`}
`;
}
private renderLogs() {
if (!this.logs) {
return html`