${this.renderPanel(msg("Overview"), this.renderOverview())}
${this.renderPanel(
html`
${msg("Metadata")}
${when(
this.isCrawler,
() => html`
`
)}
`,
this.renderMetadata()
)}
`;
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 bearer = this.authState?.headers?.Authorization?.split(" ", 2)[1];
// for now, just use the first file until multi-wacz support is fully implemented
const replaySource = `/api/orgs/${this.crawl?.oid}/crawls/${this.crawlId}/replay.json?auth_bearer=${bearer}`;
//const replaySource = this.crawl?.resources?.[0]?.path;
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() {
return html`TODO`;
}
private renderConfig() {
if (!this.crawl?.config) return "";
return html`