Commit Graph

1587 Commits

Author SHA1 Message Date
sua yoo
e4107d0e76
fix: correct link to crawlilng defaults 2024-08-29 17:00:29 -07:00
sua yoo
eb2dab8ae0
fix: Update browser title (#2054)
Updates browser title when visiting the following pages:

- Superadmin dashboard
- Org top-level pages
- Account settings
2024-08-29 16:50:14 -07:00
sua yoo
988d9c9e2b
feat: Allow org admins to set default workflow configs (#2020)
- Adds new org settings tab for updating crawl details
- Refactors `workflow-editor` to move out utility functions
- Updates user guide on org settings

---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-08-29 16:49:22 -07:00
sua yoo
a44e9207ca
docs: Publish only on release or manual run (#2055) 2024-08-28 15:28:27 -07:00
sua yoo
ecac4f6939
docs: Reorganize user guide (#2050)
Reorganizes user guide to be more solutions based

---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2024-08-28 09:50:42 -07:00
Ilya Kreymer
ea252e8da9 version: bump to 1.11.5 2024-08-27 10:00:53 -07:00
sua yoo
337454f8c9
feat: Add link to hosted sign-up page (#2045)
Resolves https://github.com/webrecorder/browsertrix/issues/2043

<!-- Fixes #issue_number -->

### Changes

- Shows link to sign up in UI if `sign_up_url` is configured.
- Expires settings in session storage (for now)
2024-08-26 17:26:25 -07:00
sua yoo
c0725599b2
fix: Help forum link not showing on mobile (#2049)
Fixes the "Help Forum" link text not showing on smaller screens.
2024-08-26 15:53:08 -07:00
sua yoo
d119e8fd77
chore: Lock yarn version to classic (#2047)
Enables installing the app with yarn 2+.
2024-08-26 15:30:59 -07:00
Ilya Kreymer
95969ec747
Attempt to auto-adjust storage if usage is running out while crawl is running (#2023)
Attempt to auto-adjust PVC storage if:
- used storage (as reported in redis by the crawler) * 2.5 >
total_storage
- will cause PVC to resize, if possible (not supported by all drivers)
- uses multiples of 1Gi, rounding up to next GB
- AVAIL_STORAGE_RATIO hard-coded to 2.5 for now, to account for 2x space
for WACZ plus change for fast updating crawls

Some caveats:
- only works if the storageClass used for PVCs has
`allowVolumeExpansion: true`, if not, it will have no effect
- designed as a last resort option: the `crawl_storage` in values and
`--sizeLimit` and `--diskUtilization` should generally result in this
not being needed.
- can be useful in cases where a crawl is rapidly capturing a lot of
content in one page, and there's no time to interrupt / restart, since
the other limits apply only at page end.
- May want to have crawler update the disk usage more frequently, not
just at page end to make this more effective.
2024-08-26 14:19:20 -07:00
Ilya Kreymer
a1df689729
stats recompute fixes: (#2022)
- fix stats_recompute_last() and stats_recompute_all() to not update the
lastCrawl* properties of a crawl workflow if a crawl is running, as
those stats now point to the running crawl
- refactor _add_running_curr_crawl_stats() to make it clear stats only
updated if crawl is running
- stats_recompute_all() change order to ascending to actually get last
crawl, not first!
2024-08-26 14:18:59 -07:00
Ilya Kreymer
135c97419d version: update to 1.11.4 2024-08-26 12:31:56 -07:00
sua yoo
2a057eddd6
chore: Improve time to load org UI (#2044)
Improves time to first load an org with the following:
- Users user info from login response to set org slug and route user on
log in
- Stores user info in session storage so that it's available on reload
- Stores app settings in local storage until user logs out
- Loads critical org components synchronously
2024-08-26 10:45:10 -07:00
Ilya Kreymer
96e393e80d
update crawler channel fix: add crawlerChannel to update check (#2046)
Add missing check for crawlerChannel update
2024-08-26 10:41:54 -04:00
sua yoo
acd3e1252d
feat: Add help shortcuts to app header & footer (#2040)
WIP for https://github.com/webrecorder/browsertrix/issues/2041

<!-- Fixes #issue_number -->

### Changes

- Adds button to open embedded support guide
- Adds link to help forum
- Refactors app bar to look nicer on smaller screens
2024-08-23 18:11:29 -07:00
Ilya Kreymer
04c8b50423
add a crawling defaults on the Org to allow setting certain crawl workflow fields as defaults: (#2031)
- add POST /orgs/<id>/defaults/crawling API to update all defaults
(defaults unset are cleared)
- defaults returned as 'crawlingDefaults' object on Org, if set
- fixes #2016

---------

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-08-22 10:36:04 -07:00
sua yoo
0e16d526c0
fix: Hide login link on login page (#2039)
- Removes log in link when on log in page
- Fix e2e test, which wasn't actually logging the test user in before
2024-08-21 15:33:24 -07:00
sua yoo
25b1928d44
feat: Enable deleting workflow from list (#2042)
Adds back workflow list menu item to delete workflow if it's never been
run.
2024-08-21 15:33:00 -07:00
sua yoo
2ca9632057
feat: Add additional context around workflow job type options (#2032)
- Updates workflow job type copy and adds additional clarifying text
- Changes "List of URLs" label to "Crawl URL(s)"
- Refactors `NewWorkflowDialog` into tailwind element
2024-08-21 14:03:43 -07:00
sua yoo
3605d07547
fix: Make footer translatable (#2038)
- Wraps footer strings to prepare for localization
- Removes extraneous class names
- Updates copy button tooltip to match bug report field
2024-08-21 14:01:52 -07:00
Ilya Kreymer
86c9e538c1
quickfix: webhooks: ensure the 'crawl_reviewed' webhook is sent async, doesn't delay submitting a review (#2033)
make the call to `create_crawl_reviewed_notification` be called with
create_task (similar to other user-initiated webhook events), to avoid
extra wait for webhook to complete
2024-08-20 17:50:18 -07:00
sua yoo
7208888a1c
chore: remove console log 2024-08-20 17:34:47 -07:00
Emma Segal-Grossman
10640feeef
Add detailed permissions & permission summaries to user invite popup (#2003) 2024-08-20 20:34:29 -04:00
Emma Segal-Grossman
570dc10f2a
Properly pluralize "Pages" in QA, and display skeletons instead of incorrect fallback values (#2026) 2024-08-20 20:33:52 -04:00
Ilya Kreymer
8c9a14b6a2
Ensure Subscription Update doesn't update the gifted quotas (#2012)
- add a separate OrgQuotasIn where all quota updates are optional
- ensure gifted quotas are never updated as part of org update
- update tests
2024-08-20 13:15:03 -07:00
sua yoo
351e92ae2f
fix: Prevent browser profile selection overflow (#2029)
- Truncates selected browser profile description and refreshes style
- Order browser profiles by modified date
2024-08-20 12:43:51 -07:00
sua yoo
6ce565b5f7
fix: Use correct job type in crawl settings (#2028)
Fixes https://github.com/webrecorder/browsertrix/issues/2027

### Changes

Fixes crawl settings for archived item not showing the correct fields
based on job type.
2024-08-19 18:10:52 -07:00
sua yoo
4c7f1aa3ca
feat: Clean up settings UI (#2018)
- Renames "Org Settings" -> "Settings"
- Reduces gap between settings panel heading and panel
- Always show "Pending Invites" section and update heading styles to
match panel heading
- Update "Current Plan" and "Usage History" sections to be on the same
hierarchical level under "Billing"
- Refactors `<btrix-org>` to move `isAdmin` and `isCrawler` helpers to
app state
2024-08-19 13:37:41 -07:00
sua yoo
9a7033875b
chore: Refactor home component (#2000)
Resolves https://github.com/webrecorder/browsertrix/issues/1972

---------

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-08-15 17:16:14 -04:00
Henry Wilkinson
92fdcfd986
Docs: Adds example section on basic auth (#2021) 2024-08-15 06:13:28 -04:00
Tessa Walsh
916813af2d
Include user and user org info in login response (#2014)
Fixes #2013 

Adds the `/users/me` response data to the API login endpoint response
under the key `user_info` and adds a test.
2024-08-12 18:51:42 -07:00
sua yoo
1a6892572d
chore: Refactor frontend shared state (#1997)
Refactors custom components to enable shared state accessors
(like `authState`) and helpers (like `api.fetch`.) Schemas are now
defined with [zod](https://zod.dev/?id=basic-usage) which enables
runtime schema validation.

See subtasks for full description of change:

- https://github.com/webrecorder/browsertrix/pull/1979
- https://github.com/webrecorder/browsertrix/pull/1981
- https://github.com/webrecorder/browsertrix/pull/1985
- https://github.com/webrecorder/browsertrix/pull/1986

---------

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-08-12 17:57:31 -07:00
Ilya Kreymer
d9f49afcc5
type fixes on util functions (#2009)
Some additional typing for util.py functions and resultant changes
2024-08-12 10:54:45 -07:00
Ilya Kreymer
12f994b864
QA: Count QA execution minutes separately for now (#2011)
For now, keep QA exec time separate, as it may be scaled differently and currently still in beta.
2024-08-09 13:13:21 -07:00
Ilya Kreymer
4ec7cf8adc
Additional operator edge case fixes (#2007)
Fix a few edge-case situations:
- Restart evicted pods that have reached the terminal `Failed` state
with reason `Evicted`, by just recreating them. These pods will not be
automatically retried, so need to be recreated (usually happens due to
memory pressure from the node)
- Don't treat containers in ContainerCreating as running, even though
this state is usually quick, its possible for containers to get stuck
there, and will improve accuracy of exec seconds tracking.
- Consolidate state transition for running states, either sets to
running or to pending-wait/generate-wacz/upload-wacz and allows changing
from to either of these states from each other or waiting_capacity
2024-08-09 13:12:25 -07:00
Ilya Kreymer
3923996aaf
add missing 'Z' for iso-dates until ISO-formatting is fixed (#2008)
Adds missing 'Z' that is added explicitly now, until #1922 is fixed. It
was missing from workflow last modified and billing cancelation dates
2024-08-08 16:19:32 -07:00
Ilya Kreymer
8ff1ad39a7 version: bump to 1.11.3 2024-08-08 15:16:18 -07:00
sua yoo
97eac2b0e2
fix: Redirect /orgs to default path (#2006)
Fixes https://github.com/webrecorder/browsertrix/issues/2005

<!-- Fixes #issue_number -->

### Changes

Redirects `/orgs` to user's default home page.
2024-08-08 15:15:11 -07:00
Emma Segal-Grossman
2b5f964c24
Prevent invalid slugs from causing redirects in org settings (#2004)
Also improves the slug editing experience by partially-slugifying the
value as it's entered.

Previously, submitting a org slug value of ".." or similar would cause
the frontend to redirect to a "page not found" page, with all accessible
links leading to only `/account/settings`. This also causes the backend
to reset the org slug to one generated from the org name on a reload.

---------

Co-authored-by: sua yoo <sua@webrecorder.org>
2024-08-08 14:41:18 -07:00
Ilya Kreymer
ed9038fbdb version: bump to 1.11.2 2024-08-07 12:37:26 -07:00
Ilya Kreymer
5f53db75ee
fix resetting of invalid logins: (#2002)
* Fixes issue in FailedLogin model:
- fix data-model to remove nested 'attempted.attempted'
- migrate existing data to remove nested field

* Also, avoid setting dt_now() in model as that results in fixed date for
all objects:
- update FailedLogin to update 'attempted' date on every attempt
- also update PageNote object to set date in constructor

* Update text for too many logins to make it clear it is set only if its a
valid email

* fixes #2001
2024-08-07 12:36:06 -07:00
Ilya Kreymer
41d43ae249
Fix forgot password for invalid user (#1999)
- fix validation error if user doesn'r exist
- always return success even if user doesn't exist for security reasons
- add test for forgot password endpoint
2024-08-07 11:02:40 -07:00
sua yoo
0b14be896b
feat: Show usage history in dashboard (#1998)
Following https://github.com/webrecorder/browsertrix/pull/1995, we want
to keep the usage history table on the dashboard for now for video
demos.

### Changes

- Adds usage history table back to org dashboard
- Makes "No usage history" message more apparent
2024-08-06 19:09:34 -07:00
sua yoo
ba1e2ab602
feat: App bar enhancements (#1996)
- Always shows current org name
- Moves org dropdown next to logo
- Reduces logo size when logged in at smaller screen sizes
2024-08-06 17:54:05 -07:00
sua yoo
96e48b001b
feat: Update billing tab with usage & portal URL check (#1995)
- Hides usage table from dashboard if billing is enabled
- Shows usage table in billing settings
- Updates usage table column headings
- Fixes `portalUrl` task running unnecessarily
2024-08-06 16:31:57 -07:00
Ilya Kreymer
7fa2b61b29
Execution time tracking tweaks (#1994)
Tweaks to how execution time is tracked for more accuracy + excluding
waiting states:
- don't update if crawl state is in a 'waiting state' (waiting for
capacity or waiting for org limit)
- rename start states -> waiting states for clarity
- reset lastUpdatedTime if two consecutive updates of non-running state,
to ensure non-running states don't count, but also account for
occasional hiccups -- if only one update detects non-running state,
don't reset
- webhooks: move start webhook to when crawl actually starts for first
time (db lastUpdatedTime is not yet + crawl is running)
- don't set lastUpdatedTime until pods actually running
- set crawljob update interval to every 10 seconds for more accurate
execution time tracking
- frontend: show seconds in 'Execution Time' display
2024-08-06 09:44:44 -07:00
Ilya Kreymer
ec29928b28
Fix QA run downloads as a single WACZ (#1993)
Follow up to #1412, fix QA run downloads as a single (multi) WACZ,
containing other WACZ files from all workers.
2024-08-06 09:44:17 -07:00
Ilya Kreymer
4a2725aaa6
operator: adjust state transition rules to ensure 'running' state always accounted for in db (#1989)
don't rely on current status, always set state to running when running
to ensure idempotency in case of multiple calls
2024-08-05 16:00:21 -07:00
Ilya Kreymer
1c153dfd3c
Subscription Update Quotas (#1988)
- Follow-up to #1914, allows SubscriptionUpdate event to also update
quotas.
- Passes current usage info + current billing page URL to portalUrl
request for external app to be able to respond with best portalUrl
- get_origin() moved to utils to be available more generally.
- Updates billing tab to show current plans, switches order of quotas to
list execution time, storage first
2024-08-05 15:59:47 -07:00
Ilya Kreymer
0c29008b7d version: bump to 1.11.1 2024-07-30 11:23:41 -07:00