Reorder sections to match workflow creator (#1862)

This commit is contained in:
Henry Wilkinson 2024-06-12 11:46:15 -04:00 committed by GitHub
parent d501fb3fe7
commit 3de2e486b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,6 +141,9 @@ export class ConfigDetails extends LiteElement {
`, `,
() => this.renderSetting(msg("Exclusions"), msg("None")), () => this.renderSetting(msg("Exclusions"), msg("None")),
)} )}
<btrix-section-heading style="--margin: var(--sl-spacing-medium)">
<h4>${msg("Per-Crawl Limits")}</h4>
</btrix-section-heading>
${this.renderSetting( ${this.renderSetting(
msg("Max Pages"), msg("Max Pages"),
when( when(
@ -157,6 +160,21 @@ export class ConfigDetails extends LiteElement {
: undefined, : undefined,
), ),
)} )}
${this.renderSetting(
msg("Crawl Time Limit"),
renderTimeLimit(crawlConfig?.crawlTimeout, Infinity),
)}
${this.renderSetting(
msg("Crawl Size Limit"),
renderSize(crawlConfig?.maxCrawlSize),
)}
${this.renderSetting(
msg("Crawler Instances"),
crawlConfig?.scale ? `${crawlConfig.scale}×` : "",
)}
<btrix-section-heading style="--margin: var(--sl-spacing-medium)">
<h4>${msg("Per-Page Limits")}</h4>
</btrix-section-heading>
${this.renderSetting( ${this.renderSetting(
msg("Page Load Timeout"), msg("Page Load Timeout"),
renderTimeLimit( renderTimeLimit(
@ -169,7 +187,7 @@ export class ConfigDetails extends LiteElement {
renderTimeLimit(crawlConfig?.config.postLoadDelay, 0), renderTimeLimit(crawlConfig?.config.postLoadDelay, 0),
)} )}
${this.renderSetting( ${this.renderSetting(
msg("Page Behavior Timeout"), msg("Behavior Timeout"),
renderTimeLimit( renderTimeLimit(
crawlConfig?.config.behaviorTimeout, crawlConfig?.config.behaviorTimeout,
this.orgDefaults?.behaviorTimeoutSeconds ?? Infinity, this.orgDefaults?.behaviorTimeoutSeconds ?? Infinity,
@ -188,18 +206,6 @@ export class ConfigDetails extends LiteElement {
msg("Delay Before Next Page"), msg("Delay Before Next Page"),
renderTimeLimit(crawlConfig?.config.pageExtraDelay, 0), renderTimeLimit(crawlConfig?.config.pageExtraDelay, 0),
)} )}
${this.renderSetting(
msg("Crawl Time Limit"),
renderTimeLimit(crawlConfig?.crawlTimeout, Infinity),
)}
${this.renderSetting(
msg("Crawl Size Limit"),
renderSize(crawlConfig?.maxCrawlSize),
)}
${this.renderSetting(
msg("Crawler Instances"),
crawlConfig?.scale ? `${crawlConfig.scale}×` : "",
)}
</btrix-desc-list> </btrix-desc-list>
</section> </section>
<section id="browser-settings" class="mb-8"> <section id="browser-settings" class="mb-8">
@ -221,7 +227,11 @@ export class ConfigDetails extends LiteElement {
> >
${crawlConfig?.profileName} ${crawlConfig?.profileName}
</a>`, </a>`,
() => crawlConfig?.profileName || msg("Default Profile"), () =>
crawlConfig?.profileName ||
html`<span class="text-neutral-400"
>${msg("Default Profile")}</span
>`,
), ),
)} )}
${this.renderSetting( ${this.renderSetting(
@ -237,7 +247,7 @@ export class ConfigDetails extends LiteElement {
msg("User Agent"), msg("User Agent"),
crawlConfig?.config.userAgent crawlConfig?.config.userAgent
? crawlConfig.config.userAgent ? crawlConfig.config.userAgent
: msg("Default User Agent"), : html`<span class="text-neutral-400">${msg("Default")}</span>`,
)} )}
${crawlConfig?.config.lang ${crawlConfig?.config.lang
? this.renderSetting( ? this.renderSetting(