Stephen Smith [Fri, 22 Sep 2023 14:12:42 +0000 (10:12 -0400)]
20225: Add subdirectory selection support to directory array picker
Adds cascade flag to tree picker to disable recursive directory selection
Reworks initProjectsTreePicker to support initializing multiple selections.
Loads each selection's ancestor tree in parallel, combines updates to same tree
pickers before inserting the ancestor tree, then loads necessary collections in
parallel
Changes checkbox visibility logic to show collection selection checkbox even
when collection is not loaded/expanded when cascade mode is off - since the
selection won't cascade there is no need to require the collection to be opened
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
Stephen Smith [Thu, 21 Sep 2023 19:02:10 +0000 (15:02 -0400)]
20225: Add subdirectory selection support to directory input
Converts getFileOperationLocation into a dispatchable helper so it can access
the store to augment FileOperationLocations with a PDH
Converts DirectoryTreePickerField into a connected class component in order to
use getFileOperationLocation
Change DirectoryInputComponent to include directories in the picker and use
getFileOperationLocation to pass FileOperationLocation instead of Collection
objects so that the subpath within the collection can be embedded in the
Directory object
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
Peter Amstutz [Mon, 14 Aug 2023 20:40:32 +0000 (16:40 -0400)]
19793: Make browser back button work on nav to PDH
When navigating to a collection by PDH, if there is only one match, it
the portable data hash page automatically directs the user to the
appropriate collection page. However, if the user pushes the back
button, they go back to portable data hash page which automatically
takes them to the collection page again. This effectively breaks the
back button.
This fixes the bug by replacing (instead of "pushing") the top of the
location history with the collection page, so that the back button
from the collection page takes the user to their previous page without
revisiting the portable data hash page (so they are not endlessly
redirected).
This commit message is longer than the actual code fix.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Stephen Smith [Wed, 2 Aug 2023 21:48:36 +0000 (17:48 -0400)]
20219: Pass through promise rejections from getLogFileContents
* No longer returns undefined for failed log fragments
* initProcessLogsPanel added catch to handle errors, on failure it shows a
toast and initializes the store empty, allowing polling to run and retry if
the container is running
* Add note to pollProcessLogs error console.log that the promise rejection is
ignored currently
* loadContainerLogFileContents now handles errors from getLogFileContents
* Switched from Promise.all to Promise.allSettled, which allows some promises
to fail and still return a result
* Replace undefined fragment & subfragment filtering with top level promise
status filtering, subfragments can no longer have some failures due to
sub-promises using .all which rejects on any failure
* Add es2020 to typescript lib array for Promise.allSettled
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
Stephen Smith [Wed, 2 Aug 2023 00:40:13 +0000 (20:40 -0400)]
20219: Improve useAsyncInterval testability, add unit test
* Combines useRefs for easier mocking
* Wraps callback execution in promise chain to prevent halting on non-async
callbacks
* Clean up now unused async contexts
* Add explicit promise resolve/reject on PollProcessLogs
* Add catch block to continue polling on error
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
Stephen Smith [Fri, 28 Jul 2023 15:18:20 +0000 (11:18 -0400)]
20219: Replace API & websocket log loading with webdav polling
* Add apiWebdavClient to log service for making webdav requests to the API and
differentiate from keepWebdavClient
* Add listLogFiles and getLogFileContents methods to log service, contents can
be fetched with range request
* Add loadContainerLogFileContents to load logs using webdav range requests
* Files larger than the chunk limit (128k) are loaded as beginning and end
in 2 64k fragments, snipline is appended to the last line of the first
fragment
* The chunks are all requested in parallel
* Add sorting of timestamped log types in combined log views (Main/All)
* Lines without timestamps are merged with previous lines with timestamps
* If no preceding lines of a sortable type exist, the leading lines are
removed from combined log views - they can still be seen in the single
log type filter
* Non-timestamped log types (node-info/contaner) are pushed to the bottom
with original ordering in All view
* Merging & sorting is not applied to single log type view
* Remove snipline LogEventType as all sniplines now belong to specific log
event types
* Update logs panel store and reducer to remember the last log byte requested
* Add polling useAsyncInterval utility function to poll log file sizes
* Polling awaits for callback to finish to prevent race conditions
* Update process log code snippet style to remove gap between array of loglines
* Remove websocket handling of log events
* Replaced cypress log manipulation commands with webdav log helpers
* Add tests for polling, line sorting, correctly sized/positioned chunks, and
snipline
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
Peter Amstutz [Fri, 21 Jul 2023 17:07:14 +0000 (13:07 -0400)]
18946: Transitional user profile feature
If UserProfileFormFields is non-empty, and the user's prefs.profile is
empty, wb2 will navigate to the user account page to encourage people
to fill out the profile. Unlike wb1, filling it out is not mandatory.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Peter Amstutz [Tue, 18 Jul 2023 17:46:50 +0000 (13:46 -0400)]
20688: urldecode the redirect path before storing it
Necessary because nginx url rewrites will turn the "+" into a "%2B",
so we need to turn it back. After more than an hour of messing with
it, it's easier to fix workbench 2 than to fix nginx.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>