Bug #15159
closed
[workbench2] "Open in new tab" shows "cannot serve inline content"
Added by Chrystian Klingenberg over 5 years ago.
Updated almost 3 years ago.
Release relationship:
Auto
Description
When Arvados is configured without wildcard dns/ssl for keep-web, the "open in new tab" option in the three-dot menus to the right of file names in a collection shows this error message in a new tab:
cannot serve inline content at this URL (possible configuration error; see https://doc.arvados.org/install/install-keep-web.html#dns)"
In this configuration, Arvados can not do inline previews due to CORS; download of the file remains possible.
If showing the file in a new tab is not possible, just remove the "open in a new tab" option when Arvados is running in this configuration (only!).
Inline content works when one of these are true:
- There is a wildcard '*' in the WebDAV ExternalURL
- Collections.TrustAllContent is true
Collections.TrustAllContent configuration needs to be exported.
- Target version changed from Backlog Q1, Q2 to Workbench2 Q3, Q4
- Release set to 20
- Target version deleted (
Workbench2 Q3, Q4)
- Target version set to 2021-08-18 sprint
- Description updated (diff)
- Subject changed from [Data operations] "Open in new tab" is downloading on c97qk to [workbench2] "Open in new tab" shows "cannot serve inline content"
- Release changed from 20 to 41
- Target version changed from 2021-08-18 sprint to 2021-09-01 sprint
- Target version changed from 2021-09-01 sprint to 2021-08-18 sprint
- Description updated (diff)
- Assigned To set to Stephen Smith
- Status changed from New to In Progress
Some comments:
- At file
src/views-components/details-panel/file-details.tsx:L28
we're showing inline image previews that will need to be skipped when appropriate.
- Do you think it would be good to do some unit testing on
CollectionFileViewerAction
so that we can test both ways the 'Open in new tab' menu item (when it should and shouldn't appear)? I believe this could be done by mocking the state as we do for example in src/views-components/data-explorer/renderers.test.tsx
- The removed assertions on the Cypress test I think should be replaced with some check on the cluster config and a negated assertion: instead of removing the assertions, request the cluster config and assert that
TrustAllContent
is false and also no '*
' char is present on the appropriate config URL, and assert that the menu item isn't there. This way we wouldn't be removing a check but updating it making sure the new changes work as intended (or at least one of the cases, that's why I think unit testing all the cases is convenient). Do you agree?
- Target version changed from 2021-08-18 sprint to 2021-09-01 sprint
Changes at arvados-workbench2|1303689480b4e7df4d9d998a79c9c689453abc35
Tests: developer-tests-workbench2: #469 ![](https://ci.arvados.org/buildStatus/icon?job=developer-tests-workbench2&build=469)
- Added a showPreview flag to file-details getDetails, I changed the function signature to take an object to avoid having to match the position of the arguments when TabNr isn't being passed in
- Added jest test with a mock store testing the insecure case, trustallcontent=true, and wildcard in inline url cases
- Changed cypress tests to check TrustAllContent, for wildcard in inline url, and make sure open in new tab is not present
- Status changed from In Progress to Resolved
Also available in: Atom
PDF