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