From b2d526f09a29a9613aa1baf5f84a2075e5bdecdd Mon Sep 17 00:00:00 2001 From: Henry Wilkinson Date: Wed, 31 Jan 2024 15:12:39 -0500 Subject: [PATCH] docs: Explains execution time (#1475) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1463 ### Changes - Explains execution time - Adds style guide section about adding a badge for paid features - Updates config for mkdocs-material 9.5, materialx emoji support is being removed. - Adds better tooltips, a cool feature that also got released with mkdocs-material 9.5 - Adds search suggestions ### Caveats - [mkdocs 1.5 has improved the way they handle link validation](https://www.mkdocs.org/about/release-notes/#expanded-validation-of-links). Looks like way I've gone about linking things could be improved, and it will give a bunch of warnings as a result. The site still builds fine, but I'm going to fix this in a different PR so this one doesn't take as much effort to review :) EDIT: Here's that PR https://github.com/webrecorder/browsertrix-cloud/pull/1476 ### Testing - Make sure you are up to date with `pip install --upgrade mkdocs-material` ### Screenshot **Badge!** Screenshot 2024-01-17 at 11 59 00 PM ### Future - Should mkdocs-material be versioned in our deployment script? We risk things breaking if I don't get to them fast enough! 🙃 --------- Co-authored-by: Tessa Walsh --- docs/develop/docs.md | 10 ++++++++++ docs/stylesheets/extra.css | 8 ++++++++ docs/user-guide/overview.md | 9 ++++++++- docs/user-guide/workflow-setup.md | 8 ++++---- frontend/src/pages/org/dashboard.ts | 14 ++++++++++---- mkdocs.yml | 9 +++++++-- 6 files changed, 47 insertions(+), 11 deletions(-) diff --git a/docs/develop/docs.md b/docs/develop/docs.md index 6e39ab1a..43dbabae 100644 --- a/docs/develop/docs.md +++ b/docs/develop/docs.md @@ -129,6 +129,16 @@ For in-line code blocks, syntax highlighting should be added for all code-relate Renders to: `#!python range()` +### Paid features + +`Paid Feature`{ .badge-green } + +Some features of Browsertrix Cloud only pertain to those paying for the software on a hosted plan. Denote these with the following: + +```markdown +`Paid Feature`{ .badge-green } +``` + ### Admonitions We use [Admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) in their collapsed state to offer additional context or tips that aren't relevant to all users reading the section. We use standard un-collapsible ones when we need to call attention to a specific point. diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index f43949e8..28ac5efb 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -108,6 +108,14 @@ code { font-weight: 600; } +.badge-green { + background-color: hsl(142 76% 36%) !important; + border-color: hsl(142 76% 36%) !important; + color: white !important; + font-family: var(--md-text-font); + font-weight: 600; +} + .badge-orange { background-color: var(--wr-orange-primary) !important; border-color: var(--wr-orange-primary) !important; diff --git a/docs/user-guide/overview.md b/docs/user-guide/overview.md index 895e0834..c5fa910f 100644 --- a/docs/user-guide/overview.md +++ b/docs/user-guide/overview.md @@ -12,9 +12,16 @@ For all organizations the storage panel displays the total number of archived it ## Crawling +The crawling panel lists the number of currently running and waiting crawls, as well as the total number of pages captured. + +### Execution Time + +`Paid Feature`{.badge-green} + For organizations with a set execution minute limit, the crawling panel displays a graph of how much execution time has been used and how much is currently remaining. Monthly execution time limits reset on the first of each month at 12:00 AM GMT. -The crawling panel also lists the number of currently running and waiting crawls, as well as the total number of pages captured. +??? Question "How is execution time calculated?" + Execution time is the total runtime of all [_Crawler Instances_](../workflow-setup/#crawler-instances) during a crawl. For instance, if _Crawler Instances_ scale is set to 2× and each crawler instance uses 2 minutes of active crawling time, execution time for the crawl will be 4 minutes. Like elapsed time, this is tracked as the crawl runs so changing the _Crawler Instances_ scale while a crawl is running may change the amount of execution time used in a given time period. ## Collections diff --git a/docs/user-guide/workflow-setup.md b/docs/user-guide/workflow-setup.md index ff767007..be0fc6ef 100644 --- a/docs/user-guide/workflow-setup.md +++ b/docs/user-guide/workflow-setup.md @@ -120,7 +120,7 @@ Adds a hard limit on the number of pages that will be crawled. The crawl will be ### Crawl Time Limit -The crawl will be gracefully stopped after this set period of time. +The crawl will be gracefully stopped after this set period of elapsed time. ### Crawl Size Limit @@ -132,11 +132,11 @@ Increasing the amount of crawler instances will speed up crawls by using additio ### Page Load Timeout -Limits amount of time to wait for a page to load. Behaviors will run after this timeout only if the page is partially or fully loaded. +Limits amount of elapsed time to wait for a page to load. Behaviors will run after this timeout only if the page is partially or fully loaded. ### Behavior Timeout -Limits how long behaviors can run on each page. +Limits amount of elapsed time behaviors have to complete. ### Auto Scroll Behavior @@ -144,7 +144,7 @@ When enabled, the browser will automatically scroll to the end of the page. ### Delay Before Next Page -Waits on the page for a set period of time after any behaviors have finished running. This can be helpful to avoid rate limiting however it will slow down your crawl. +Waits on the page for a set period of elapsed time after any behaviors have finished running. This can be helpful to avoid rate limiting however it will slow down your crawl. ## Browser Settings diff --git a/frontend/src/pages/org/dashboard.ts b/frontend/src/pages/org/dashboard.ts index 5578694d..75eb8e37 100644 --- a/frontend/src/pages/org/dashboard.ts +++ b/frontend/src/pages/org/dashboard.ts @@ -701,7 +701,9 @@ export class Dashboard extends LiteElement { ${msg("Total Execution Time")}
- ${msg("Total running time of all crawler instances")} + ${msg( + "Total billable time of all crawler instances this used month" + )}
@@ -712,7 +714,7 @@ export class Dashboard extends LiteElement { usageTableCols.push(html`${msg("Execution: Monthly")}
- ${msg("Monthly execution time used on crawls this month")} + ${msg("Billable time used, included with monthly plan")}
`); @@ -721,7 +723,9 @@ export class Dashboard extends LiteElement { usageTableCols.push(html`${msg("Execution: Extra")}
- ${msg("Billable rollover execution time used on crawls this month")} + ${msg( + "Additional units of billable time used, any extra minutes will roll over to next month" + )}
`); @@ -730,7 +734,9 @@ export class Dashboard extends LiteElement { usageTableCols.push(html`${msg("Execution: Gifted")}
- ${msg("Gifted execution time used on crawls this month")} + ${msg( + "Usage of execution time added to your account free of charge" + )}
`); diff --git a/mkdocs.yml b/mkdocs.yml index 1a8a9f9a..1d3ab9a0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,6 +19,8 @@ theme: - navigation.footer - content.code.copy - content.action.edit + - content.tooltips + - search.suggest palette: scheme: webrecorder logo: assets/brand/btrix-logo.svg @@ -77,8 +79,8 @@ markdown_extensions: - pymdownx.highlight: anchor_linenums: true - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg options: custom_icons: - docs/overrides/.icons @@ -102,3 +104,6 @@ extra: - icon: bootstrap/youtube link: https://www.youtube.com/@webrecorder copyright: "Creative Commons Attribution 4.0 International (CC BY 4.0)" + +plugins: + - search